diff options
Diffstat (limited to '.config/lf')
-rw-r--r-- | .config/lf/icons | 267 | ||||
-rw-r--r-- | .config/lf/lfrc | 62 |
2 files changed, 329 insertions, 0 deletions
diff --git a/.config/lf/icons b/.config/lf/icons new file mode 100644 index 0000000..249ada9 --- /dev/null +++ b/.config/lf/icons @@ -0,0 +1,267 @@ +fi= +di= +ln= +pi=| +so=ﯲ +db= +cd=c +or= +su= +sg= +tw= +ow=w +st= +ex= +*.7z= +*.a= +*.aac= +*.ace= +*.ai= +*.alz= +*.apk= +*.arc= +*.arj= +*.asf= +*.asm= +*.asp= +*.au= +*.aup= +*.avi= +*.avi= +*.bash= +*.bat= +*.bmp= +*.bz2= +*.bz= +*.c++= +*.c= +*.cab= +*.cbr= +*.cbz= +*.cc= +*.cgm= +*.class= +*.clj= +*.cljc= +*.cljs= +*.cmake= +*.cmd= +*.coffee= +*.conf= +*.cp= +*.cpio= +*.cpp= +*.cs= +*.css= +*.cue= +*.cvs= +*.cxx= +*.d= +*.dart= +*.db= +*.deb= +*.diff= +*.dl= +*.dll= +*.doc= +*.docx= +*.dump= +*.dwm= +*.dz= +*.ear= +*.edn= +*.eex= +*.efi= +*.ejs= +*.elf= +*.elm= +*.emf= +*.epub= +*.erl= +*.esd= +*.ex= +*.exe= +*.exs= +*.f#= +*.fifo=| +*.fish= +*.flac= +*.flc= +*.fli= +*.flv= +*.flv= +*.fs= +*.fsi= +*.fsscript= +*.fsx= +*.gem= +*.gif= +*.git= +*.gl= +*.go= +*.gz= +*.gzip= +*.h= +*.hbs= +*.hh= +*.hpp= +*.hrl= +*.hs= +*.htaccess= +*.htm= +*.html= +*.htpasswd= +*.ico= +*.img= +*.ini= +*.iso= +*.jar= +*.java= +*.jl= +*.jpeg= +*.jpg= +*.js= +*.json= +*.jsx= +*.key= +*.less= +*.lha= +*.lhs= +*.log= +*.lrz= +*.lua= +*.lz4= +*.lz= +*.lzh= +*.lzma= +*.lzo= +*.m2v= +*.m4a= +*.m4v= +*.markdown= +*.md= +*.mid= +*.midi= +*.mjpeg= +*.mjpg= +*.mka= +*.mkv= +*.ml=λ +*.mli=λ +*.mng= +*.mov= +*.mp3= +*.mp4= +*.mp4v= +*.mpc= +*.mpeg= +*.mpg= +*.msi= +*.mustache= +*.nix= +*.nuv= +*.o= +*.oga= +*.ogg= +*.ogm= +*.ogv= +*.ogx= +*.opus= +*.pbm= +*.pcx= +*.pdf= +*.pgm= +*.php= +*.pl= +*.pm= +*.png= +*.ppk= +*.ppm= +*.ppt= +*.pptx= +*.pro= +*.ps1= +*.psb= +*.psd= +*.pub= +*.py= +*.pyc= +*.pyd= +*.pyo= +*.qt= +*.ra= +*.rar= +*.rb= +*.rc= +*.rlib= +*.rm= +*.rmvb= +*.rom= +*.rpm= +*.rs= +*.rss= +*.rtf= +*.rz= +*.s= +*.sar= +*.scala= +*.scss= +*.sh= +*.slim= +*.sln= +*.so= +*.spx= +*.sql= +*.styl= +*.suo= +*.svg= +*.svgz= +*.swm= +*.t7z= +*.t= +*.tar= +*.taz= +*.tbz2= +*.tbz= +*.tga= +*.tgz= +*.tif= +*.tiff= +*.tlz= +*.ts= +*.twig= +*.txz= +*.tz= +*.tzo= +*.tzst= +*.vim= +*.vimrc= +*.vob= +*.war= +*.wav= +*.wav= +*.webm= +*.wim= +*.wmv= +*.xbm= +*.xbps= +*.xcf= +*.xhtml= +*.xls= +*.xlsx= +*.xml= +*.xpm= +*.xspf= +*.xul= +*.xwd= +*.xz= +*.yaml= +*.yml= +*.yuv= +*.z= +*.zip= +*.zoo= +*.zsh= +*.zst= +*.src= +*.ebuild=
\ No newline at end of file diff --git a/.config/lf/lfrc b/.config/lf/lfrc new file mode 100644 index 0000000..e800495 --- /dev/null +++ b/.config/lf/lfrc @@ -0,0 +1,62 @@ +# Basic vars +set shellopts '-eu' +set ifs "\n" +set scrolloff 10 +set icons +set period 1 +set previewer '~/.config/lf/scope' +set hiddenfiles ".*:*.aux:*.log:*.bbl:*.bcf:*.blg:*.run.xml" + +# cmds/functions +cmd open ${{ + case $(file --mime-type "$(readlink -f $f)" -b) in + application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) localc $fx ;; + image/vnd.djvu|application/pdf|application/octet-stream|application/postscript) bsdsetsid zathura $fx >/dev/null 2>&1 ;; + text/*|application/json|inode/x-empty) $EDITOR $fx;; + image/x-xcf) bsdsetsid gimp $f >/dev/null 2>&1 ;; + image/svg+xml) display -- $f ;; + image/*) rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|tif\|ico\)\(_large\)*$" | + bsdsetsid sxiv -aibo 2>/dev/null | while read -r file; do + [ -z "$file" ] && continue + lf -remote "send select \"$file\"" + lf -remote "send toggle" + done & + ;; + audio/*) bsdsetsid st -e mpv --no-audio-display --audio-channels=stereo $f ;; + video/*) bsdsetsid mpv --fullscreen --really-quiet --audio-channels=stereo $f >/dev/null 2>&1 ;; + application/pdf|application/vnd*|application/epub*) bsdsetsid zathura $fx >/dev/null 2>&1 ;; + application/pgp-encrypted) $EDITOR $fx ;; + *) for f in $fx; do bsdsetsid xdg-open $f >/dev/null 2>&1; done;; + esac +}} + +cmd mkdir $mkdir -p "$(echo $* | tr ' ' '\ ')" +cmd bulkrename $vidir $fx + +map gr cd / +map gm cd ~/hdd +map za set hidden! +map zh set info size:time +map <c-f> $lf -remote "send $id select '$(fzf)'" +map <enter> open +map D delete +map S $$SHELL +map <c-n> push :mkdir<space> +map <f-7> push :mkdir<space> +map <c-r> reload +map x $$f +map X !$f +map o &mimeopen $f +map O $mimeopen --ask $f + +map A rename # at the very end +map c push A<c-u> # new rename +map I push A<c-a> # at the very beginning +map i push A<a-b><a-b><a-f> # before extention +map a push A<a-b> # after extention +map B bulkrename +map <f-2> bulkrename + +map <c-e> down +map <c-y> up +map V push :!nvim<space> |