From 44e76d13959a9a2390d34ad046a3fc5921b547b6 Mon Sep 17 00:00:00 2001 From: Ian Mihura Date: Wed, 10 Jun 2026 14:32:07 +0200 Subject: [PATCH] Add --browser flag to omarchy-launch-webapp --- bin/omarchy-launch-webapp | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/bin/omarchy-launch-webapp b/bin/omarchy-launch-webapp index 6ee0f84a25..50cfd52407 100755 --- a/bin/omarchy-launch-webapp +++ b/bin/omarchy-launch-webapp @@ -1,9 +1,29 @@ #!/bin/bash -# omarchy:summary=Launch a URL as a web app in the default supported browser -# omarchy:args= +# omarchy:summary=Launch a URL as a web app in the default supported browser, or user specified browser +# omarchy:args=[--browser ] -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*) ;;