aboutsummaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorJustine Smithies <justine@smithies.me.uk>2024-02-28 21:52:12 +0000
committerJustine Smithies <justine@smithies.me.uk>2024-02-28 21:52:12 +0000
commit57bf5223fb803f9715b98fb796a8f86829811179 (patch)
treeb3aae8357d86052431ae3dd252b3cb9ab7d77f65 /.config
parent82759ea93b02b691c77dd723bf709f49f7745a5b (diff)
Modified to trial hypridle in place of swayidle.
Diffstat (limited to '.config')
-rwxr-xr-x.config/eww/scripts/idleinhibit.sh40
-rw-r--r--.config/hypr/hypridle.conf19
-rw-r--r--.config/hypr/hyprland.conf4
3 files changed, 54 insertions, 9 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
-
diff --git a/.config/hypr/hypridle.conf b/.config/hypr/hypridle.conf
new file mode 100644
index 0000000..786177b
--- /dev/null
+++ b/.config/hypr/hypridle.conf
@@ -0,0 +1,19 @@
+general {
+ lock_cmd =
+ unlock_cmd =
+ before_sleep_cmd =
+ after_sleep_cmd =
+ ignore_dbus_inhibit = false
+}
+
+listener {
+ timeout = 300
+ on-timeout = hyprlock
+ on-resume =
+}
+
+listener {
+ timeout = 600
+ on-timeout = hyprctl dispatch dpms off
+ on-resume = hyprctl dispatch dpms on
+}
diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf
index d90d1db..d5eb6e8 100644
--- a/.config/hypr/hyprland.conf
+++ b/.config/hypr/hyprland.conf
@@ -27,8 +27,8 @@ exec = ~/.config/hypr/scripts/wallpaper.sh
exec-once = ~/.config/eww/scripts/monitor.sh
exec = ~/.config/eww/scripts/start.sh
# exec-once = swayidle timeout 300 'swaylock -f -i ~/.cache/wallpaper --effect-blur 10x5 --clock --indicator --datestr "%a %d %b %Y"' timeout 600 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on'
-exec-once = swayidle timeout 300 'hyprlock' timeout 600 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on'
-
+#exec-once = swayidle timeout 300 'hyprlock' timeout 600 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on'
+exec-once = hypridle
exec-once = hyprctl dispatcher focusmonitor 1
# source a file (multi-file configs)