Remove redundant Hyprland launch wrapper

With initial workspace tracking disabled, windows naturally open on the active workspace. Remove the explicit Hyprland workspace dispatch and let shell actions, shell restarts, and presentation terminals launch directly.
This commit is contained in:
David Heinemeier Hansson
2026-07-19 17:36:34 -07:00
parent 146f73bf85
commit d4d1b518e0
11 changed files with 21 additions and 135 deletions
-30
View File
@@ -1,30 +0,0 @@
#!/bin/bash
# omarchy:summary=Launch a command on the active Hyprland workspace
# omarchy:args=<command>
cmd="$*"
[[ -n $cmd ]] || exit 0
lua_quote() {
local value=$1
value=${value//\\/\\\\}
value=${value//\"/\\\"}
value=${value//$'\n'/\\n}
printf '"%s"' "$value"
}
active_workspace() {
hyprctl activeworkspace -j 2>/dev/null | jq -r '.name // .id // empty' 2>/dev/null
}
if [[ -n ${HYPRLAND_INSTANCE_SIGNATURE:-} ]] && omarchy-cmd-present hyprctl && omarchy-cmd-present jq; then
workspace="$(active_workspace)"
# hyprctl dispatch exits 0 even on Lua errors, so check for "ok" output.
if [[ -n $workspace && $(hyprctl dispatch "function() hl.exec_cmd($(lua_quote "$cmd"), { workspace = $(lua_quote "$workspace") }) end" 2>/dev/null) == ok ]]; then
exit 0
fi
fi
exec bash -lc "$cmd"
@@ -6,13 +6,4 @@
cmd="$*"
presentation_script="omarchy-show-logo; $cmd; if (( \$? != 130 )); then omarchy-show-done; fi"
shell_quote() {
local value=$1
printf "'"
printf "%s" "$value" | sed "s/'/'\\\\''/g"
printf "'"
}
terminal_command="setsid uwsm-app -- xdg-terminal-exec --app-id=org.omarchy.terminal --title=Omarchy -e bash -c $(shell_quote "$presentation_script")"
exec omarchy-hyprland-launch "$terminal_command"
exec setsid uwsm-app -- xdg-terminal-exec --app-id=org.omarchy.terminal --title=Omarchy -e bash -c "$presentation_script"
+1 -2
View File
@@ -28,8 +28,7 @@ if (( attempt == 50 )); then
exit 1
fi
printf -v launch_command 'setsid quickshell -n -p %q >/dev/null 2>&1 &' "$CONFIG_DIR"
omarchy-hyprland-launch "$launch_command"
setsid quickshell -n -p "$CONFIG_DIR" >/dev/null 2>&1 &
for (( attempt = 0; attempt < 20; attempt++ )); do
OMARCHY_SHELL_IPC_TIMEOUT=0.5s omarchy-shell shell ping >/dev/null 2>&1 && exit 0