]> git.donarmstrong.com Git - x_base.git/blob - .awesome_clock
use utf8 title
[x_base.git] / .awesome_clock
1 #!/bin/sh
2
3 if [ -n "$2" ]; then
4     TIME_SPEC="$2"
5 else
6     TIME_SPEC="%H:%M"
7 fi;
8
9 if [ -n "$1" ]; then
10     SCREEN="$1";
11 else
12     SCREEN=0;
13 fi;
14
15 updateClock() {
16   echo -e "$SCREEN widget_tell mystatusbar tb_date text $(date +' '$TIME_SPEC' ')\n\n" | \
17       awesome-client
18 }
19
20 while true; do
21   updateClock
22   sleep 10;
23 done