1
0
mirror of https://github.com/XNM1/linux-nixos-hyprland-config-dotfiles.git synced 2025-09-15 09:45:58 +03:00
Files
linux-nixos-hyprland-config…/home/.config/fish/functions/night_mode_temp_up.fish
xnm 82aebc8cff 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
2025-08-24 03:06:11 +03:00

28 lines
551 B
Fish

function night_mode_temp_up
set target_process hyprsunset
set temp_file ~/.cache/hyprsunset_temp
set increment 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 + $increment)
if test $new_temp -gt 6500
set new_temp 6500
end
echo $new_temp >$temp_file
killall -s SIGINT $target_process
sleep 0.5
$target_process -t $new_temp
end