Waybar integration for hyprsunset, featuring configurable gamma and temperature limits with persistent settings saved between sessions.
This behavior can alternatively be achieved using direct Waybar actions, such as:
hyprctl hyprsunset gamma +10 # on-scroll-up
hyprctl hyprsunset gamma -10 # on-scroll-downYou can configure the brightness and blue light filter by scrolling through the icons.
preview.mp4
git clone https://github.com/MatheusBrunheroto/Waybar-Light-Controls.git
cd Waybar-Light-Controls
chmod +x install.sh
./install.shThe install.sh script will:
- Create directories under
~/.config/hyprand~/.config/waybar. - If the
scriptsdirectory does not exist, it will be created along with awaybar-light-controlssubdirectory. - Move the repository files into their respective configuration directories.
Add the following blocks to your Waybar configuration file under the desired section (modules-left, modules-center, or modules-right):
"custom/light":{
"format": "{icon} ",
"format-source": "{icon} ",
"tooltip": false,
"format-icons": ["●"],
"on-scroll-up": "bash ~/.config/waybar/scripts/waybar-light-controls/light_control.sh up",
"on-scroll-down": "bash ~/.config/waybar/scripts/waybar-light-controls/light_control.sh down",
},
"custom/temperature":{
"format": "{icon} ",
"format-source": "{icon} ",
"tooltip": false,
"format-icons": ["○"],
"on-scroll-up": "bash ~/.config/waybar/scripts/waybar-light-controls/temperature_control.sh up",
"on-scroll-down": "bash ~/.config/waybar/scripts/waybar-light-controls/temperature_control.sh down",
},After editing your config, restart Waybar or reload it:
pkill waybar && waybar &To ensure the system initializes with the previously saved gamma and temperature settings, add the following line to your ~/.config/hypr/hyprland.conf file:
exec-once = ~/.config/hypr/scripts/waybar-light-controls/hyprsunset_init.shThis command will restore the values stored in default_light.conf and default_temperature.conf during startup.
hyprsunset must be installed for these scripts to function properly.
yay -S hyprsunset