diff options
author | awy <awy@awy.one> | 2024-11-24 13:29:56 +0300 |
---|---|---|
committer | awy <awy@awy.one> | 2024-11-24 13:29:56 +0300 |
commit | 511afc41829d5626e9e9b84cbc3d4a7c14d63165 (patch) | |
tree | 14e7cb05f7206e39828bc49e6689f530615a41b9 /.config/lf/lfrc | |
parent | 7b52375768323ce6b88156aa48b0d50ec2c8dafc (diff) |
upload
Diffstat (limited to '.config/lf/lfrc')
-rw-r--r-- | .config/lf/lfrc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/.config/lf/lfrc b/.config/lf/lfrc new file mode 100644 index 0000000..56ca258 --- /dev/null +++ b/.config/lf/lfrc @@ -0,0 +1,25 @@ +set ifs "\n" +set icons +set sixel true +set cleaner ~/.config/lf/cleaner +set previewer ~/.config/lf/scope + +cmd open ${{ + case $(file --mime-type "$(readlink -f $f)" -b) in + text/*|application/json|inode/x-empty|application/x-subrip) $EDITOR $fx;; + video/*) setsid -f mpv $f -quiet >/dev/null 2>&1 ;; + audio/*|video/x-ms-asf) mpv --audio-display=no $f ;; + *) for f in $fx; do setsid -f $OPENER $f >/dev/null 2>&1; done;; + esac +}} + +cmd delete ${{ + clear; tput cup $(($(tput lines)/3)); tput bold + set -f + printf "%s\n\t" "$fx" + printf "delete?[y/N]" + read ans + [ $ans = "y" ] && rm -rf -- $fx +}} + +map D delete |