(defvar inhibit_active false) (defwidget idleinhibit [] (button :onclick {inhibit_active ? 'killall eww-idle-inhibit;eww update inhibit_active=false' : 'systemd-inhibit --what="idle" --mode="block" scripts/bar/eww-idle-inhibit & eww update inhibit_active=true'} :class {inhibit_active ? "active" : ""} {inhibit_active ? "" : ""}))