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 ? "󰈈" : "󰛑"}))))

View file

@ -4,5 +4,3 @@ if pkill -0 -f wayland-idle-inhibitor; then
else
wayland-idle-inhibitor &
fi
# TODO: Uncomment when force-poll feature is merged
# eww poll idleinhibit

View file

@ -1,4 +1,4 @@
{ pkgs, lib, config, ... }:
{ pkgs, lib, config, eww, ... }:
{
home.packages = with pkgs; [
wl-clipboard
@ -127,6 +127,7 @@
# EWW
programs.eww.enable = true;
programs.eww.package = eww.packages.${pkgs.system}.eww;
programs.eww.configDir = ./eww;
systemd.user.services.eww =