Start hyprsunset on demand instead of needing it to run constantly

This commit is contained in:
David Heinemeier Hansson
2025-08-05 16:25:08 +02:00
parent 881af9b7d6
commit d9efaac906
2 changed files with 7 additions and 2 deletions

View File

@@ -2,7 +2,13 @@
# Default temperature values
ON_TEMP=4000
OFF_TEMP=6500
OFF_TEMP=6000
# Ensure hyprsunset is running
if ! pgrep -x hyprsunset; then
setsid uwsm app -- hyprsunset &
sleep 1 # Give it time to register
fi
# Query the current temperature
CURRENT_TEMP=$(hyprctl hyprsunset temperature 2>/dev/null | grep -oE '[0-9]+')