Launch the screensaver on all monitors not just the focused one. We

also have to kill the screensaver across all monitors when we exit in
omarch-cmd-screensaver.
This commit is contained in:
Uriah Welcome
2025-08-02 19:49:33 -04:00
parent 5fda6054ce
commit cb79065e5d
2 changed files with 16 additions and 4 deletions

View File

@ -1,5 +1,17 @@
#!/bin/bash
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
# exit early if screensave is already running
pgrep -f "alacritty --class Screensaver" && exit 0
focused=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true).name')
for m in $(hyprctl monitors -j | jq -r '.[] | .name'); do
hyprctl dispatch focusmonitor $m
hyprctl dispatch exec -- \
alacritty --class Screensaver --title Screensaver \
-o 'colors.primary.background="#000000"' \
-o 'colors.cursor.cursor="#000000"' \
-e ~/.local/share/omarchy/bin/omarchy-cmd-screensaver
done
hyprctl dispatch focusmonitor $focused