fix(sketchybar,polybar): better fallback date
This commit is contained in:
parent
23af4dd3d4
commit
ada270d130
3 changed files with 9 additions and 3 deletions
|
@ -107,7 +107,7 @@ type = custom/script
|
||||||
interval = 60
|
interval = 60
|
||||||
|
|
||||||
# fall back to normie date if discordian date is not available
|
# 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}
|
format-foreground = ${colors.blue}
|
||||||
label = %output%
|
label = %output%
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
DATE="$(ddate +'%{%A, %b %d%}' | date +'%A, %b %d')"
|
sketchybar --set "$NAME" label="$(bar_date)" icon=" "
|
||||||
sketchybar --set "$NAME" label="$DATE" icon=" "
|
|
||||||
|
|
7
dot_local/bin/executable_bar_date
Normal file
7
dot_local/bin/executable_bar_date
Normal 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
|
Loading…
Reference in a new issue