Skip to content

Instantly share code, notes, and snippets.

@pfsmorigo
Created May 18, 2012 12:56
Show Gist options
  • Save pfsmorigo/2725113 to your computer and use it in GitHub Desktop.
Save pfsmorigo/2725113 to your computer and use it in GitHub Desktop.
#! /bin/bash
TIMEOUT=5
THINKLIGHT=/sys/class/leds/tpacpi\:\:thinklight/brightness
function send2dzen() {
for i in 1 2; do
#echo $* | dzen2 -p 5 -fg \#FFFFFF -bg \#0000FF -ta l -y -18 -h 18 -fn -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 -xs $i &
#echo "^bg(darkblue) Notify ^bg(blue) $*" | dzen2 -p -ta l -y -18 -x 300 -p 5 -fn -misc-fixed-medium-r-normal--12-120-75-75-C-70-iso10646-1 -fg white -bg blue -xs $i &
echo "$* " | dzen2 -p -ta r -y -16 -x 200 -p $TIMEOUT -fn -xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso10646-1 -fg white -bg black -xs $i &
done
}
function thinklight() {
echo 255 > $THINKLIGHT
sleep $TIMEOUT
echo 0 > $THINKLIGHT
}
echo "$(date '+%F %T') | $*" >> $HOME/.notify
send2dzen $*
thinklight
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment