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:
@@ -7,33 +7,17 @@ source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/base-test.sh"
|
||||
tmp_dir="$(mktemp -d)"
|
||||
trap 'rm -rf "$tmp_dir"' EXIT
|
||||
|
||||
cat >"$tmp_dir/hyprctl" <<'SCRIPT'
|
||||
cat >"$tmp_dir/setsid" <<'SCRIPT'
|
||||
#!/bin/bash
|
||||
case "$1" in
|
||||
activeworkspace)
|
||||
printf '{"id":2,"name":"2"}\n'
|
||||
;;
|
||||
dispatch)
|
||||
printf '%s\n' "$2" >>"$TEST_LOG"
|
||||
;;
|
||||
esac
|
||||
printf '%s\n' "$*" >"$TEST_LOG"
|
||||
SCRIPT
|
||||
chmod +x "$tmp_dir/hyprctl"
|
||||
|
||||
cat >"$tmp_dir/jq" <<'SCRIPT'
|
||||
#!/bin/bash
|
||||
cat >/dev/null
|
||||
printf '2\n'
|
||||
SCRIPT
|
||||
chmod +x "$tmp_dir/jq"
|
||||
chmod +x "$tmp_dir/setsid"
|
||||
|
||||
export TEST_LOG="$tmp_dir/log"
|
||||
export PATH="$tmp_dir:$ROOT/bin:$PATH"
|
||||
export HYPRLAND_INSTANCE_SIGNATURE=test
|
||||
|
||||
"$ROOT/bin/omarchy-launch-floating-terminal-with-presentation" "echo hello"
|
||||
|
||||
dispatch=$(<"$TEST_LOG")
|
||||
[[ $dispatch == *'workspace = "2"'* ]] || fail "floating terminal targets active workspace" "$dispatch"
|
||||
[[ $dispatch == *"xdg-terminal-exec --app-id=org.omarchy.terminal"* ]] || fail "floating terminal dispatch launches Omarchy terminal" "$dispatch"
|
||||
pass "floating terminal targets active workspace"
|
||||
launch=$(<"$TEST_LOG")
|
||||
[[ $launch == *"xdg-terminal-exec --app-id=org.omarchy.terminal"* ]] || fail "floating terminal launches Omarchy terminal" "$launch"
|
||||
pass "floating terminal launches Omarchy terminal"
|
||||
|
||||
Reference in New Issue
Block a user