Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions bin/omarchy-launch-webapp
Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
#!/bin/bash

# omarchy:summary=Launch a URL as a web app in the default supported browser
# omarchy:args=<url>
# omarchy:summary=Launch a URL as a web app in the default supported browser, or user specified browser
# omarchy:args=[--browser <name>] <url>

browser=$(xdg-settings get default-web-browser)
browser=""

while (( $# > 0 )); do
case $1 in
--browser)
browser="$2"
shift 2
;;
--browser=*)
browser="${1#--browser=}"
shift
;;
*)
break
;;
esac
done

if [[ -z $browser ]]; then
browser=$(xdg-settings get default-web-browser)
fi

case $browser in
google-chrome* | brave* | microsoft-edge* | opera* | vivaldi* | helium*) ;;
Expand Down