Page 1 of 1

lunch monitor

Posted: Wed Jun 08, 2016 1:19 pm
by wuxmedia
So I get an hours lunch, lucky me.
I normally forget when I started, no body snaps at me if i'm late (or wake up my jabber client basically)
but I was bored:

Code: Select all

#!/bin/bash
#Lunch alarm, requires 'toilet'
echo "LUNCH!!" 
date
sleep 10s
while true 
do
printf '\e[?5h'  # Turn on reverse video
toilet "WORK"
sleep .5s 
printf '\e[?5l'  # Turn on normal video
toilet "TIME"
sleep .5s
done
have to run it with this alias:

Code: Select all

alias lunch="lunch.sh ; printf '\e[?5l'"
in case the terminal stays inverted.
couldn't work out how to do a proper 'trap' function

Re: lunch monitor

Posted: Fri Jun 10, 2016 6:51 pm
by GA-KO
Needs a

Code: Select all

toilet "Toilet Time"
last 10 minutes of lunch break
so you don't forget.

Re: lunch monitor

Posted: Fri Jun 10, 2016 9:18 pm
by wuxmedia
^ hah!

Re: lunch monitor

Posted: Wed Jun 15, 2016 5:53 pm
by machinebacon
/moving to /usr/local/bin/ :)

Re: lunch monitor

Posted: Wed Jun 15, 2016 6:04 pm
by wuxmedia
oh - thanks, you know as root at work I would never just put dodgy scripts into /usr/bin or /bin/ *ahem*

Re: lunch monitor

Posted: Wed Jun 15, 2016 6:06 pm
by machinebacon
...or /sbin :D

noooo never ;)