diff --git a/.local/bin/statusbar/clock b/.local/bin/statusbar/clock index d25e8d00..4da872ad 100755 --- a/.local/bin/statusbar/clock +++ b/.local/bin/statusbar/clock @@ -1,5 +1,11 @@ #!/bin/sh +# Refresh clock at exactly 00 seconds +refresh(){ + sleep $((60-$(date "+%S"))) + kill -35 $(pidof dwmblocks) +} + clock=$(date '+%I') case "$clock" in @@ -27,3 +33,4 @@ case $BLOCK_BUTTON in esac date "+%Y %b %d (%a) $icon%I:%M%p" +refresh &