mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Make screensaver work with xdg-terminal-exec
This commit is contained in:
@@ -5,8 +5,8 @@ if ! command -v tte &>/dev/null; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Exit early if screensave is already running
|
||||
pgrep -f "alacritty --class Screensaver" && exit 0
|
||||
# Exit early if screensaver is already running
|
||||
pgrep -f "omarchy-cmd-screensaver" && exit 0
|
||||
|
||||
# Allow screensaver to be turned off but also force started
|
||||
if [[ -f ~/.local/state/omarchy/toggles/screensaver-off ]] && [[ $1 != "force" ]]; then
|
||||
@@ -18,11 +18,9 @@ focused=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true).name')
|
||||
for m in $(hyprctl monitors -j | jq -r '.[] | .name'); do
|
||||
hyprctl dispatch focusmonitor $m
|
||||
|
||||
# FIXME: Find a way to make this generic where we it can work for kitty + ghostty
|
||||
hyprctl dispatch exec -- \
|
||||
alacritty --class Screensaver \
|
||||
--config-file ~/.local/share/omarchy/default/alacritty/screensaver.toml \
|
||||
-e omarchy-cmd-screensaver
|
||||
xdg-terminal-exec --app-id=com.omarchy.screensaver \
|
||||
omarchy-cmd-screensaver
|
||||
done
|
||||
|
||||
hyprctl dispatch focusmonitor $focused
|
||||
|
||||
Reference in New Issue
Block a user