summary refs log tree commit diff
path: root/home/.local/bin/clock
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-02-08 17:24:30 -0500
committerJune McEnroe <june@causal.agency>2021-02-08 17:24:30 -0500
commit467c516727393b5df32ae17f56dbb4413ea7b909 (patch)
tree8e9fff30aff9fa1210d3bc10d2c0c7473415ce3e /home/.local/bin/clock
parentUse 4M- for window resizing in cwm (diff)
downloadsrc-467c516727393b5df32ae17f56dbb4413ea7b909.tar.gz
src-467c516727393b5df32ae17f56dbb4413ea7b909.zip
Only update clock script every minute
Diffstat (limited to 'home/.local/bin/clock')
-rwxr-xr-xhome/.local/bin/clock4
1 files changed, 3 insertions, 1 deletions
diff --git a/home/.local/bin/clock b/home/.local/bin/clock
index 4f5c8561..33a0e890 100755
--- a/home/.local/bin/clock
+++ b/home/.local/bin/clock
@@ -2,7 +2,9 @@
 set -eu
 
 tput civis
+sleep=$(( 60 - $(date +'%S') ))
 while :; do
 	printf '%3s%% %s' "$(apm -l)" "$(date +'%a %H:%M')"
-	sleep 10
+	sleep $sleep
+	sleep=60
 done