Use Omarchy command helpers consistently
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
# omarchy:summary=Launch the Omarchy screensaver in the default terminal on the system with the correct font configuration.
|
||||
|
||||
if ! command -v tte &>/dev/null; then
|
||||
if omarchy-cmd-missing tte; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -22,7 +22,8 @@ hypr_focus_monitor() {
|
||||
}
|
||||
|
||||
hypr_exec() {
|
||||
local command="$1"
|
||||
local command
|
||||
printf -v command '%q ' "$@"
|
||||
|
||||
hyprctl dispatch "hl.dsp.exec_cmd([[$command]])" >/dev/null 2>&1 || hyprctl dispatch exec -- bash -lc "$command" >/dev/null
|
||||
}
|
||||
@@ -32,16 +33,16 @@ for m in $(hyprctl monitors -j | jq -r '.[] | .name'); do
|
||||
|
||||
case $terminal in
|
||||
*Alacritty*)
|
||||
hypr_exec "alacritty --class=org.omarchy.screensaver --config-file $OMARCHY_PATH/default/alacritty/screensaver.toml -e omarchy-screensaver"
|
||||
hypr_exec alacritty --class=org.omarchy.screensaver --config-file "$OMARCHY_PATH/default/alacritty/screensaver.toml" -e omarchy-screensaver
|
||||
;;
|
||||
*ghostty*)
|
||||
hypr_exec "ghostty --class=org.omarchy.screensaver --config-file=$OMARCHY_PATH/default/ghostty/screensaver --font-size=18 -e omarchy-screensaver"
|
||||
hypr_exec ghostty --class=org.omarchy.screensaver --config-file="$OMARCHY_PATH/default/ghostty/screensaver" --font-size=18 -e omarchy-screensaver
|
||||
;;
|
||||
*foot*)
|
||||
hypr_exec "foot --app-id=org.omarchy.screensaver --config=\"$OMARCHY_PATH/default/foot/screensaver.ini\" -e omarchy-screensaver"
|
||||
hypr_exec foot --app-id=org.omarchy.screensaver --config="$OMARCHY_PATH/default/foot/screensaver.ini" -e omarchy-screensaver
|
||||
;;
|
||||
*kitty*)
|
||||
hypr_exec "kitty --class=org.omarchy.screensaver --override font_size=18 --override window_padding_width=0 -e omarchy-screensaver"
|
||||
hypr_exec kitty --class=org.omarchy.screensaver --override font_size=18 --override window_padding_width=0 -e omarchy-screensaver
|
||||
;;
|
||||
*)
|
||||
omarchy-notification-send -g ✋ "Screensaver only runs in Alacritty, Foot, Ghostty, or Kitty"
|
||||
|
||||
Reference in New Issue
Block a user