I'm a fan of eye comfort in the dark, so I started researching options for Arch. Landed on wl-gammarelay package, works like a charm, and even has waybar configuration examples! However, I'm apparently missing something.
The config example looks like this:
...
"modules-right": ["custom/wl-gammarelay-temperature"],
"custom/wl-gammarelay-temperature": {
"format": "{} ",
"exec": "wl-gammarelay --subscribe Temperature",
"on-scroll-up": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateTemperature n +100",
"on-scroll-down": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateTemperature n -100"
},
...
First of all, the exec command doesn't work (when ran manually, returns "Failed to add match: Invalid match rule"), so I came up with something of my own:
...
"format": "{}K ",
"exec": "busctl --user introspect rs.wl-gammarelay / rs.wl.gammarelay | grep 'Temperature' | tail -n 1 | cut -d ' ' -f 19",
...
and it outputs the target result (see the screenshot below). But there's a problem: it's static. It's ran on the startup of waybar, it indeed grabs the current temperature, it even responds to scroll-up and scroll-down events, as well as keybinds which I configured for Hyprland. But in the current state it doesn't update on the bar.