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:
parent
573412f167
commit
fff683e301
5 changed files with 79 additions and 6 deletions
76
flake.lock
generated
76
flake.lock
generated
|
|
@ -1,5 +1,41 @@
|
|||
{
|
||||
"nodes": {
|
||||
"eww": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1739720778,
|
||||
"narHash": "sha256-iA/OTtsymhuCMRDC0IJE7YXuCeFJbkuMwPaj7tAVbQw=",
|
||||
"owner": "elkowar",
|
||||
"repo": "eww",
|
||||
"rev": "5b4cc3e7a8055afb758421f4a114ef4032806e39",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "elkowar",
|
||||
"repo": "eww",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"locked": {
|
||||
"lastModified": 1709944340,
|
||||
"narHash": "sha256-xr54XK0SjczlUxRo5YwodibUSlpivS9bqHt8BNyWVQA=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "baa7aa7bd0a570b3b9edd0b8da859fee3ffaa4d4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"ref": "refs/pull/65/head",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
|
@ -69,6 +105,22 @@
|
|||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1725534445,
|
||||
"narHash": "sha256-Yd0FK9SkWy+ZPuNqUgmVPXokxDgMJoGuNpMEtkfcf84=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9bb1e7571aadf31ddb4af77fc64b2d59580f9a39",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1736344531,
|
||||
"narHash": "sha256-8YVQ9ZbSfuUk2bUf2KRj60NRraLPKPS0Q4QFTbc+c2c=",
|
||||
|
|
@ -86,15 +138,37 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"eww": "eww",
|
||||
"home-manager": "home-manager",
|
||||
"macos-hyprcursor-src": "macos-hyprcursor-src",
|
||||
"mobile-nixos": "mobile-nixos",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"sxmo": "sxmo",
|
||||
"tokyo-night-sddm-src": "tokyo-night-sddm-src"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"eww",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1725675754,
|
||||
"narHash": "sha256-hXW3csqePOcF2e/PYnpXj72KEYyNj2HzTrVNmS/F7Ug=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "8cc45e678e914a16c8e224c3237fb07cf21e5e54",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"sxmo": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ inputs = {
|
|||
|
||||
tokyo-night-sddm-src.url = "github:rototrash/tokyo-night-sddm";
|
||||
tokyo-night-sddm-src.flake = false;
|
||||
|
||||
macos-hyprcursor-src.url = "github:driedpampas/macOS-hyprcursor";
|
||||
macos-hyprcursor-src.flake = false;
|
||||
eww.url = "github:elkowar/eww";
|
||||
};
|
||||
outputs = { self,
|
||||
nixpkgs,
|
||||
|
|
|
|||
|
|
@ -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 ? "" : ""}))))
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue