dotfiles/tmux/clocks.sh
2016-04-28 13:49:53 -04:00

16 lines
505 B
Bash
Executable file

#!/bin/sh
# Supply tmux with times for right-hand status bar
# Each variable encompasses a time and a color
caliTime="$(TZ=America/Los_Angeles date +%R)"
buffTime="$(TZ=America/New_York date +'%b %d %R')"
utcTime="$(date -u +%R)"
bangTime="$(TZ=Asia/Kolkata date +%R)"
caliForm="#[fg=red]<][ $caliTime ] "
buffForm="#[fg=green]<][ $buffTime | #[fg=red](!)#[fg=green]][> "
utcForm="#[fg=blue][ $utcTime ][> "
bangForm="#[fg=magenta][ $bangTime ][>>"
echo "$caliForm""$buffForm""$utcForm""$bangForm"" "