diff --git a/bin/omarchy-launch-screensaver b/bin/omarchy-launch-screensaver index a5736c3..4617044 100755 --- a/bin/omarchy-launch-screensaver +++ b/bin/omarchy-launch-screensaver @@ -1,5 +1,5 @@ #!/bin/bash -pkill -f "alacritty --class Screensaver" || +pgrep -f "alacritty --class Screensaver" || alacritty --class Screensaver --title Screensaver -o 'colors.primary.background="#000000"' \ -o 'colors.cursor.cursor="#000000"' -e ~/.local/share/omarchy/bin/omarchy-cmd-screensaver diff --git a/bin/omarchy-refresh-hypridle b/bin/omarchy-refresh-hypridle new file mode 100755 index 0000000..0e1600c --- /dev/null +++ b/bin/omarchy-refresh-hypridle @@ -0,0 +1,6 @@ +#!/bin/bash + +omarchy-refresh-config hypr/hypridle.conf +pkill -x hypridle +uwsm app -- hypridle >/dev/null 2>&1 & + diff --git a/config/hypr/hypridle.conf b/config/hypr/hypridle.conf index a7eaaf1..5a1e016 100644 --- a/config/hypr/hypridle.conf +++ b/config/hypr/hypridle.conf @@ -5,6 +5,11 @@ general { on_unlock_cmd = omarchy-restart-waybar # prevent stacking of waybar when waking } +listener { + timeout = 60 # 1min + on-timeout = omarchy-launch-screensaver # start screensaver +} + listener { timeout = 300 # 5min on-timeout = loginctl lock-session # lock screen when timeout has passed diff --git a/migrations/1754136581.sh b/migrations/1754136581.sh new file mode 100644 index 0000000..2f59425 --- /dev/null +++ b/migrations/1754136581.sh @@ -0,0 +1,5 @@ +echo "Start screensaver automatically after 1 minute" + +if ! grep -q "omarchy-launch-screensaver" ~/.config/hypr/hypridle.conf; then + omarchy-refresh-hypridle +fi