diff options
author | zachir <zachir@librem.one> | 2023-02-24 10:30:08 -0600 |
---|---|---|
committer | zachir <zachir@librem.one> | 2023-02-24 10:30:08 -0600 |
commit | 30285bf323a5dc5b34879ef9d01172b55daaa139 (patch) | |
tree | d200def9d3385fb13ac43ac72b421bacf5649e68 /bm | |
parent | e1b62d8c73819f77972a79d3c0d02f89748a5d24 (diff) |
overhaul browser menu scripts
Diffstat (limited to 'bm')
-rwxr-xr-x | bm | 41 |
1 files changed, 41 insertions, 0 deletions
@@ -0,0 +1,41 @@ +#!/bin/sh + +#{{{ printhelp +printhelp () { + printf "bm: browser menu script; interface for browsers.\n" + printf " -b) basilisk interface\n" + printf " -d) firedragon interface\n" + printf " -f) firefox interface\n" + printf " -l) librewolf interface\n" + printf " -q) qutebrowser interface\n" + printf " -x) use X11 menu (dmenu)\n" + printf " -w) use Wayland menu (tofi)\n" + printf " -d ARG) provide menu args\n" + printf " -u ARG) provide URL to open\n" + exit +} +#}}} + +#{{{ getopts +unset ARG +while getopts "hbrflqxwd:u:" o; do case "${o}" in + b) BSC="y" ;; + r) FDC="y" ;; + f) FFC="y" ;; + l) LWC="y" ;; + q) QBC="y" ;; + x) ARG="$ARG-x " ;; + w) ARG="$ARG-w " ;; + d) ARG="$ARG-d $OPTARG ";; + u) ARG="$ARG-u $OPTARG " ;; + *) printhelp ;; +esac done +#}}} + +#{{{ main +[ -n "$BSC" ] && bsc $ARG +[ -n "$FDC" ] && fdc $ARG +[ -n "$FFC" ] && ffc $ARG +[ -n "$LWC" ] && lwc $ARG +[ -n "$QBC" ] && qbc $ARG +#}}} |