tileos-settings-qtile/usr/share/qtile/scripts/idle-inhibit

29 lines
527 B
Bash
Executable file

#!/bin/bash
# Qtile idle-inhibitor toggle
function toggle {
if pgrep -f "wayland-idle-inhibitor" > /dev/null
then
pkill -f wayland-idle-inhibitor
notify-send -r 5556 -u normal " Screensaver Disabled"
else
/usr/bin/wayland-idle-inhibitor.py &
notify-send -r 5556 -u normal " Screensaver Enabled"
fi
}
case $1 in
toggle)
toggle
;;
*)
if pgrep -f "wayland-idle-inhibitor" > /dev/null
then
icon=""
else
icon=""
fi
printf "%s" "$icon"
;;
esac