New backup 2025-03-04 00:00:01

This commit is contained in:
Penelope Gwen 2025-03-04 00:00:01 -08:00
parent 9d2cf90ba0
commit d0ecf453a8
3 changed files with 16 additions and 2 deletions

View file

@ -41,9 +41,12 @@
(button :onclick 'blueman-manager'
""))
(defvar inhibit_active false)
(defpoll inhibit_active :initial false
:interval "5s"
"scripts/inhibit-status")
(defwidget idleinhibit []
(button :onclick 'notify-send "test"'
(button :onclick {inhibit_active ? 'killall eww-idle-inhibit' : 'scripts/eww-idle-inhibit'}
:class {inhibit_active ? "active" : ""}
{inhibit_active ? "" : ""}))

View file

@ -0,0 +1,3 @@
#!/bin/bash
systemd-inhibit sleep infinity

View file

@ -0,0 +1,8 @@
#!/bin/bash
inhibit_active=false
if pgrep eww-idle-inhibi;then
inhibit_active=true
fi
printf '%s' "${inhibit_active}"