Skip to content

Commit 47516ae

Browse files
author
developer
committed
screensaver: further optimize, single dispatch per monitor
1 parent 10264e7 commit 47516ae

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

bin/omarchy-launch-screensaver

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,28 @@ fi
1818
# Silently quit Walker on overlay
1919
walker -q
2020

21+
rules() {
22+
# for now, omarchy-cmd-screensaver requires focus
23+
echo "[no_focus off;no_close_for 1000;monitor ${1-0};float;fullscreen;opacity 0.5]"
24+
}
2125
terminal=$(xdg-terminal-exec --print-id)
2226
for m in $(hyprctl monitors -j | jq 'sort_by(.focused == true)' | jq -r '.[] |.name'); do
2327
case $terminal in
2428
*Alacritty*)
25-
hyprctl dispatch exec -- [monitor "$m"] \
29+
hyprctl dispatch exec -- "$(rules "$m")" \
2630
alacritty --class=org.omarchy.screensaver \
2731
--config-file ~/.local/share/omarchy/default/alacritty/screensaver.toml \
2832
-e omarchy-cmd-screensaver
2933
;;
3034
*ghostty*)
31-
hyprctl dispatch exec -- [monitor "$m"] \
35+
hyprctl dispatch exec -- "$(rules "$m")" \
3236
ghostty --class=org.omarchy.screensaver \
3337
--config-file=~/.local/share/omarchy/default/ghostty/screensaver \
3438
--font-size=18 \
3539
-e omarchy-cmd-screensaver
3640
;;
3741
*kitty*)
38-
hyprctl dispatch exec -- [monitor "$m"] \
42+
hyprctl dispatch exec -- "$(rules "$m")" \
3943
kitty --class=org.omarchy.screensaver \
4044
--override font_size=18 \
4145
--override window_padding_width=0 \

0 commit comments

Comments
 (0)