Vifm and Überzug (Ueberzug) Image Previews

  Рет қаралды 27,224

DistroTube

DistroTube

5 жыл бұрын

I switched to vifm as my file manager a couple of months ago. But one feature I was struggling with getting to work was image previews. With Überzug, and some scripts that the main developer recently posted on Reddit, I was able to get image previews working on vifm!
📰 REFERENCED:
github.com/seebye/ueberzug
• Image previews in the ...
/ ueberzug_v1810_released
gitlab.com/dwt1/dotfiles/tree...
💰 WANT TO SUPPORT THE CHANNEL?
Patreon: / distrotube
Paypal: www.paypal.com/cgi-bin/webscr...
👕 BUY SHIRTS AND MUGS:
Help support this channel by purchasing these fine t-shirts, hoodies and mugs.
teespring.com/stores/distrotube
🗨️ JOIN ME ON DIASPORA AND MASTODON:
diasp.org/people/792034802a05...
mastodon.technology/web/accou...
📁 MY CONFIGS:
GitLab: gitlab.com/dwt1
Your support is very much appreciated. Thanks, guys!

Пікірлер: 93
@tc40390
@tc40390 5 жыл бұрын
Now that Ueberzug works great with vifm I modified the vifmimg to not only display images but previews of videos and I thought I'd share it. This requires ffmpegthumbnailer. First of all you need to change the fileviewer for whatever video files you want previews on like so: fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob, \*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx \ vifmimg videopreview %px %py %pw %ph %c \ %pc \ vifmimg clear Secondly you need to change the vifmimg script: #!/usr/bin/env bash readonly ID_PREVIEW="preview" if [ -e "$FIFO_UEBERZUG" ]; then if [[ "$1" == "draw" ]]; then declare -p -A cmd=([action]=add [identifier]="$ID_PREVIEW" [x]="$2" [y]="$3" [width]="$4" [height]="$5" \ [path]="${PWD}/$6") \ > "$FIFO_UEBERZUG" elif [[ "$1" == "videopreview" ]]; then [[ ! -f "/tmp/$6.png" ]] && ffmpegthumbnailer -i "${PWD}/$6" -o "/tmp/$6.png" -s 0 -q 10 declare -p -A cmd=([action]=add [identifier]="$ID_PREVIEW" [x]="$2" [y]="$3" [width]="$4" [height]="$5" \ [path]="/tmp/$6.png") \ > "$FIFO_UEBERZUG" elif [[ "$1" == "clear" ]]; then declare -p -A cmd=([action]=remove [identifier]="$ID_PREVIEW") \ > "$FIFO_UEBERZUG" fi fi
@umka7536
@umka7536 5 жыл бұрын
Wow! Thanks!
@tc40390
@tc40390 5 жыл бұрын
​@@umka7536 You're most welcome, cheers!
@tc40390
@tc40390 5 жыл бұрын
I'm working on getting gif previews work in vifm now, if any of you have any ideas please let me know. Here's what I've come up with so far (this requires imagemagick). You need to add this if case in vifmimg: elif [[ "$1" == "gifpreview" ]]; then [[ ! -d "/tmp/$6" ]] && mkdir -p "/tmp/$6" convert -coalesce "${PWD}/$6" "/tmp/$6/$6.png" for frame in $(ls -1 /tmp/$6/$6*.png | sort -V); do declare -p -A cmd=([action]=add [identifier]="$ID_PREVIEW" [x]="$2" [y]="$3" [width]="$4" [height]="$5" \ [path]="$frame") \ > "$FIFO_UEBERZUG" sleep .07 done And modify the vifmrc like so: fileviewer *.gif \ vifmimg gifpreview %px %py %pw %ph %c \ %pc \ vifmimg clear It is kind of unresponsive as of now meaning that once the animation has started the only way to break out of it is to CTRL-C.
@tc40390
@tc40390 5 жыл бұрын
I've also added PDF previews but instead of spamming the comments here I created a repo on github. github.com/cirala/vifmimg
@antoineleduc7611
@antoineleduc7611 4 жыл бұрын
@@tc40390 you rock !
@andrewpalm2103
@andrewpalm2103 5 жыл бұрын
Great stuff, Derek. Thanks.
@ChemicBob
@ChemicBob 5 жыл бұрын
Grüße an die anderen deutschen, die die ganze Zeit Öbösög hören. I still like your content by the way ;)
@jabuticaba2000
@jabuticaba2000 5 жыл бұрын
ja man, schlaaand !
@ChemicBob
@ChemicBob 5 жыл бұрын
I wonder whether the name was deliberately chosen to have people butcher the prononciation. Same with Herbstluftwm.
@MisterWayneTV
@MisterWayneTV 5 жыл бұрын
@@ChemicBob I wonder if the creater is german or knows what the name means.
@jabuticaba2000
@jabuticaba2000 5 жыл бұрын
yes ze german real Wunderwaffe: D2
@Whateverthehell123
@Whateverthehell123 3 жыл бұрын
Ermagerd, Überzug!
@Spuny4
@Spuny4 5 жыл бұрын
just what i was looking for today ;) saved me a lot of work ;)
@MartinOscarPapa
@MartinOscarPapa 5 жыл бұрын
Great work . Love vifm. You should do more vifm.
@wilfridtaylor
@wilfridtaylor 5 жыл бұрын
Wait, your not Luke Smith? :p
@greob
@greob 5 жыл бұрын
Nice! Uberzug is a cool project. Was thinking of trying it out.
@possumcode
@possumcode 2 жыл бұрын
vifm is truly the best file manager !
@akshatvats7992
@akshatvats7992 3 жыл бұрын
Got it working. Thanks man!
@lakecitymy
@lakecitymy 5 жыл бұрын
Thanks for the work! May be it has sense to mention that one needs to install Imlib library (apt-get install libimlib2 libimlib2-dev, Ubuntu 18.04). It can save time ;)
@motif5775
@motif5775 3 жыл бұрын
Awesome vid...thank you!!
@jabuticaba2000
@jabuticaba2000 5 жыл бұрын
we are the Vorhaut of Linux!
@benschools
@benschools 5 жыл бұрын
Coffee and chocolate pop-tart is a good combo. Breakfast of champions!
@ertwro
@ertwro 5 жыл бұрын
Yeah, welcome to the ûberzug side of things. Edit: I'm sorry for not sharing a script. Sometimes I´m oblivious to other people's time and forget to share because it actually seems easy but at some point, it wasn't. I'm also glad to see you keep on giving surf a chance.
@RicardoRebelo99
@RicardoRebelo99 2 жыл бұрын
I love these videos. Thank you for these! Ps: I'm not American and I'm really intrigued by your accent. It sounds really cool and I enjoy listening to it. Is the accent from a specific state or area?
@nortexoid
@nortexoid 5 жыл бұрын
Ooh-ber-tszoog
@DistroTube
@DistroTube 5 жыл бұрын
Gesundheit.
@AegirAexx
@AegirAexx 5 жыл бұрын
Dude... Thank You!!
@DistroTube
@DistroTube 5 жыл бұрын
Thanks. Hope it helped you.
@gz6616
@gz6616 5 жыл бұрын
I wonder is it possible to use Ueberzug to create a mini-map plugin for vim, by displaying a super zoomed out view of the current buffer.
@alecgerona
@alecgerona 4 жыл бұрын
If you're an idiot like me and it's your first time using vifm, don't forget to run :view inside vifm to actually show previews.
@kellingc
@kellingc 5 жыл бұрын
I give the chocolate pop-tart full credit on getting the previews working. ;)
@DistroTube
@DistroTube 5 жыл бұрын
I break it down as such: 60% chocolate pop tart, 30% coffee and 10% dumb luck. You always have to factor in luck.
@theAIex2
@theAIex2 5 жыл бұрын
I was trying to add the modifications to get image previews, then use the script to start vifm but as soon as the cursor reach any image to get the preview vifm hangs. Do you have any idea of what can be wrong? I have installed ueberzug using pip
@CrustyAbsconder
@CrustyAbsconder 5 жыл бұрын
My install of Neon with Plasma 5.15.2 is idling at 630 MB. That is good enough for me. I am certain my next desktop computer will have more RAM and faster RAM. As I type this in Firefox 65, it is only using 1.30 GB. And while I am typing this, my Intel i5-3470 is barely awake with all four cores churning at around 2 %. I am only suggesting that distros like Kubuntu have a bright future at least through 2020. That all being said, I am looking forward to someday installing Fuchsia OS, on this computer.
@UNDETGreenMT
@UNDETGreenMT 4 жыл бұрын
Hey DT I'm trying to get Uberzug working in Vifm and it's still showing me all that metadata when I try to preview image files. I know Uberzug is working though because I can run the ub.sh script and it'll show the image. I copied your vifmrc, vifmimg, and vifmrun straight from your gitlab. I've tried running ./vifmrun in Alacritty, Kitty, and deepin terminals but still haven't had any luck. Is there something that I'm missing? Maybe something I need in my .zshrc file? If anyone could offer some insight I'd greatly appreciate it!
@Dr-Brown
@Dr-Brown 3 жыл бұрын
Same here, wondering if it's still working. I had it on an old machine so I know it used to work!
@Dr-Brown
@Dr-Brown 3 жыл бұрын
Found my problem. Running `:fileviewer img.jpg` didn't have the vifmimg command at the top of the list. I had to go and comment out the other fileviewer command that was in the default vifmrc
@DanCalloway
@DanCalloway 5 жыл бұрын
DistroTube, how did you install the uberzug library on your Arch system. I can't seem to get pip3 command installed as I was following the installation instructions? Thanks.
@DistroTube
@DistroTube 5 жыл бұрын
I think I installed it from the AUR.
@DanCalloway
@DanCalloway 5 жыл бұрын
@@DistroTube I was finally able to install it in python and then ran the install for ueberzug. It said it was installed successfully. I think I'm good. Now, I need to work on incorporating the other stuff that you mentioned at the end so that images show up in vifm, for example
@Freerydeful
@Freerydeful 4 жыл бұрын
Great video, tx again, one question, how do you get the image previews to stretch & fill up the whole preview pane?
@vladyslavrezohlazov7499
@vladyslavrezohlazov7499 4 жыл бұрын
Did you find the answer? I cannot stretch & fill up the whole prewiev pane too. It saves the original image resolution...
@Freerydeful
@Freerydeful 4 жыл бұрын
reddit answer: www.reddit.com/r/commandline/comments/ee42v6/vifmueberzug_how_to_stretch_image_to_fill_preview/
@Freerydeful
@Freerydeful 4 жыл бұрын
From reddit: www.reddit.com/r/commandline/comments/ee42v6/vifmueberzug_how_to_stretch_image_to_fill_preview/ Edit vifmimg: Specify for each add command ([action]=add) an image scaler (e.g. [scaler]="fit_contain"). The supported image scaler are listed right here. For example: declare -p -A cmd=([action]=add [identifier]="$ID_PREVIEW" [x]="$2" [y]="$3" [width]="$4" [height]="$5" \ [path]="${PWD}/$6") \ > "$FIFO_UEBERZUG" becomes declare -p -A cmd=([action]=add [identifier]="$ID_PREVIEW" [x]="$2" [y]="$3" [width]="$4" [height]="$5" \ [scaler]="fit_contain" [path]="${PWD}/$6") \ > "$FIFO_UEBERZUG"
@KamilT
@KamilT 5 жыл бұрын
Hey Derek, what do you think about Ryzen processors? Will you wait for Zen 2?
@DistroTube
@DistroTube 5 жыл бұрын
No opinion on the matter except "I want one!" :D
@quiquecrz6451
@quiquecrz6451 3 жыл бұрын
@DistriTube thanks a lot for the video. Is there any shortcut needed to press to activate the image preview? Can't find any info about it
@Dr-Brown
@Dr-Brown 3 жыл бұрын
It's the :view command for previewing in the second pane
@sreejamukherjee5608
@sreejamukherjee5608 3 жыл бұрын
What is the color themes for the thumbnail for this video? Looks cool
@francois86sc
@francois86sc 4 жыл бұрын
Does anyone knows, what is the code to execute the vifmrun script with a keybinding that must be add inside of config.py
@bobgrimes8618
@bobgrimes8618 5 жыл бұрын
Derek, do you use command line exclusively?
@DistroTube
@DistroTube 5 жыл бұрын
Not exclusively. But I don't avoid it. Most of the time, it's quite convenient just to type a couple of words at a command prompt rather than fooling with graphical programs.
@michaelderei8703
@michaelderei8703 4 жыл бұрын
how did you made the images take all the preview area?
@mandaren6510
@mandaren6510 4 жыл бұрын
What is the shortcut to enable image previewing in vifm?
@Dr-Brown
@Dr-Brown 3 жыл бұрын
It's the :view command
@sheikhshakilakhtar6844
@sheikhshakilakhtar6844 4 жыл бұрын
Is there any way to have multiple tabs like in ranger?
@jeronimogarcia3766
@jeronimogarcia3766 5 жыл бұрын
Hey mate , what fonts are you using ?
@DistroTube
@DistroTube 5 жыл бұрын
UbuntuMono Nerd Font. Installed it from the AUR. But you can find the Nerd Fonts on the web and manually install it in any distro.
@kelvinmuliawan6391
@kelvinmuliawan6391 4 жыл бұрын
how to get to preview mode in vifm?
@rogerdelgado8570
@rogerdelgado8570 5 жыл бұрын
Having trouble getting it to work with zsh. Seems to only work with bash shell according to website
@DistroTube
@DistroTube 5 жыл бұрын
I was using zsh in this video. ;)
@rogerdelgado8570
@rogerdelgado8570 5 жыл бұрын
That was helpful. Got things to work. Uninstalled Ueberzug from pip and built it from source. Got much better results. A lot more stable now using multiple terminals. Thanks
@verstrahlt1907
@verstrahlt1907 4 жыл бұрын
@2'25'' - is this nice looking terminal called "st terminal"? or is it native for the Arch-Linux. Can I get it for fedora?
@verstrahlt1907
@verstrahlt1907 4 жыл бұрын
I found something... gnunn1 / Tilix (emulator)
@verstrahlt1907
@verstrahlt1907 4 жыл бұрын
It does not look so cool and informative, like yours (with this "coloured-arrows"
@userx9166
@userx9166 4 жыл бұрын
what is the keybindings to preview?
@motif5775
@motif5775 3 жыл бұрын
How do you make vifmrun script executable??
@charbelsarkis3567
@charbelsarkis3567 3 жыл бұрын
did anyone figure out how to make it run with .gif files. I realize that his script includes gifpreview but that breaks what i have.
@Microphunktv-jb3kj
@Microphunktv-jb3kj 4 жыл бұрын
does it preview svg's too?
@pharrellyang3483
@pharrellyang3483 4 жыл бұрын
Does anyone successfully configure it on Mac?
@green4ao
@green4ao 5 жыл бұрын
How about Swaywm?
@rogerdelgado8570
@rogerdelgado8570 5 жыл бұрын
w3m works for me in termite.
@gatterlinux8426
@gatterlinux8426 5 жыл бұрын
Man try fff is so beautiful and full writing in bash
@chrissxMedia
@chrissxMedia 5 жыл бұрын
uh-ber-sag lolz
@versusbassz
@versusbassz Жыл бұрын
"seebye/ueberzug" repo on GIthub "is not maintained" anymore, unfortunately
@charbelsarkis3567
@charbelsarkis3567 3 жыл бұрын
Where can I get your st build?
@raushonmunni2633
@raushonmunni2633 3 жыл бұрын
his gitlab
@umka7536
@umka7536 5 жыл бұрын
Thanks for a video, Derek. But I see that you struggle to search things in command line. I am using "Fuzzy finder" github.com/junegunn/fzf in both command line and NeoVIM. Try it please if you have not tried it yet.
@csehszlovakze
@csehszlovakze Жыл бұрын
HEY DT! the project just got killed after the author was harassed for a while.
@reziiwastaken
@reziiwastaken 5 жыл бұрын
Why are you using light mode?
@Scrubsexplorer
@Scrubsexplorer 5 жыл бұрын
Copied the files from the git without even thinking It still does not work
@alexweissnicht9545
@alexweissnicht9545 5 жыл бұрын
Have you found a solution ? 🙃
vifm - The Terminal File Manager For The Vim-Centric User
24:07
DistroTube
Рет қаралды 75 М.
What Are Linux Users Putting In Their Config Files?
31:47
DistroTube
Рет қаралды 92 М.
НЫСАНА КОНЦЕРТ 2024
2:26:34
Нысана театры
Рет қаралды 682 М.
Smart Sigma Kid #funny #sigma #comedy
00:26
CRAZY GREAPA
Рет қаралды 18 МЛН
ВОДА В СОЛО
00:20
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 27 МЛН
A Few Vim Plugins That Have Impressed Me Recently
13:31
DistroTube
Рет қаралды 122 М.
Icons And Image Previews In Vifm, Plus Xterm Is Great!
13:56
DistroTube
Рет қаралды 27 М.
Image previews in the terminal with Überzug? (ueberzug)
7:39
Luke Smith
Рет қаралды 39 М.
Vimrc and Vim Plug-In Overview
13:24
Luke Smith
Рет қаралды 111 М.
The lf File Manager is Ranger But Better
9:18
Brodie Robertson
Рет қаралды 38 М.
Arch Linux custom dwm rice | xorg
3:25
ajeet archive
Рет қаралды 3,6 М.
Java Is Better Than Rust
42:14
ThePrimeTime
Рет қаралды 132 М.
sxiv: The Suckless Image Viewer for GNU/Linux
11:23
Luke Smith
Рет қаралды 138 М.
How To Make Your Tiling Window Manager Look Amazing
12:56
DistroTube
Рет қаралды 182 М.
Kumanda İle Bilgisayarı Yönetmek #shorts
0:29
Osman Kabadayı
Рет қаралды 1,7 МЛН
Как бесплатно замутить iphone 15 pro max
0:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 6 МЛН
Look, this is the 97th generation of the phone?
0:13
Edcers
Рет қаралды 6 МЛН
$1 vs $100,000 Slow Motion Camera!
0:44
Hafu Go
Рет қаралды 27 МЛН