dotfiles

My configuration files.
Log | Files | Refs | README

commit 6d11c90ff96ca1b57fff253d9f048cbde4193590
parent 704a88b9c1841789fbeb63bad72ef26c45b577e6
Author: Sven Möller <sven@svenmoeller.xyz>
Date:   Wed, 25 May 2022 22:52:08 +0200

Improve lh script

Diffstat:
Mbin/.local/bin/lh | 20++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/bin/.local/bin/lh b/bin/.local/bin/lh @@ -4,11 +4,19 @@ gui=false menu="fzf -i" open () { - case $url in - *.png|*.jpg|*.jpeg) curl $url | setsid -f imv -;; - *.mp3|*.ogg|*/watch*|*/w/*) - mpv --fs --force-window $url > /dev/null 2>&1 & ;; - *) openbrowser $url ;; + case "$url" in + *.png|*.jpg|*.jpeg|*.JPG|*.gif|*.svg|*.webp) + $PICVIEWER "$url" + ;; + *.mp3|*.ogg|*.flac|*/watch*|*/w/*|*odysee.com/*) + $VIDVIEWER "$url" + ;; + *.pdf|*.epub) + $DOCVIEWER "$url" + ;; + *) + $TERMINAL epy "$url" + ;; esac } @@ -77,4 +85,4 @@ done [ -z "$action" ] && action="open" url="$(echo "$1" | sed 's/medium.com/scribe.rip/')" -cat "$0" | "$action" "$url" +"$action" "$url"