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 # Default temperature values
ON_TEMP=4000 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 # Query the current temperature
CURRENT_TEMP=$(hyprctl hyprsunset temperature 2>/dev/null | grep -oE '[0-9]+') CURRENT_TEMP=$(hyprctl hyprsunset temperature 2>/dev/null | grep -oE '[0-9]+')

View File

@ -2,7 +2,6 @@ exec-once = uwsm app -- hypridle
exec-once = uwsm app -- mako exec-once = uwsm app -- mako
exec-once = uwsm app -- waybar exec-once = uwsm app -- waybar
exec-once = uwsm app -- fcitx5 exec-once = uwsm app -- fcitx5
exec-once = uwsm app -- hyprsunset
exec-once = uwsm app -- swaybg -i ~/.config/omarchy/current/background -m fill exec-once = uwsm app -- swaybg -i ~/.config/omarchy/current/background -m fill
exec-once = uwsm app -- swayosd-server exec-once = uwsm app -- swayosd-server
exec-once = uwsm app -- walker --gapplication-service exec-once = uwsm app -- walker --gapplication-service