waybar: Add keepawake module

Shows if the pc will not automatically turn off screen or suspend.
Figures this out by checking for `swayidle` process, so that is
required. Turns on suspend again on click, and uses voidlinux `sv` user
service for it, so those have to be set up.
This commit is contained in:
Marty Oehme 2025-06-12 13:38:14 +02:00
parent 7447cb3354
commit 03f85fd958
Signed by: Marty
GPG key ID: 4E535BC19C61886E
3 changed files with 28 additions and 1 deletions

View file

@ -0,0 +1,9 @@
#!/usr/bin/env sh
status="idle-disabled"
if pgrep -x swayidle >/dev/null; then
status="idle-enabled"
fi
printf "{\"text\": \"\", \"alt\": \"%s\", \"tooltip\": \"\", \"class\": \"\"}" \
"$status"