mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
* feat: fullscreen for ghostty/kitty screensaver * feat: add ghostty screensaver config * Remove the extra two bottom lines as well --------- Co-authored-by: David Heinemeier Hansson <david@hey.com>
50 lines
1.3 KiB
Bash
Executable File
50 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Exit early if we don't have the tte show
|
|
if ! command -v tte &>/dev/null; then
|
|
exit 1
|
|
fi
|
|
|
|
# Exit early if screensave is already running
|
|
pgrep -f org.omarchy.screensaver && exit 0
|
|
|
|
# Allow screensaver to be turned off but also force started
|
|
if [[ -f ~/.local/state/omarchy/toggles/screensaver-off ]] && [[ $1 != "force" ]]; then
|
|
exit 1
|
|
fi
|
|
|
|
focused=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true).name')
|
|
terminal=$(xdg-terminal-exec --print-id)
|
|
|
|
for m in $(hyprctl monitors -j | jq -r '.[] | .name'); do
|
|
hyprctl dispatch focusmonitor $m
|
|
|
|
case $terminal in
|
|
*Alacritty*)
|
|
hyprctl dispatch exec -- \
|
|
alacritty --class=org.omarchy.screensaver \
|
|
--config-file ~/.local/share/omarchy/default/alacritty/screensaver.toml \
|
|
-e omarchy-cmd-screensaver
|
|
;;
|
|
*ghostty*)
|
|
hyprctl dispatch exec -- \
|
|
ghostty --class=org.omarchy.screensaver \
|
|
--config-file=~/.local/share/omarchy/default/ghostty/screensaver \
|
|
--font-size=18 \
|
|
-e omarchy-cmd-screensaver
|
|
;;
|
|
*kitty*)
|
|
hyprctl dispatch exec -- \
|
|
kitty --class=org.omarchy.screensaver \
|
|
--override font_size=18 \
|
|
--override window_padding_width=0 \
|
|
-e omarchy-cmd-screensaver
|
|
;;
|
|
*)
|
|
notify-send "✋ Screensaver only runs in Alacritty, Ghostty, or Kitty"
|
|
;;
|
|
esac
|
|
done
|
|
|
|
hyprctl dispatch focusmonitor $focused
|