Bash · 349 bytes Raw Blame History
1 #!/bin/zsh
2 # date/time indicators for my sketchybar
3 #
4 # NOTE: @espadonne (mfw) this takes 1 arg or none
5 # the expected first arg is the string LEFT
6
7 label=""
8
9 if [[ "$1" == "LEFT" ]]; then
10 label="$(date '+%Y.%m.%d (%A)')"
11 else
12 label="|| $(date '+%-H:%M')"
13 fi
14
15 sketchybar --set $NAME label="$label"
16 # echo tom
17 # date '+%a %b %-d %-H:%M'