From e00cbc72a0f8a307cdf8177ce1180c2a5adb21ba Mon Sep 17 00:00:00 2001 From: ziro Date: Sat, 16 May 2020 15:34:07 +0700 Subject: [PATCH] + Custom rename command (the built-in one sucks) --- .config/lf/lfrc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.config/lf/lfrc b/.config/lf/lfrc index b6b95a4..16ce925 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -12,7 +12,9 @@ set smartcase true cmd open ${{ case $(file --mime-type "$f" -bL) in text/*|application/json) $EDITOR "$f";; - video/*|image/*/application/pdf) xdg-open "$f" & disown;; + image/*) feh -g 1280x720 --scale-down "$f" &;; + video/*) mpv "$f" --quiet > /dev/null & ;; + application/pdf) zathura "$f" & ;; *) xdg-open "$f" ;; esac }} @@ -25,6 +27,8 @@ cmd q :quit cmd chmod $chmod "$*" "$f" +cmd rename %[ -e $1 ] && printf "file exists" || mv $f $1 + # printf "Mode Bits: " # read ans #