From db9600c93978e2a3a9f5033814d43fed37be8959 Mon Sep 17 00:00:00 2001 From: Lev Babiev Date: Sun, 6 Feb 2022 16:31:41 +0000 Subject: [PATCH] idle inhibitor widget --- config/idle.widget | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 config/idle.widget diff --git a/config/idle.widget b/config/idle.widget new file mode 100644 index 00000000..be7c4bb9 --- /dev/null +++ b/config/idle.widget @@ -0,0 +1,24 @@ +function("ToggleInhibitor") { + [!IdleInhibit] IdleInhibit "on" + [!IdleInhibit] SetValue "icons/misc/lock.svg" + [!IdleInhibit] SetTooltip "Idle Inhibit: On" + [IdleInhibit] IdleInhibit "off" + [IdleInhibit] SetValue "icons/misc/unlock.svg" + [IdleInhibit] SetTooltip "Idle Inhibit: Off" +} + +layout { + button { + style = "idle_inhibit" + value = "icons/misc/unlock.svg" + action[0] = Function "ToggleInhibitor" + action[1] = Function "ToggleInhibitor" + } +} + +#CSS + +button#mpd, button#mpd *, button#mpd ** { + -GtkWidget-hexpand: true; + -GtkWidget-vexpand: true; +}