diff options
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 +#}}} |