From b8f8be3d5ffd09af9caa434dd56880f2bc60be13 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Mon, 29 Jul 2024 21:59:53 -0400 Subject: [PATCH] home/waybar: improve idle inhibitor --- homeManagerModules/apps/waybar/default.nix | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/homeManagerModules/apps/waybar/default.nix b/homeManagerModules/apps/waybar/default.nix index 8a60420e..a911c1f6 100644 --- a/homeManagerModules/apps/waybar/default.nix +++ b/homeManagerModules/apps/waybar/default.nix @@ -111,13 +111,23 @@ Draw: {power} watts.''; }; - "inhibitor" = { - "what" = "sleep"; + "idle_inhibitor" = { "format" = "{icon}"; + "format-icons" = { "activated" = "󰅶"; "deactivated" = "󰾪"; }; + + "timeout" = 45; + + "tooltip-format-activated" = '' + Sleep inhibited. + System will not sleep.''; + + "tooltip-format-deactivated" = '' + Sleep uninhibited. + System will sleep normally.''; }; "bluetooth" = { @@ -193,7 +203,7 @@ "group/hardware" = { "orientation" = "horizontal"; - modules = ["pulseaudio" "bluetooth" "network" "power-profiles-daemon" "battery" "inhibitor" "custom/logout"]; + modules = ["pulseaudio" "bluetooth" "network" "power-profiles-daemon" "battery" "idle_inhibitor" "custom/logout"]; }; }; }; @@ -248,7 +258,7 @@ #power-profiles-daemon, #pulseaudio, #wireplumber, - #inhibitor, + #idle_inhibitor, #custom-logout, #custom-menu, #custom-sway-close,