Fix: Allow passing flags/arguments to omarchy-launch-webapp in launch-or-focus-webapp script (#1980)

This resolves the issue where extra arguments like Chromium's --profile-directory were ignored when launching a web app via omarchy-launch-or-focus-webapp.

The script now uses 'shift' to isolate the window pattern ($1) and passes all remaining arguments ($@), which include the URL and flags, to the omarchy-launch-webapp function.

Closes #1977
This commit is contained in:
Meir Dick
2025-10-06 15:53:37 -04:00
committed by GitHub
parent b0ee5d2e79
commit 2c14252d7d

View File

@@ -1,8 +1,12 @@
#!/bin/bash #!/bin/bash
if (($# == 0)); then if (($# == 0)); then
echo "Usage: omarchy-launch-or-focus-webapp [window-pattern] [url]" echo "Usage: omarchy-launch-or-focus-webapp [window-pattern] [url-and-flags...]"
exit 1 exit 1
fi fi
exec omarchy-launch-or-focus "$1" "omarchy-launch-webapp '$2'" WINDOW_PATTERN="$1"
shift
LAUNCH_COMMAND="omarchy-launch-webapp $@"
exec omarchy-launch-or-focus "$WINDOW_PATTERN" "$LAUNCH_COMMAND"