mirror of
https://github.com/basecamp/omarchy.git
synced 2026-01-09 05:10:54 +08:00
16 lines
457 B
Bash
Executable File
16 lines
457 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Launch or focus on a given web app identified by the window-pattern.
|
|
# Use by some default bindings, like the one for WhatsApp, to ensure there is only one instance of the application open.
|
|
|
|
if (($# == 0)); then
|
|
echo "Usage: omarchy-launch-or-focus-webapp [window-pattern] [url-and-flags...]"
|
|
exit 1
|
|
fi
|
|
|
|
WINDOW_PATTERN="$1"
|
|
shift
|
|
LAUNCH_COMMAND="omarchy-launch-webapp $@"
|
|
|
|
exec omarchy-launch-or-focus "$WINDOW_PATTERN" "$LAUNCH_COMMAND"
|