vifm: Move devicon classify setting into separate file
Will be sourced on startup and provide basically the same icon prefix as before. Made sure to not invoke 'classify+=' too often since each invocation slows down vifm startup a little. (see: https://github.com/vifm/vifm/issues/542) With it being sourced externally we can now do fun things with classify itself and it is easier to update from the rest of our settings.
This commit is contained in:
parent
4cc03a611a
commit
b712d456dd
2 changed files with 91 additions and 17 deletions
88
terminal/.config/vifm/favicons.vifm
Normal file
88
terminal/.config/vifm/favicons.vifm
Normal file
|
@ -0,0 +1,88 @@
|
|||
" Ranger devicons for ViFM
|
||||
" https://github.com/cirala/vifm_devicons
|
||||
"
|
||||
" Filetypes/directories
|
||||
|
||||
" Specific directories
|
||||
set classify+=' :dir:/, :exe:, :reg:, :link:,? :?:, ::../::/,
|
||||
\ ::.git/::/,
|
||||
\ ::.config/,,Makefile::/,
|
||||
\ ::Desktop/::/,
|
||||
\ ::Documents/::/,
|
||||
\ ::Development/::/,
|
||||
\ ::Downloads/::/,
|
||||
\ ::Dropbox/::/,
|
||||
\ ::Nextcloud/::/,
|
||||
\ ::Google\ Drive/::/,
|
||||
\ ::gitrepos/::/,
|
||||
\ ::Music/::/,
|
||||
\ ::Pictures/::/,
|
||||
\ ::Public/::/,
|
||||
\ ::Templates/::/,
|
||||
\ ::Videos/::/,
|
||||
\ ::Zotero/::/,
|
||||
\ ::node_modules/::/'
|
||||
|
||||
" Specific files
|
||||
set classify+=' ::.Xdefaults,,.Xresources,,.bashprofile,,.bash_profile,,.bashrc,,.dmrc,,.d_store,,.fasd,,.gitconfig,,.gitignore,,.jack-settings,,.mime.types,,.nvidia-settings-rc,,.pam_environment,,.profile,,.recently-used,,.selected_editor,,.xinitpurc,,.zprofile,,.yarnc,,.snclirc,,.tmux.conf,,.urlview,,.config,,.ini,,.user-dirs.dirs,,.mimeapps.list,,.offlineimaprc,,.msmtprc,,.Xauthority,,config::/,
|
||||
\ ::favicon.*,,README,,readme::/,
|
||||
\ ::.vim,,.vimrc,,.gvimrc,,.vifm::/,
|
||||
\ ::gruntfile.coffee,,gruntfile.js,,gruntfile.ls::/,
|
||||
\ ::gulpfile.coffee,,gulpfile.js,,gulpfile.ls::/,
|
||||
\ ::ledger,,*.beancount::/,
|
||||
\ ::license,,copyright,,copying,,LICENSE,,COPYRIGHT,,COPYING::/,
|
||||
\ ::react.jsx::'
|
||||
|
||||
" File extensions
|
||||
set classify+='λ ::*.ml,,*.mli::/,
|
||||
\ ::*.styl::/,
|
||||
\ ::*.scss::/,
|
||||
\ ::*.py,,*.pyc,,*.pyd,,*.pyo::/,
|
||||
\ ::*.php::/,
|
||||
\ ::*.markdown,,*.md::/,
|
||||
\ ::*.json::/,
|
||||
\ ::*.js::/,
|
||||
\ ::*.bmp,,*.gif,,*.ico,,*.jpeg,,*.jpg,,*.png,,*.svg,,*.svgz,,*.tga,,*.tiff,,*.xmb,,*.xcf,,*.xpm,,*.xspf,,*.xwd,,*.cr2,,*.dng,,*.3fr,,*.ari,,*.arw,,*.bay,,*.crw,,*.cr3,,*.cap,,*.data,,*.dcs,,*.dcr,,*.drf,,*.eip,,*.erf,,*.fff,,*.gpr,,*.iiq,,*.k25,,*.kdc,,*.mdc,,*.mef,,*.mos,,*.mrw,,*.obm,,*.orf,,*.pef,,*.ptx,,*.pxn,,*.r3d,,*.raf,,*.raw,,*.rwl,,*.rw2,,*.rwz,,*.sr2,,*.srf,,*.srw,,*.tif,,*.x3f,,*.webp,,*.avif,,*.jxl::/,
|
||||
\ ::*.ejs,,*.htm,,*.html,,*.slim,,*.xml::/,
|
||||
\ ::*.mustasche::/,
|
||||
\ ::*.css,,*.less,,*.bat,,*.conf,,*.ini,,*.rc,,*.yml,,*.cfg::/,
|
||||
\ ::*.rss::/,
|
||||
\ ::*.coffee::/,
|
||||
\ ::*.twig::/,
|
||||
\ ::*.c++,,*.cpp,,*.cxx,,*.h::/,
|
||||
\ ::*.cc,,*.c::/,
|
||||
\ ::*.hs,,*.lhs::/,
|
||||
\ ::*.lua::/,
|
||||
\ ::*.jl::/,
|
||||
\ ::*.go::/,
|
||||
\ ::*.ts::/,
|
||||
\ ::*.db,,*.dump,,*.sql::/,
|
||||
\ ::*.sln,,*.suo::/,
|
||||
\ ::*.exe::/,
|
||||
\ ::*.diff,,*.sum,,*.md5,,*.sha512::/,
|
||||
\ ::*.scala::/,
|
||||
\ ::*.java,,*.jar::/,
|
||||
\ ::*.xul::/,
|
||||
\ ::*.clj,,*.cljc::/,
|
||||
\ ::*.pl,,*.pm,,*.t::/,
|
||||
\ ::*.cljs,,*.edn::/,
|
||||
\ ::*.rb::/,
|
||||
\ ::*.fish,,*.sh,,*.bash::/,
|
||||
\ ::*.dart::/,
|
||||
\ ::*.f#,,*.fs,,*.fsi,,*.fsscript,,*.fsx::/,
|
||||
\ ::*.rlib,,*.rs::/,
|
||||
\ ::*.d::/,
|
||||
\ ::*.erl,,*.hrl::/,
|
||||
\ ::*.ai::/,
|
||||
\ ::*.psb,,*.psd::/,
|
||||
\ ::*.jsx::/,
|
||||
\ ::*.aac,,*.anx,,*.asf,,*.au,,*.axa,,*.flac,,*.m2a,,*.m4a,,*.mid,,*.midi,,*.mp3,,*.mpc,,*.oga,,*.ogg,,*.ogx,,*.ra,,*.ram,,*.rm,,*.spx,,*.wav,,*.wma,,*.ac3::/,
|
||||
\ ::*.avi,,*.flv,,*.mkv,,*.mov,,*.mp4,,*.mpeg,,*.mpg,,*.webm,,*.av1::/,
|
||||
\ ::*.epub,,*.pdf,,*.fb2,,*.djvu::/,
|
||||
\ ::*.7z,,*.apk,,*.bz2,,*.cab,,*.cpio,,*.deb,,*.gem,,*.gz,,*.gzip,,*.lh,,*.lzh,,*.lzma,,*.rar,,*.rpm,,*.tar,,*.tgz,,*.xz,,*.zip,,*.zst::/,
|
||||
\ ::*.cbr,,*.cbz::/,
|
||||
\ ::*.log::/,
|
||||
\ ::*.doc,,*.docx,,*.adoc::/,
|
||||
\ ::*.xls,,*.xlsmx::/,
|
||||
\ ::*.pptx,,*.ppt::/,
|
||||
\ ::*.sqlite,,*.db::'
|
|
@ -307,28 +307,14 @@ noremap <silent> w : if layoutis('only')
|
|||
\| <cr>
|
||||
|
||||
" }}}
|
||||
" Classify (Icons) {{{
|
||||
" file types
|
||||
set classify=' :dir:/, :exe:, :reg:, :link:'
|
||||
" various file names
|
||||
set classify+=' ::../::, ::*.sh::, ::*.[hc]pp::, ::*.[hc]::, ::/^copying|license$/::, ::.git/,,*.git/::, ::*.epub,,*.fb2,,*.djvu::, ::*.pdf::, ::*.htm,,*.html,,**.[sx]html,,*.xml::'
|
||||
" archives
|
||||
set classify+=' ::*.7z,,*.ace,,*.arj,,*.bz2,,*.cpio,,*.deb,,*.dz,,*.gz,,*.jar,,*.lzh,,*.lzma,,*.rar,,*.rpm,,*.rz,,*.tar,,*.taz,,*.tb2,,*.tbz,,*.tbz2,,*.tgz,,*.tlz,,*.trz,,*.txz,,*.tz,,*.tz2,,*.xz,,*.z,,*.zip,,*.zoo::'
|
||||
" images
|
||||
set classify+=' ::*.bmp,,*.gif,,*.jpeg,,*.jpg,,*.ico,,*.png,,*.ppm,,*.svg,,*.svgz,,*.tga,,*.tif,,*.tiff,,*.xbm,,*.xcf,,*.xpm,,*.xspf,,*.xwd::'
|
||||
" audio
|
||||
set classify+=' ::*.aac,,*.anx,,*.asf,,*.au,,*.axa,,*.flac,,*.m2a,,*.m4a,,*.mid,,*.midi,,*.mp3,,*.mpc,,*.oga,,*.ogg,,*.ogx,,*.ra,,*.ram,,*.rm,,*.spx,,*.wav,,*.wma,,*.ac3::'
|
||||
" media
|
||||
set classify+=' ::*.avi,,*.ts,,*.axv,,*.divx,,*.m2v,,*.m4p,,*.m4v,,*.mka,,*.mkv,,*.mov,,*.mp4,,*.flv,,*.mp4v,,*.mpeg,,*.mpg,,*.nuv,,*.ogv,,*.pbm,,*.pgm,,*.qt,,*.vob,,*.wmv,,*.xvid::'
|
||||
" office files
|
||||
set classify+=' ::*.doc,,*.docx::, ::*.xls,,*.xls[mx]::, ::*.pptx,,*.ppt::'
|
||||
|
||||
" }}}
|
||||
"
|
||||
" ------------------------------------------------------------------------------
|
||||
" Filetypes {{{
|
||||
" ------------------------------------------------------------------------------
|
||||
|
||||
" give pretty nerdfont-devicon icons to most files
|
||||
source $VIFM/favicons.vifm
|
||||
|
||||
" The file type is for the default programs to be used with
|
||||
" a file extension.
|
||||
" :filetype pattern1,pattern2 defaultprogram,program2
|
||||
|
|
Loading…
Reference in a new issue