From 2bc5f8229702354ebdaba8b62ac7bd1e91eb029f Mon Sep 17 00:00:00 2001 From: zachir Date: Thu, 18 Sep 2025 09:26:20 -0500 Subject: Fix browser scripts with URL They were launching with "" as URL if none provided; now there is no arg if none is provided. --- brc | 2 +- bsc | 2 +- fdc | 2 +- ffc | 4 ++-- lwc | 2 +- mbc | 2 +- qbc | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/brc b/brc index b2f7daa..cffa1f8 100755 --- a/brc +++ b/brc @@ -28,5 +28,5 @@ fi #{{{ Choose Profiles CHOSEN=$(printf "%s" "$PROFILES" | dmenu -l 15 -p brave ${ARG:+"$ARG"}) [ -z "$CHOSEN" ] && exit 2 -brave-profiles "$CHOSEN" "$URL" +brave-profiles "$CHOSEN" ${URL:+"$URL"} #}}} diff --git a/bsc b/bsc index 5ae3272..562eb53 100755 --- a/bsc +++ b/bsc @@ -21,5 +21,5 @@ esac done PROFILES=$(grep 'Path=' ~/.moonchild\ productions/basilisk/profiles.ini | cut -d'.' -f2) CHOSEN=$(echo "$PROFILES" | dmenu -l 15 -p "basilisk" ${ARG:+"$ARG"}) [ -z "$CHOSEN" ] && exit 2 -exec basilisk -P "$CHOSEN" "$URL" +exec basilisk -P "$CHOSEN" ${URL:+"$URL"} #}}} diff --git a/fdc b/fdc index 6d63ba5..8fc3bd0 100755 --- a/fdc +++ b/fdc @@ -21,5 +21,5 @@ esac done PROFILES=$(grep 'Path=' ~/.firedragon/profiles.ini | cut -d'.' -f2) CHOSEN=$(echo "$PROFILES" | dmenu ${ARG:+"$ARG"} -p "firedragon") [ -z "$CHOSEN" ] && exit 2 -exec firedragon -P "$CHOSEN" "$URL" +exec firedragon -P "$CHOSEN" ${URL:+"$URL"} #}}} diff --git a/ffc b/ffc index a0be53e..912b9e2 100755 --- a/ffc +++ b/ffc @@ -44,8 +44,8 @@ PROFILES="$NATIVE_PROFILES$INT$FLATPAK_PROFILES" CHOSEN=$(printf "%s" "$PROFILES" | dmenu -l 15 -p "firefox" ${ARG:+"$ARG"}) [ -z "$CHOSEN" ] && exit 2 if echo "$CHOSEN" | grep -qE ' F$'; then - exec flatpak run org.mozilla.Firefox -P "$(echo "$CHOSEN" | sed 's/ F$//')" "$URL" + exec flatpak run org.mozilla.Firefox -P "$(echo "$CHOSEN" | sed 's/ F$//')" ${URL:+"$URL"} else - exec firefox -P "$CHOSEN" "$URL" + exec firefox -P "$CHOSEN" ${URL:+"$URL"} fi #}}} diff --git a/lwc b/lwc index 760e0b8..690e708 100755 --- a/lwc +++ b/lwc @@ -47,7 +47,7 @@ fi CHOSEN=$(printf "%s" "$PROFILES" | dmenu -l 15 -p librewolf ${ARG:+"$ARG"}) [ -z "$CHOSEN" ] && exit 2 if echo "$CHOSEN" | grep -qE ' F$'; then - exec flatpak run io.gitlab.librewolf-community -P "$(echo "$CHOSEN" | sed 's/ F$//')" "$URL" + exec flatpak run io.gitlab.librewolf-community -P "$(echo "$CHOSEN" | sed 's/ F$//')" ${URL:+"$URL"} else exec librewolf -P "$CHOSEN" ${URL:+"$URL"} fi diff --git a/mbc b/mbc index 0ab9db9..4578f77 100755 --- a/mbc +++ b/mbc @@ -32,5 +32,5 @@ PROFILES="$NATIVE_PROFILES" #{{{ Choose Profiles CHOSEN=$(printf "%s" "$PROFILES" | dmenu -l 15 -p "mullvad-browser" ${ARG:+"$ARG"}) [ -z "$CHOSEN" ] && exit 2 -exec mullvad-browser -P "$CHOSEN" "$URL" +exec mullvad-browser -P "$CHOSEN" ${URL:+"$URL"} #}}} diff --git a/qbc b/qbc index 20b409f..d02eae1 100755 --- a/qbc +++ b/qbc @@ -27,12 +27,12 @@ CHOSEN=$(printf "default\n%s" "$SESSIONS" | dmenu -l 15 -p "qutebrowser" ${ARG:+ [ -z "$CHOSEN" ] && exit 2 if [ -n "$CHOSEN" ]; then if [ "$CHOSEN" = "default" ]; then - qutebrowser "$URL" + qutebrowser ${URL:+"$URL"} else if echo "$SESSIONS" | { ! grep -q "$CHOSEN" ; }; then qbpm new "$CHOSEN" fi - qbpm launch "$CHOSEN" "$URL" + qbpm launch "$CHOSEN" ${URL:+"$URL"} #qutebrowser -B "$HOME/.local/share/$CHOSEN" fi fi -- cgit v1.2.3