fix(sketchybar,polybar): better fallback date

This commit is contained in:
winston 2022-07-31 09:23:51 +02:00
parent 23af4dd3d4
commit ada270d130
Signed by: winston
GPG key ID: 3786770EDBC2B481
3 changed files with 9 additions and 3 deletions

View file

@ -107,7 +107,7 @@ type = custom/script
interval = 60
# fall back to normie date if discordian date is not available
exec = (ddate +'%{%A, %b %d%}' || date +'%A, %b %d')
exec = bar_date
format-foreground = ${colors.blue}
label =  %output%

View file

@ -1,4 +1,3 @@
#!/usr/bin/env bash
DATE="$(ddate +'%{%A, %b %d%}' | date +'%A, %b %d')"
sketchybar --set "$NAME" label="$DATE" icon=" "
sketchybar --set "$NAME" label="$(bar_date)" icon=" "

View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
if [[ -x "$(command -v ddate)" ]]; then
ddate +'%{%A, %b %d%}'
else
date +'%A, %b %d'
fi