diff options
author | zachir <zachir@librem.one> | 2023-03-12 23:45:07 -0500 |
---|---|---|
committer | zachir <zachir@librem.one> | 2023-03-12 23:45:07 -0500 |
commit | c20ba67adaf3dcb5a1ce2b39d00f123e17b0cf7d (patch) | |
tree | df1b053f75aa887b9c43a5b0c68d06982e8fcc51 | |
parent | a809f141a5dccff9b0e5a90e961de22f29d8cfda (diff) |
add -u arg to url handler
-rwxr-xr-x | url_handler.sh | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/url_handler.sh b/url_handler.sh index afb83d5..f8086b2 100755 --- a/url_handler.sh +++ b/url_handler.sh @@ -28,7 +28,7 @@ # VT: Launch in the same terminal # The lists of programs to be executed are -https_prgs="/home/zachir/.local/bin/scripts/browser:XW /usr/bin/lynx:XT" +https_prgs="/home/zachir/.local/bin/scripts/bm:XW /usr/bin/lynx:XT" http_prgs="/usr/bin/lynx:XT /usr/X11R6/bin/netscape:XW" mailto_prgs="/usr/bin/mutt:VT /usr/bin/elm:VT /usr/bin/pine:VT /usr/bin/mail:VT" gopher_prgs="/usr/bin/lynx:XT /usr/bin/gopher:XT" @@ -107,11 +107,20 @@ gopher) ;; esac +case "$(basename $prg)" in + bm) + ARG="-u" + ;; + *) + ARG="" + ;; +esac + if [ -n "$prg" ]; then if [ "${prg%:*}" = "X" ]; then - ${prg#*:} "$url" 2>/dev/null & + ${prg#*:} $ARG "$url" 2>/dev/null & else - $prg "$url" + $prg $ARG "$url" fi fi |