Simplify shell restart around quickshell instance management
omarchy-restart-shell now kills by config dir via quickshell kill and relaunches with --no-duplicate, polling kill until every instance is gone since kill returns without waiting and -n silently exits if one remains. The locked-session refusal reads Hyprland monitor state alone, which covers a hung shell holding the lock; the redundant shell IPC probe, availability guards, and omarchy-shell path indirection are gone. Shell IPC calls now time out (2s default, OMARCHY_SHELL_IPC_TIMEOUT to override) so probing an unresponsive shell fails fast instead of hanging the caller. omarchy-hyprland-launch checks dispatch output for "ok" rather than the exit code, which is 0 even on Lua errors, so a failed dispatch falls through to the bash -lc fallback instead of silently launching nothing. The Quattro upgrade cutover delegates to omarchy-restart-shell instead of carrying its own copy of the lock check, pkill, and readiness loop. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3edf254a12
commit
17c8af3f14
6 files changed
+169
-113
No files matched your search
@@ -21,7 +21,8 @@ active_workspace() {
|
||||
|
||||
if [[ -n ${HYPRLAND_INSTANCE_SIGNATURE:-} ]] && omarchy-cmd-present hyprctl && omarchy-cmd-present jq; then
|
||||
workspace="$(active_workspace)"
|
||||
if [[ -n $workspace ]] && hyprctl dispatch "function() hl.exec_cmd($(lua_quote "$cmd"), { workspace = $(lua_quote "$workspace") }) end" >/dev/null 2>&1; then
|
||||
# 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
|
||||
|
||||
Reference in new issue
Block a user