Erroneous Posted October 9, 2006 Share Posted October 9, 2006 I use mythtv. I use e17. Neither of which have a very good system for quickly seeing what time it is. Solution: have a voice tell you what time it is by pressing Alt+T, and date by pressing Alt+D. Here's how: copy this code to a file called time.sh: case "$1" in time) date "+ %l %M %p" | sed -e "s/00//g" | sed -e 's/ 0/ oh /g' | sed -e 's/AM/a-m/g' > .temp ;; date) date "+ %A, %B %dth" | sed "s/1th/1st/g" | sed "s/2th/2nd/g" | sed "s/3th/3rd/g" > .temp ;; *) date "+ %A, %B %dth" | sed "s/1th/1st/g" | sed "s/2th/2nd/g" | sed "s/3th/3rd/g" > .temp date "+ %l %M %p" | sed -e 's/ 0/ oh /g' | sed -e 's/AM/a-m/g' >> .temp ;; esac cat .temp flite .temp -o .temp.wav aplay -t wav .temp.wav &>/dev/null rm .temp rm .temp.wav Install the following: alsa-utils, flite. You want to have aplay or play commands, along with flite. Then add the appropiate lines to whatever keybinding configs you have for your window manager run "sh ~/time.sh time" and "sh ~/time.sh date" when you press Alt+T and Alt+D, respectively. Here's the lines for fluxbox: Mod1 t :ExecCommand sh ~/time.sh time Mod1 d :ExecCommand sh ~/time.sh date Restart/Reload your window manager and turn up your properly alsa-configured speakers to test it out. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.