4

With the file manager Thunar, when I click on a picture, it will open it with feh. However, the picture is usually too big for my windows and I would like to scale it down automatically.

This can be done with the following command: feh --scale-down --auto-zoom something.jpg

Is it possible to configure Thunar to use theses options for feh by default ?

Nakrule
  • 163

1 Answers1

3

Copy over /usr/share/applications/feh.desktop to ~/.local/share/applications/ and change the Exec= to match what is shown below.

[Desktop Entry]
Name=Feh
Name[fr_FR]=Feh
Name[de_DE]=Feh
GenericName=Image viewer
GenericName[fr_FR]=Visualisateur d'image
GenericName[de_DE]=Bildbetrachter
Comment=Image viewer
Comment[fr_FR]=Visualisateur d'image
Comment[de_DE]=Bildbetrachter
Exec=feh --scale-down --auto-zoom %F
Icon=image-viewer
Type=Application
StartupNotify=false
NoDisplay=true
Hidden=false
Terminal=false
Categories=Graphics;Viewer;
MimeType=image/jpeg;image/png;image/gif;image/tiff;image/bmp;image/x-icon;image/x-xpixmap;image/x-xbitmap;

Now, when you double-click on an image in Thunar, it should open with feh --scale-down --auto-zoom.

DK Bose
  • 42,548
  • 23
  • 127
  • 221