-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtime
executable file
·35 lines (31 loc) · 1020 Bytes
/
time
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh
# shellcheck disable=1090,2154
. ~/.cache/wal/colors.sh
blockcolor=$color14
txtcolor=$color0
case $BLOCK_BUTTON in
1) # Left Click
notify-send "It is currently $(date +%X) on $(date +%A), $(date +%B%d), $(date +%Y)"
;;
2) # Middle Click
systemctl --user restart vdirsyncer
;;
3) # Right Click
notify-send "Upcoming Events" "$(khal list --format '{calendar} {start-time} {title}' today tomorrow)"
;;
4) # Scroll Up
notify-send "Upcoming Events" "$(khal list --format '{calendar} {start-time} {title}' today tomorrow)"
;;
5) # Scroll Down
notify-send "Upcoming Events" "$(khal list --format '{calendar} {start-time} {title}' today tomorrow)"
;;
esac
if [ -f /tmp/calsync ]; then
label=""
else
label=""
fi
printf "\
<b><span foreground='$blockcolor' background='$color0'></span>\
<span foreground='$txtcolor' background='$blockcolor'>%s</span></b>\n" \
" $label $(date '+%H%M/%S %m/%d/%Y') "