mirror of
https://github.com/XNM1/linux-nixos-hyprland-config-dotfiles.git
synced 2025-09-15 09:45:58 +03:00
feat(night-mode): 🌙 Switch from wlsunset to hyprsunset and add temperature control
- Replace wlsunset with hyprsunset for better Hyprland integration - Add temperature adjustment functions with scroll support in Waybar - Implement persistent temperature storage in `~/.cache/hyprsunset_temp` - Add temperature bounds (2000K-6500K) with 100K increment/decrement steps - Update NixOS configuration to include hyprsunset package Fixes temperature persistence and improves Hyprland compatibility
This commit is contained in:
@@ -1,9 +1,16 @@
|
||||
function night_mode_toggle
|
||||
set target_process wlsunset
|
||||
set target_process hyprsunset
|
||||
set temp_file ~/.cache/hyprsunset_temp
|
||||
|
||||
if pgrep $target_process >/dev/null
|
||||
killall -s SIGINT wlsunset
|
||||
killall -s SIGINT $target_process
|
||||
else
|
||||
wlsunset
|
||||
if test -f $temp_file
|
||||
set temp (cat $temp_file)
|
||||
else
|
||||
set temp 4000
|
||||
echo $temp >$temp_file
|
||||
end
|
||||
$target_process -t $temp
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user