2 # Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 # Copyright (C) 2005 Colin Leroy <colin@colino.net
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 # This script, when used as newmail_notify_cmd (Configuration/Receive),
20 # makes the mail LED blink on new or unread mail for ASUS laptops with
21 # asus_acpi compiled in the kernel or loaded as module.
23 [ -f /tmp/mailcheck-$LOGNAME ] && exit
24 touch /tmp/mailcheck-$LOGNAME
28 num=`sylpheed --status | cut -d' ' -f2`
29 if [ "$num" == "Sylpheed" ]; then
31 rm /tmp/mailcheck-$LOGNAME
32 echo 0 > /proc/acpi/asus/mled
35 if [ "$num" != "0" ]; then
36 echo $last > /proc/acpi/asus/mled
37 if [ "$last" == "0" ]; then
43 echo 0 > /proc/acpi/asus/mled