Files
omarchy-stow/omarchy-bin/.local/share/omarchy/bin/omarchy-launch-webapp
T
2025-11-25 21:02:32 -06:00

17 lines
591 B
Bash
Executable File

#!/bin/bash
# Redirect standard WebApp calls to Firefox WebApp profile
browser=$(xdg-settings get default-web-browser)
case $browser in
firefox* )
# Launch Firefox directly with the dedicated WebApp profile
exec setsid uwsm app -- firefox --no-remote -P "WebApps" --new-window --name WebApp "$1" "${@:2}"
;;
*)
# Old Chromium fallback for other browsers if needed
browser="chromium.desktop"
exec setsid uwsm app -- $(sed -n 's/^Exec=\([^ ]*\).*/\1/p' {~/.local,~/.nix-profile,/usr}/share/applications/$browser 2>/dev/null | head -1) --app="$1" "${@:2}"
;;
esac