aboutsummaryrefslogtreecommitdiffstats
path: root/.local/bin/sct-daemon
diff options
context:
space:
mode:
authorEugene Triguba <hello@eugenetriguba.com>2025-12-20 10:53:14 -0500
committerEugene Triguba <hello@eugenetriguba.com>2025-12-20 10:54:02 -0500
commit7b6dbb921650e2a52929f025b67be57609fda6d4 (patch)
tree895416312698cfe4ac61d4eed0f071d7743c0214 /.local/bin/sct-daemon
parentRemove openbsd conditional in zsh (diff)
downloaddotfiles-7b6dbb921650e2a52929f025b67be57609fda6d4.zip
Rework dotfiles to *only* contain dotfiles
Diffstat (limited to '.local/bin/sct-daemon')
-rwxr-xr-x.local/bin/sct-daemon18
1 files changed, 18 insertions, 0 deletions
diff --git a/.local/bin/sct-daemon b/.local/bin/sct-daemon
new file mode 100755
index 0000000..b16a67e
--- /dev/null
+++ b/.local/bin/sct-daemon
@@ -0,0 +1,18 @@
+#!/bin/sh
+set -e
+
+while true; do
+ hour=$(date +%H)
+
+ if [ "$hour" -ge 6 ] && [ "$hour" -lt 18 ]; then
+ sct 6500 # day
+ elif [ "$hour" -ge 18 ] && [ "$hour" -lt 20 ]; then
+ sct 4500 # evening
+ elif [ "$hour" -ge 20 ] && [ "$hour" -lt 22 ]; then
+ sct 3500 # night
+ else
+ sct 3000 # late night/early morning
+ fi
+
+ sleep 600 # check every 10 minutes
+done