summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/lf/lfrc6
-rwxr-xr-x.local/bin/linkhandler23
2 files changed, 3 insertions, 26 deletions
diff --git a/.config/lf/lfrc b/.config/lf/lfrc
index 07f830f..bcebcf5 100644
--- a/.config/lf/lfrc
+++ b/.config/lf/lfrc
@@ -41,7 +41,7 @@ cmd extract ${{
printf "%s\n\t" "$fx"
printf "extract?[y/N]"
read ans
- [ $ans = "y" ] && aunpack $fx
+ [ $ans = "y" ] && ext $fx
}}
cmd delete ${{
@@ -75,7 +75,7 @@ cmd copyto ${{
notify-send "📋 File(s) copied." "File(s) copies to $dest."
}}
-cmd setbg "$1"
+cmd genwall "$1"
cmd bulkrename $vidir
# Bindings
@@ -102,7 +102,7 @@ map I push A<c-a> # at the very beginning
map i push A<a-b><a-b><a-f> # before extension
map a push A<a-b> # after extension
map B bulkrename
-map b $setbg $f
+map b $genwall $f
map <c-e> down
map <c-y> up
diff --git a/.local/bin/linkhandler b/.local/bin/linkhandler
deleted file mode 100755
index fa74caf..0000000
--- a/.local/bin/linkhandler
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# Feed script a url or file location.
-# If an image, it will view in sxiv,
-# if a video or gif, it will view in mpv
-# if a music file or pdf, it will download,
-# otherwise it opens link in browser.
-
-# If no url given. Opens browser. For using script as $BROWSER.
-[ -z "$1" ] && { "$BROWSER"; exit; }
-
-case "$1" in
- *mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*|*videos.lukesmith.xyz*|*odysee.com*)
- setsid -f mpv -quiet "$1" >/dev/null 2>&1 ;;
- *png|*jpg|*jpe|*jpeg|*gif)
- curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;;
- *pdf|*cbz|*cbr)
- curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && zathura "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;;
- *mp3|*flac|*opus|*mp3?source*)
- qndl "$1" 'curl -LO' >/dev/null 2>&1 ;;
- *)
- [ -f "$1" ] && setsid -f "$TERMINAL" -e "$EDITOR" "$1" >/dev/null 2>&1 || setsid -f "$BROWSER" "$1" >/dev/null 2>&1
-esac