Thanks ee.
用crontab做了一个每个小时放音乐提示休息,歌曲能放了,但是提示没有,不知道怎么回事。
notify-send的提示出不来,换gnome-osd-client了,这个能出来。脚本如下:
~/bash 囧☯☎ cat alarmclock.sh
#!/bin/bash
# Filename: alarmclock.sh
# Have a rest every hour
# use `crontab -l` see the detail
s="<span size='12000' color='red' weight='bold'>You have stay before screen more than an hour</span><span size='12000' color='#bcee68' weight='bold':gt&Please have a Rest Now
Go out for a walk</span>"
#`notify-send -u critical -t 5000 -i '/home/element/png/200.png' "Eyes Protect" "$s"`
gnome-osd-client -f "<message id='myplugin' osd_fake_translucent_bg='on' osd_vposition='bottom' osd_halignment='right' animations='on' hide_timeout='20000'>$s</message>"
`/usr/bin/mpg123 -q ~/Music/alert.mp3`
crontab 设置如下:
囧☯☎ crontab -l
# m h dom mon dow command
00 * * * * /home/element/bash/alarmclock.sh
pango的语法介绍:Pango Reference Manual
Read the rest of this entry »