New backup 2025-03-04 00:00:01
This commit is contained in:
parent
9d2cf90ba0
commit
d0ecf453a8
3 changed files with 16 additions and 2 deletions
|
@ -41,9 +41,12 @@
|
||||||
(button :onclick 'blueman-manager'
|
(button :onclick 'blueman-manager'
|
||||||
""))
|
""))
|
||||||
|
|
||||||
(defvar inhibit_active false)
|
(defpoll inhibit_active :initial false
|
||||||
|
:interval "5s"
|
||||||
|
"scripts/inhibit-status")
|
||||||
|
|
||||||
(defwidget idleinhibit []
|
(defwidget idleinhibit []
|
||||||
(button :onclick 'notify-send "test"'
|
(button :onclick {inhibit_active ? 'killall eww-idle-inhibit' : 'scripts/eww-idle-inhibit'}
|
||||||
:class {inhibit_active ? "active" : ""}
|
:class {inhibit_active ? "active" : ""}
|
||||||
{inhibit_active ? "" : ""}))
|
{inhibit_active ? "" : ""}))
|
||||||
|
|
||||||
|
|
3
de/home/.config/eww/scripts/eww-idle-inhibit
Executable file
3
de/home/.config/eww/scripts/eww-idle-inhibit
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
systemd-inhibit sleep infinity
|
8
de/home/.config/eww/scripts/inhibit-status
Executable file
8
de/home/.config/eww/scripts/inhibit-status
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
inhibit_active=false
|
||||||
|
if pgrep eww-idle-inhibi;then
|
||||||
|
inhibit_active=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf '%s' "${inhibit_active}"
|
Loading…
Add table
Reference in a new issue