![]() |
HowTo.LEDsShowNewMailAndIRC HistoryHide minor edits - Show changes to markup August 25, 2008, at 10:33 PM
by -- change crontab line
Changed lines 95-96 from:
to:
August 20, 2008, at 11:50 PM
by -- fixed false wikilnks, typo
Changed lines 1-2 from:
This HowTo gives information on how to use the LEDs to display information on Unslung, and more specifically on how to use the disk 1 LED to indicate new mail, and disk 2 LED to indicate a new private message in irssi. to:
This HowTo gives information on how to use the LEDs to display information on Unslung, and more specifically on how to use the disk 1 LED to indicate new mail, and disk 2 LED to indicate a new private message in irssi. Changed line 10 from:
Make sure the directory to:
Make sure the directory August 20, 2008, at 11:49 PM
by -- fixed false wikilnks
Changed lines 6-7 from:
to:
LEDs by running Set_Led every second, setting them on if a file exists, and off otherwise. August 20, 2008, at 11:48 PM
by -- fixed false wikilnks
Changed lines 1-5 from:
This HowTo gives information on how to use the LEDs? to display information on Unslung, and more specifically on how to use the disk 1 LED to indicate new mail, and disk 2 LED to indicate a new private message in irssi. Taking control of the LEDs? in UnslungI couldn't get Unslung to stop updating the LEDs?, so instead i made a script to update the disk to:
This HowTo gives information on how to use the LEDs to display information on Unslung, and more specifically on how to use the disk 1 LED to indicate new mail, and disk 2 LED to indicate a new private message in irssi. Taking control of the LEDs in UnslungI couldn't get Unslung to stop updating the LEDs, so instead i made a script to update the disk Changed lines 8-9 from:
If the the files to:
If the the files August 20, 2008, at 10:01 PM
by -- added notes for debian
Changed line 64 from:
to:
Added lines 75-87:
#!/bin/sh /usr/bin/fetchmail -c --service 143 && sudo leds disk-1 fast || sudo leds disk-1 off Debian note: I couldn't figure out how to allow regular users to change led settings, so i used sudo (apt-get install sudo) instead. But sudo by default asks for a password every 15minutes, i changed this by running (as root) "visudo" and add permissions to ex. user joe: Defaults:joe timestamp_timeout=-1 ... vk ALL=(ALL) ALL Changed line 105 from:
to:
Changed lines 121-139 from:
Make sure to:
Make sure
use strict;
use Irssi;
sub fhilight {
system("sudo leds disk-2 fast");
}
sub fseenhilight {
system("sudo leds disk-2 off");
}
Irssi::signal_add('message private', 'fhilight');
Irssi::signal_add('window changed', 'fseenhilight');
And to actually load this script run "/script load fhilight" in irssi. May 17, 2008, at 08:08 AM
by -- Make -> Making in headlines
Changed lines 52-53 from:
Make disk 1 LED indicate new mailto:
Making disk 1 LED indicate new mailChanged lines 84-85 from:
Make disk 2 LED indicate new private messages in irssito:
Making disk 2 LED indicate new private messages in irssiMay 17, 2008, at 08:04 AM
by -- initial
Added lines 1-108:
This HowTo gives information on how to use the LEDs? to display information on Unslung, and more specifically on how to use the disk 1 LED to indicate new mail, and disk 2 LED to indicate a new private message in irssi. Taking control of the LEDs? in UnslungI couldn't get Unslung to stop updating the LEDs?, so instead i made a script to update the disk LEDs? by running Set_Led every second, setting them on if a file exists, and off otherwise. If the the files Make sure the directory mkdir /led chmod 777 /led
#!/bin/sh
while [ 1 ]
do
if [ -f /led/disk1on ]
then
Set_Led turn_on1
else
Set_Led turn_off1
fi
if [ -f /led/disk2on ]
then
Set_Led turn_on2
else
Set_Led turn_off2
fi
sleep 1
done
Make sure it's executable by running Run ledsetter.sh as root in the background with
#!/bin/sh /root/ledsetter.sh & Make sure it's executable by running Make disk 1 LED indicate new mailThis works by checking for new mail through fetchmail, and make sure the file Install fetchmail by running Then (if user is joe) create Make sure the file is secret by running
#!/bin/sh
if /opt/bin/fetchmail -c --service 143
then
touch /led/disk1on
else
rm /led/disk1on
fi
Make sure it's executable by running The fetchmail parameter To make this run every 10 minutes add the following line to Make disk 2 LED indicate new private messages in irssiThis works by using a perl script for irssi that creates Make sure the
use strict;
use Irssi;
sub fhilight {
system("touch /led/disk2on 2> /dev/null");
}
sub fseenhilight {
system("rm /led/disk2on 2> /dev/null");
}
Irssi::signal_add('message private', 'fhilight');
Irssi::signal_add('window changed', 'fseenhilight');
Make sure |