fix: poll idle inhibitor on toggle

This requires the latest version of EWW, so that will be its own
input until nixpkgs catches up.
This commit is contained in:
Kiana Sheibani 2025-02-23 02:27:49 -05:00
parent 573412f167
commit fff683e301
Signed by: toki
GPG key ID: 6CB106C25E86A9F7
5 changed files with 79 additions and 6 deletions

View file

@ -234,7 +234,7 @@
"pgrep -c -f wayland\"\"-idle-inhibitor || true")
(defwidget bar_idleinhibit []
(eventbox :onclick "~/.config/eww/scripts/toggle-idle-inhibit"
(eventbox :onclick "scripts/toggle-idle-inhibit && ${EWW_CMD} poll idleinhibit"
(box :class "bar-idleinhibit ${idleinhibit > 0 ? "active" : ""}"
(label :text {idleinhibit > 0 ? "󰈈" : "󰛑"}))))