From e2add462c0d66120867cdb7181a0d9c413f3e4c1 Mon Sep 17 00:00:00 2001 From: Justine Smithies Date: Tue, 6 Feb 2024 20:44:09 +0000 Subject: Initial commit of Eww config --- .config/eww/scripts/idleinhibit.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 .config/eww/scripts/idleinhibit.sh (limited to '.config/eww/scripts/idleinhibit.sh') diff --git a/.config/eww/scripts/idleinhibit.sh b/.config/eww/scripts/idleinhibit.sh new file mode 100755 index 0000000..e8ac78e --- /dev/null +++ b/.config/eww/scripts/idleinhibit.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# Swayidle toggle +function toggle { + if pgrep "swayidle" > /dev/null + then + pkill swayidle + notify-send -r 5556 -u normal " Swayidle Inactive" + else + swayidle timeout 300 'swaylock -F -i ~/.cache/wallpaper --effect-blur 10x5 --clock --indicator' timeout 600 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' & + notify-send -r 5556 -u normal " Swayidle Active" + fi +} + +case $1 in + toggle) + toggle + ;; + *) + if pgrep "swayidle" > /dev/null + then + icon="" + else + icon="" + fi + printf "%s" "$icon " + ;; +esac + -- cgit v1.2.3