Skip to content

Commit debfe8c

Browse files
committed
Load copy to URL extension if it exists
1 parent 624c6cb commit debfe8c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

bin/omarchy-launch-webapp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,10 @@ google-chrome* | brave-browser* | microsoft-edge* | opera* | vivaldi*) ;;
77
*) browser="chromium.desktop" ;;
88
esac
99

10-
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}"
10+
EXTENSION_DIR="$HOME/.local/share/chromium/extensions/copy-url"
11+
12+
if [[ -d "$EXTENSION_DIR" ]]; then
13+
exec setsid uwsm app -- $(sed -n 's/^Exec=\([^ ]*\).*/\1/p' {~/.local,~/.nix-profile,/usr}/share/applications/$browser 2>/dev/null | head -1) --load-extension="$EXTENSION_DIR" --app="$1" "${@:2}"
14+
else
15+
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}"
16+
fi

0 commit comments

Comments
 (0)