Skip to content

Commit 5df6d24

Browse files
committedSep 26, 2014
Rename led.py since it's no longer holding the generic led control code
1 parent 8327f2c commit 5df6d24

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed
 

‎led.py ‎eyes.py

File renamed without changes.

‎watchlock.sh ‎ledbyscreensaver.sh

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
#/bin/sh
22

3+
# This script will make the LED show open eyes when your computer is active, and
4+
# closed eyes when your screensaver comes on.
5+
36
eyes=${1:-kitty}
7+
pathtoeyes=/home/aaronw/programs/pydcled
8+
# For Mint MATE
9+
screensaverintf="interface=org.mate.ScreenSaver,member=ActiveChanged"
10+
# For Gnome
11+
#screensaverintf="interface=org.gnome.ScreenSaver,member=ActiveChanged"
412

5-
dbus-monitor --session "interface=org.mate.ScreenSaver,member=ActiveChanged" --monitor | (
13+
dbus-monitor --session $screensaverintf --monitor | (
614

715
echo "Waking up!"
8-
python /home/aaronw/programs/pydcled/led.py -e $eyes &
16+
python $pathtoeyes/eyes.py -e $eyes &
917
LEDPID=$!
1018

1119
function clean_up {
@@ -21,12 +29,12 @@ dbus-monitor --session "interface=org.mate.ScreenSaver,member=ActiveChanged" --m
2129
if echo $X | grep "boolean true" &> /dev/null; then
2230
echo "Going to sleep!"
2331
kill $LEDPID &> /dev/null 2>&1
24-
python /home/aaronw/programs/pydcled/led.py -e $eyes --shut &
32+
python $pathtoeyes/eyes.py -e $eyes --shut &
2533
LEDPID=$!
2634
elif echo $X | grep "boolean false" &> /dev/null; then
2735
echo "Waking up!"
2836
kill $LEDPID &> /dev/null 2>&1
29-
python /home/aaronw/programs/pydcled/led.py -e $eyes &
37+
python $pathtoeyes/eyes.py -e $eyes &
3038
LEDPID=$!
3139
fi
3240
done

0 commit comments

Comments
 (0)