aboutsummaryrefslogtreecommitdiff
path: root/lf
diff options
context:
space:
mode:
authordavidpkj <davidpenkow1@gmail.com>2023-02-25 17:50:35 +0100
committerdavidpkj <davidpenkow1@gmail.com>2023-02-25 17:50:35 +0100
commit407ffa310eaa8ece8880bafe5f64c3cb50dc6ea0 (patch)
tree37a484098c170110d2fc128e36834d793a48c827 /lf
parent6a0cd1c30041a63a8bd30ef78bea5f4243dcf9dc (diff)
Update lf
Diffstat (limited to 'lf')
-rwxr-xr-xlf/.config/lf/lfrc5
-rwxr-xr-xlf/.config/lf/scope6
2 files changed, 8 insertions, 3 deletions
diff --git a/lf/.config/lf/lfrc b/lf/.config/lf/lfrc
index 6380420..430dbde 100755
--- a/lf/.config/lf/lfrc
+++ b/lf/.config/lf/lfrc
@@ -70,7 +70,12 @@ cmd setbg ${{
wally "$fx" > /dev/null
}}
+cmd copypath ${{
+ pwd | xclip -selection clipboard
+}}
+
# Bindings
+map P copypath
map D delete
map E extract
map . set hidden!
diff --git a/lf/.config/lf/scope b/lf/.config/lf/scope
index 618bde3..c90f618 100755
--- a/lf/.config/lf/scope
+++ b/lf/.config/lf/scope
@@ -27,18 +27,18 @@ case "$(file --dereference --brief --mime-type -- "$1")" in
text/troff) man ./ "$1" | col -b ;;
text/* | */xml | application/json) bat -p --theme base16 --terminal-width "$4" -f "$1" ;;
application/zip) atool --list -- "$1" ;;
- audio/* | application/octet-stream) mediainfo "$1" || exit 1;;
+ audio/* | application/octet-stream) mediainfo "$1" || exit 1;;
video/* )
CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | awk '{print $1}')"
[ ! -f "$CACHE" ] && ffmpegthumbnailer -i "$1" -o "$CACHE" -s 0
image "$CACHE" "$2" "$3" "$4" "$5"
;;
- */pdf)
+ */pdf )
CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | awk '{print $1}')"
[ ! -f "$CACHE.jpg" ] && pdftoppm -jpeg -f 1 -singlefile "$1" "$CACHE"
image "$CACHE.jpg" "$2" "$3" "$4" "$5"
;;
- *opendocument*) odt2txt "$1" ;;
+ *opendocument*) odt2txt "$1" ;;
application/pgp-encrypted) gpg -d -- "$1" ;;
esac
exit 1