mirror of
https://github.com/XNM1/linux-nixos-hyprland-config-dotfiles.git
synced 2025-09-15 09:45:58 +03:00

- 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
28 lines
553 B
Fish
28 lines
553 B
Fish
function night_mode_temp_down
|
|
set target_process hyprsunset
|
|
set temp_file ~/.cache/hyprsunset_temp
|
|
set decrement 100
|
|
|
|
if not pgrep $target_process >/dev/null
|
|
return
|
|
end
|
|
|
|
if test -f $temp_file
|
|
set current_temp (cat $temp_file)
|
|
else
|
|
set current_temp 4000
|
|
end
|
|
|
|
set new_temp (math $current_temp - $decrement)
|
|
|
|
if test $new_temp -lt 2000
|
|
set new_temp 2000
|
|
end
|
|
|
|
echo $new_temp >$temp_file
|
|
|
|
killall -s SIGINT $target_process
|
|
sleep 0.5
|
|
$target_process -t $new_temp
|
|
end
|