mirror of
https://github.com/basecamp/omarchy.git
synced 2025-08-03 23:29:23 +00:00
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:
@ -10,6 +10,7 @@ if command -v tte &>/dev/null; then
|
|||||||
while pgrep tte >/dev/null; do
|
while pgrep tte >/dev/null; do
|
||||||
if read -n 1 -t 0.01; then
|
if read -n 1 -t 0.01; then
|
||||||
pkill tte 2>/dev/null
|
pkill tte 2>/dev/null
|
||||||
|
pkill -f "alacritty --class Screensaver" 2>/dev/null
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -17,4 +18,3 @@ if command -v tte &>/dev/null; then
|
|||||||
else
|
else
|
||||||
gum spin --title "Can't find tte. Try: pip install terminaltexteffects" -- sleep 2
|
gum spin --title "Can't find tte. Try: pip install terminaltexteffects" -- sleep 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1,5 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
pgrep -f "alacritty --class Screensaver" ||
|
# exit early if screensave is already running
|
||||||
alacritty --class Screensaver --title Screensaver -o 'colors.primary.background="#000000"' \
|
pgrep -f "alacritty --class Screensaver" && exit 0
|
||||||
-o 'colors.cursor.cursor="#000000"' -e ~/.local/share/omarchy/bin/omarchy-cmd-screensaver
|
|
||||||
|
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
|
||||||
|
Reference in New Issue
Block a user