[Bug] Night mode not working with wlsunset
Description
When toggling Night Mode on, nothing happens.
Error Messages/Logs
I believe the issue is that wlsunset and redshift require location data in order to calculate the needed times. Perhaps UI can be added to enable entry of latitude/longitude as well as an option to adjust day/night tint levels.
If I run wlsunset -t 3000 from the terminal, I get the following message and no tinting:
❯ wlsunset -t 3000
registry: adding output 41
calculated sun trajectory: midnight sun
setting temperature to 6500 K
If I add lat/long it works as expected.
❯ wlsunset -l 43.7 -L -79.3 -t 3000
registry: adding output 41
calculated sun trajectory: dawn 05:43, sunrise 06:34, sunset 20:10, dusk 21:01
setting temperature to 3000 K
I re-worked it to use gammastep instead of wlsunset which is more appropriate. It has IPCs ipc call night toggle ipc call night temperature 5000` and a setting to change the temperature.
I think it's more appropriate in the context of the quickshell versus the daemons that run and change gamma throughout the day. Though for that, sunsetr looks pretty good.
Makes sense. I can confirm it's working well on my system with gammastep installed. 👍🏼
If it's going to be a manual toggle, then perhaps it's worth coming up with an easier way to toggle it? It currently takes 4 clicks to toggle it on/off. Just a thought.
You can use the IPC, that'd be the quickest way
qs -c DankMaterialShellGit ipc call night toggle
bind it to a key in niri:
Mod+Shift+N allow-when-locked=true {
spawn "qs" "-c" "DankMaterialShellGit" "ipc" "call" "night" "toggle";
}
you also have the ipc for enable/disable/temperature so if you wanted to bind a cron job to activate night mode at 7pm or something that is possible via a crontab rule.
Fair enough, I was thinking more in terms of gui for less experienced users. I honestly think that DankMaterialShell would be a perfect default bar for Niri over waybar due to the simple configuration (plus it's beautiful!). Easy to get up and running.
Instead of a keybind, I would probably just have niri spawn wlsunset or gammastep with my lat/long and just let it manage the tint automatically, but then the gui setting would be redundant. Anyways, keep up the amazing work my friend.