date/time skbar script up
- SHA
4f7976450ea3928ba7603cce98e5ce0db9eab542- Parents
-
3443025 - Tree
4af9867
4f79764
4f7976450ea3928ba7603cce98e5ce0db9eab5423443025
4af9867| Status | File | + | - |
|---|---|---|---|
| A |
sketchybar/plugins/clock.sh
|
17 | 0 |
sketchybar/plugins/clock.shadded@@ -0,0 +1,17 @@ | ||
| 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' | |