aboutsummaryrefslogtreecommitdiff
path: root/.config/eww/scripts/idleinhibit.sh
diff options
context:
space:
mode:
Diffstat (limited to '.config/eww/scripts/idleinhibit.sh')
-rwxr-xr-x.config/eww/scripts/idleinhibit.sh40
1 files changed, 33 insertions, 7 deletions
diff --git a/.config/eww/scripts/idleinhibit.sh b/.config/eww/scripts/idleinhibit.sh
index e8ac78e..79f9ef0 100755
--- a/.config/eww/scripts/idleinhibit.sh
+++ b/.config/eww/scripts/idleinhibit.sh
@@ -1,14 +1,41 @@
#!/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
+
+# Hypridle toggle
function toggle {
- if pgrep "swayidle" > /dev/null
+ if pgrep "hypridle" > /dev/null
then
- pkill swayidle
- notify-send -r 5556 -u normal " Swayidle Inactive"
+ pkill hypridle
+ notify-send -r 5556 -u normal " Hypridle 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"
+ hypridle &
+ notify-send -r 5556 -u normal " Hypridle Active"
fi
}
@@ -17,7 +44,7 @@ case $1 in
toggle
;;
*)
- if pgrep "swayidle" > /dev/null
+ if pgrep "hypridle" > /dev/null
then
icon=""
else
@@ -26,4 +53,3 @@ case $1 in
printf "%s" "$icon "
;;
esac
-