summaryrefslogtreecommitdiff
path: root/bm
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2023-04-25 16:49:57 -0500
committerzachir <zachir@librem.one>2023-04-25 16:49:57 -0500
commit339b0b0ec254a3df20ad606ccaf803b7832071af (patch)
tree94642d7f81bdcffb9d4ecc57915ccef125e1c8ef /bm
parent0c11064839678de568b21763c9960b2690e4529d (diff)
add mullvad-browser as an option
Diffstat (limited to 'bm')
-rwxr-xr-xbm17
1 files changed, 11 insertions, 6 deletions
diff --git a/bm b/bm
index 73e5ba8..812b743 100755
--- a/bm
+++ b/bm
@@ -4,9 +4,11 @@
printhelp () {
printf "bm: browser menu script; interface for browsers.\n"
printf " -b) basilisk interface\n"
+ printf " -B) brave browser\n"
printf " -d) firedragon interface\n"
printf " -f) firefox interface\n"
printf " -l) librewolf interface\n"
+ printf " -m) mullvad-browser interface\n"
printf " -q) qutebrowser interface\n"
printf " -x) use X11 menu (dmenu)\n"
printf " -w) use Wayland menu (tofi)\n"
@@ -19,11 +21,12 @@ printhelp () {
#{{{ BROWSERSBYCMD
# Native binaries
type basilisk >/dev/null 2>&1 && CANBSC="bsc"
+type brave >/dev/null 2>&1 && CANBRA="brave"
type firedragon >/dev/null 2>&1 && CANFDC="fdc"
type firefox >/dev/null 2>&1 && CANFFC="ffc"
type librewolf >/dev/null 2>&1 && CANLWC="lwc"
+type mullvad-browser >/dev/null 2>&1 && CANMBC="mbc"
type qutebrowser >/dev/null 2>&1 && CANQBC="qbc"
-type brave >/dev/null 2>&1 && CANBRA="brave"
[ -n "$WAYLAND_DISPLAY" ] && \
type wl-copy >/dev/null 2>&1 && CANCLIPB="clip"
[ -z "$WAYLAND_DISPLAY" -a -n "$DISPLAY" ] && \
@@ -39,13 +42,14 @@ echo "$LIST" | grep -q "org.qutebrowser.qutebrowser" && \
#}}}
#{{{ getopts
-unset ARG BSC BRA FDC FFC LWC QBC CLIPB URL
-while getopts "hbBcrflqxwd:u:" o; do case "${o}" in
+unset ARG BSC BRA FDC FFC LWC MBC QBC CLIPB URL
+while getopts "hbBcrflmqxwd:u:" o; do case "${o}" in
b) BSC="y" ;;
B) BRA="y" ;;
r) FDC="y" ;;
f) FFC="y" ;;
l) LWC="y" ;;
+ m) MBC="y" ;;
q) QBC="y" ;;
c) CLIPB="y" ;;
x) ARG="$ARG-x " ;;
@@ -97,16 +101,17 @@ if [ -n "$BSC$FDC$FFC$LWC$QBC" ]; then
ARG="$ARG -u $URL"
fi
echo $ARG
+[ -n "$BRA" ] && bra $ARG
[ -n "$BSC" ] && exec bsc $ARG
[ -n "$FDC" ] && exec fdc $ARG
[ -n "$FFC" ] && exec ffc $ARG
[ -n "$LWC" ] && exec lwc $ARG
+[ -n "$MBC" ] && exec mbc $ARG
[ -n "$QBC" ] && exec qbc $ARG
-[ -n "$BRA" ] && exec bra $ARG
[ -n "$CLIPB" ] && exec clip $ARG
-if [ -z "$CLIPB$BSC$FDC$FFC$LWC$QBC" ]; then
+if [ -z "$CLIPB$BRA$BSC$FDC$FFC$LWC$MBC$QBC" ]; then
BROWSERSINSTALLED=""
- for i in CLIPB BSC FDC FFC LWC QBC BRA; do
+ for i in CLIPB BRA BSC FDC FFC LWC QBC MBC; do
if [ -n "$(eval "echo \$CAN${i}")" ]; then
[ -n "$BROWSERSINSTALLED" ] && STARTLINE="\n" || STARTLINE="" ;
[ -z "$URL" -a "$i" = "CLIPB" ] && continue