diff options
author | Ensa <psychoticfervor@tuta.io> | 2019-12-20 00:14:09 -0800 |
---|---|---|
committer | Ensa <psychoticfervor@tuta.io> | 2019-12-20 00:14:09 -0800 |
commit | 4684d80b6271dd775cd23dabf2b91d6ce56fa33a (patch) | |
tree | ddb6c6219e213132b8500e016b1ce238aa71029d /config/lf | |
parent | f733ca7c8041866df27752c8e0c2610e0ecef6a7 (diff) | |
download | cfg-4684d80b6271dd775cd23dabf2b91d6ce56fa33a.tar.gz |
first significant commit
see README.md for information
Diffstat (limited to 'config/lf')
-rw-r--r-- | config/lf/lfrc | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/config/lf/lfrc b/config/lf/lfrc new file mode 100644 index 0000000..21634d4 --- /dev/null +++ b/config/lf/lfrc @@ -0,0 +1,37 @@ +# sets +set shell sh +set shellopts '-eu' +set ifs "\n" + +# cmds +cmd open ${{ + case $(file -bi $f) in + text/troff) man ./ $f;; + text/*) $EDITOR $fx;; + image/x-xcf|image/svg+xml) gimp $f >/dev/null 2>&1 & ;; + image/vnd.djvu|application/epub+zip|application/pdf) zathura $f >/dev/null 2>&1 & ;; + image/*) sxiv -ai >/dev/null 2>&1 & ;; + audio/*) mpv --input-ipc-server=/tmp/mpvsoc$(date +%%s) --quiet $f >/dev/null 2>&1 & ;; + video/*) mpv --input-ipc-server=/tmp/mpvsoc$(date +%%s) $f ;; + *) for f in $fx; do lh $f > /dev/null 2>&1 & done;; + esac +}} + +cmd rename %[ -e $1 ] && printf "file exists" || mv $f $1 + +cmd delete ${{ + set -f + printf "%s\n\t" "$fx" + printf "delete?[y/n]" + read ans + [ $ans = "y" ] && rm -rf $fx +}} + +# binds +map D delete +map a push %mkdir<space> +map r push :rename<space> +map <enter> shell +map R reload +map x $$f +map X !$f |