dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit a56b6bd72127460203aa7df5ef53eefbd5ecd749
parent 2c6589c5f72ff638bf66123fc66e9d995c0fa5a6
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Fri,  6 Mar 2020 07:55:40 +0100

Use firefox, open .webp in BROWSER

Diffstat:
M.local/bin/plumb | 20++++++++++----------
M.profile | 4++--
2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/.local/bin/plumb b/.local/bin/plumb @@ -9,10 +9,10 @@ show_help() { echo "If no FILE or URL is specified, this program will expect them as stdin." echo echo "OPTIONS are one or more of the following:" - echo " -h, --help show this message" - echo " -v, --version show version and license information" - echo " -V, --verbose show verbose information" - echo " -- do not consider any following args as options" + echo " -h show this message" + echo " -v show version and license information" + echo " -V show verbose information" + echo " -- do not consider any following args as options" } show_version() { @@ -95,7 +95,7 @@ handle_target() { elif regeximatch "$t" '^radio://'; then mpv "http${t##radio}" elif regeximatch "$t" '\.(mp3|ogg|m3u)$'; then - mpv "$t" + mpv "$(fetch "$t")" elif regeximatch "$t" '\.(png|jpg|jpeg|tif|bmp|gif)$'; then sxiv "$(fetch "$t")" elif regeximatch "$t" '\.(pdf|ps|epub|djvu)$'; then @@ -131,8 +131,8 @@ handle_target() { else mandoc -l "$(fetch "$t")" fi - - elif regeximatch "$t" '^(http|https)://'; then + elif regeximatch "$t" '^(http|https)://' || \ + regeximatch "$t" '\.webp$'; then detach $BROWSER "$t" else die "unknown target type: $t" @@ -143,15 +143,15 @@ handle_target() { verbose=0 while :; do case "$1" in - -h|-\?|--help) + -h) show_help exit 0 ;; - -v|--version) + -v) show_version exit 0 ;; - -V|--verbose) + -V) verbose=1 ;; --) # end all options diff --git a/.profile b/.profile @@ -7,7 +7,7 @@ export EDITOR=vi export PAGER="less -i" export FCEDIT="$EDITOR" export TERMINAL=st -export BROWSER=surf-open.sh +export BROWSER=firefox export BIB="$HOME/articles/own/BIBnew.bib" GPG_TTY=$(tty) @@ -136,7 +136,7 @@ news() { else url="$1" fi - torsocks w3m "$url" + w3m "$url" } weather() { curl "wttr.in/?m"; }