vifm: Extend nsxiv thumbnailer

Now works recursively, only looks for fitting format extensions and can
display video thumbnails as well.

All options are documented in `-h` help display - `-r` enables recursive
lookup for directory current file is in, `-m` enables displaying video
thumbnails (takes a little longer to load) and `-t` starts nsxiv in
thumbnail mode.
This commit is contained in:
Marty Oehme 2022-05-01 18:45:21 +02:00
parent 89c028c8d6
commit 4abfc41ca2
Signed by: Marty
GPG key ID: B7538B8F50A1C800
2 changed files with 120 additions and 2 deletions

View file

@ -290,7 +290,8 @@ nnoremap <space>F :grep<space>
" preview thumbnails of current folder
" select thumbnails with m/M in nsxiv
" to generate a filtered view on them
nnoremap <space>t :!nsxiv -t %u -o %d<cr>
nnoremap <space>t :!vifm-thumbnailer -t %u %c<cr>
nnoremap <space>T :!vifm-thumbnailer -r -t %u %c<cr>
" allows preview to work for normal view and single pane view
noremap <silent> w : if &quickview && !layoutis('only')
@ -318,7 +319,7 @@ set classify+=' ::*.bmp,,*.gif,,*.jpeg,,*.jpg,,*.ico,,*.png,,*.ppm,,*.svg,,*.
" 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::'
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::'
@ -433,6 +434,8 @@ fileviewer *.gif
" Images
filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
\ {View in nsxiv directory viewer}
\ vifm-thumbnailer %c,
\ {View in nsxiv}
\ nsxiv %f,
\ {View in vimiv}