mirror of
https://github.com/basecamp/omarchy.git
synced 2025-08-03 23:29:23 +00:00

* install hyprsunset when installing other hypr packages * add hyprsunset to autostart * add default hyprsunset config to make it do nothing by default * waybar: add hyprsunset shortcut next to bluetooth shortcut to quickly toggle blue light filtering * waybar: fix icon switching for hyprsunset widget * add migration for hyprsunset * waybar: rename "Blue Light Filter" to "Nightlight" * waybar: make nightlight module appear next to bluetooth module * waybar: do not include nightlight module by default * add omarchy-toggle-nightlight script * add default keybinding for toggling hyprsunset nightlight (SUPER + CTRL + N) * waybar: remove nightlight module from config entirely * waybar: remove nightlight from css * update hyprsunset migration to skip yay install if already installed * omarchy-toggle-nightlight: use `omarchy-restart-waybar` script instead of pkill with -SIG * omarchy-toggle-nightlight: only restart waybar if nightlight is in the waybar config --------- Co-authored-by: David Heinemeier Hansson <david@hey.com>
22 lines
725 B
Bash
Executable File
22 lines
725 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Default temperature values
|
|
ON_TEMP=4000
|
|
OFF_TEMP=6500
|
|
|
|
# Query the current temperature
|
|
CURRENT_TEMP=$(hyprctl hyprsunset temperature 2>/dev/null | grep -oE '[0-9]+')
|
|
|
|
if [[ "$CURRENT_TEMP" == "$OFF_TEMP" ]]; then
|
|
hyprctl hyprsunset temperature $ON_TEMP
|
|
notify-send " Nightlight On"
|
|
if grep -q "custom/nightlight" ~/.config/waybar/config.jsonc; then
|
|
omarchy-restart-waybar # restart waybar in case user has waybar module for hyprsunset
|
|
fi
|
|
else
|
|
hyprctl hyprsunset temperature $OFF_TEMP
|
|
notify-send " Nightlight Off"
|
|
if grep -q "custom/nightlight" ~/.config/waybar/config.jsonc; then
|
|
omarchy-restart-waybar # restart waybar in case user has waybar module for hyprsunset
|
|
fi
|
|
fi |