diff --git a/bin/omarchy-shell b/bin/omarchy-shell index 3cc7eaaa..93312327 100755 --- a/bin/omarchy-shell +++ b/bin/omarchy-shell @@ -48,7 +48,7 @@ fi # positionals. qs reports connection failures with a nonzero exit, but IPC-level # failures (unknown target/function, bad arguments) go to stdout with exit 0. ipc_timeout=${OMARCHY_SHELL_IPC_TIMEOUT:-2s} -output=$(timeout --kill-after=1s "$ipc_timeout" qs -p "$OMARCHY_PATH/shell" ipc call -- "$@" 2>/dev/null) +output=$(timeout --kill-after=1s "$ipc_timeout" qs ipc -n -p "$OMARCHY_PATH/shell" call -- "$@" 2>/dev/null) ipc_status=$? if (( ipc_status == 124 || ipc_status == 137 )); then diff --git a/test/shell.d/restart-shell-test.sh b/test/shell.d/restart-shell-test.sh index ce83312b..bd834fb2 100755 --- a/test/shell.d/restart-shell-test.sh +++ b/test/shell.d/restart-shell-test.sh @@ -15,6 +15,8 @@ touch "$wrapper_root/shell/shell.qml" cat >"$wrapper_bin/qs" <<'SH' #!/bin/bash +[[ -n ${OMARCHY_TEST_QS_ARGS:-} ]] && printf '%s\n' "$*" >"$OMARCHY_TEST_QS_ARGS" + if [[ ${OMARCHY_TEST_QS_HANG:-0} == 1 ]]; then sleep 5 else @@ -31,6 +33,15 @@ wrapper_error=$(PATH="$wrapper_bin:$PATH" \ [[ $wrapper_error == "omarchy-shell is not responding" ]] || fail "hung shell IPC reports that the shell is unresponsive" "$wrapper_error" pass "shell IPC calls time out when Quickshell is unresponsive" +wrapper_args="$test_tmp/wrapper-args" +PATH="$wrapper_bin:$PATH" \ +OMARCHY_PATH="$wrapper_root" \ +OMARCHY_TEST_QS_ARGS="$wrapper_args" \ + "$ROOT/bin/omarchy-shell" shell ping >/dev/null + +grep -F -- 'ipc -n -p' "$wrapper_args" >/dev/null || fail "shell IPC targets the newest live Quickshell instance" +pass "shell IPC targets the newest live Quickshell instance" + restart_root="$test_tmp/restart-root" restart_bin="$restart_root/bin" restart_state="$test_tmp/restart-pids"