Xfce Wiki

Sub domains
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
xfce:thunar:tumbler [2018/01/04 03:35] – [Desktop Thumbnailer Plugin] tozxfce:thunar:tumbler [2020/08/08 04:16] – [Available Plugins] removed CR3 from raw thumbnailer - support does not yet exist toz
Line 1: Line 1:
 ====== Tumbler ====== ====== Tumbler ======
 The Tumbler package contains a D-Bus thumbnailing service based on the thumbnail management D-Bus specification. This is useful for generating thumbnail images of files.  The Tumbler package contains a D-Bus thumbnailing service based on the thumbnail management D-Bus specification. This is useful for generating thumbnail images of files. 
 +
 +===== Available Plugins =====
 +Tumbler allows to load a number plugins to support different file formats. Most plugins are loaded by default, if the required libraries are provided.
 +=== Image Thumbnailers ===
 +  * __JPEG-thumbnailer__
 +     * - Details missing. Please add, if known -
 +     * Is that plugin still needed ? Pixbuf-thumbnailer as well supports jpeg. Is this plugin faster ?
 +  * __Pixbuf-thumbnailer__
 +     * Supports all type GdkPixbuf supports (Gtk3.22: ani, bmp, GdkPixdata, gif, icns, ico, jpeg, png, pnm, qtif, svg, tga, tiff, wmf, xbm, xpm)
 +  * __Raw-thumbnailer__
 +      RAW image files using libopenraw (Adobe DNG, Canon CRW CR2, Epson ERF, Fuji RAF, Minolta MRW, Nikon NEF and NRW, Olympus ORF, Panasonic RAW and RW2, Pentax PEF, Sony ARW)
 +=== Video Thumbnailers ===
 +  * __Cover-thumbnailer__
 +     * Downloads video covers from omdbapi.com or themoviedb.org. [[xfce:thunar:tumbler#cover_thumbnailer|See details below ]]
 +  * __ffmpeg-thumbnailer__
 +     * - Details missing. Please add, if known -
 +     * Requires package: ??
 +  * __GStreamer-thumbnailer__
 +     * Provides video and audio cover (e.g. mp3, flac, etc) thumbnails.
 +     * Requires package: gstreamer1.0-plugins-* (debian), gstreamer1-plugins-* (fedora), gst-plugins-* (Arch)
 +=== Other Thumbnailers ===
 +  * __Font-thumbnailer__
 +     * - Details missing. Please add, if known -
 +  * __Poppler-thumbnailer__
 +     * Thumbnailer for PS/PDF files
 +     * Requires package: //poppler-utils//
 +  * __ODF-thumbnailer__
 +     * Provides thumbnails for different open document types, oasis.opendocument (presentation, text,chart, image), sun.xml ( calc, writer, draw, impress. math) and some more
 +     * Here the [[https://git.xfce.org/xfce/tumbler/tree/plugins/odf-thumbnailer/odf-thumbnailer-provider.c#n104|complete MIME Type List]]
 +  * __Customized thumbnailers__
 +     * All thumbnailers provided by .thumbnailer desktop files. [[xfce:thunar:tumbler#customized_thumbnailers|See examples below ]]
 +
 +----
  
 ===== Configuration ===== ===== Configuration =====
Line 24: Line 57:
 ! Maximum size of the source file the plugin will still try to generate a plugin for. The size is in bytes, 0 disabled the check. ! Maximum size of the source file the plugin will still try to generate a plugin for. The size is in bytes, 0 disabled the check.
  
 +----
  
 ===== Cover Thumbnailer ===== ===== Cover Thumbnailer =====
Line 43: Line 77:
 After creating the rc file, it is best to log off and on again to restart Thunar and Tumbler, because both applications cache the mime-type combinations. After creating the rc file, it is best to log off and on again to restart Thunar and Tumbler, because both applications cache the mime-type combinations.
  
-===== Desktop Thumbnailer Plugin ===== +---- 
-As of version 0.2.0, the desktop thumbnailer functionality has been added back into tumbler. This functionality supports custom .thumbailer files placed in the /usr/shre/thumbnailers folder.+ 
 +===== Customized Thumbnailers ===== 
 +As of version 0.2.0, the desktop thumbnailer functionality has been added back into tumbler. This functionality supports custom .thumbnailer files placed in the /usr/share/thumbnailers folder. 
 + 
 +==== Customized Thumbnailer for .dds files ====
  
 For example, to create a custom thumbnailer for .dds files, do the following: For example, to create a custom thumbnailer for .dds files, do the following:
Line 65: Line 103:
     </mime-type>     </mime-type>
 </mime-info></file>...and run "update-mime-database ~/.local/share/mime". </mime-info></file>...and run "update-mime-database ~/.local/share/mime".
 +
 +==== Customized Thumbnailer for folders ====
 +
 +Another example are albums cover thumbnails for folders in a music collection. Starting with thunar 1.8.2 a custom thumbnailer can be added to e.g. add a file  ''folder.jpg'' or ''cover.jpg'' into a folder and display its thumbnail instead of the default folder icon:
 +<file txt /usr/share/thumbnailers/folder.thumbnailer>
 +[Thumbnailer Entry]
 +Version=1.0
 +Encoding=UTF-8
 +Type=X-Thumbnailer
 +Name=Folder Thumbnailer
 +MimeType=inode/directory;
 +Exec=/usr/bin/folder-thumbnailer %s %i %o %u
 +</file>
 +
 +In order to support different names for the picture-file and to remove the thumbnail if not needed any more (display the default folder icon) , a separate script is required:
 +
 +<file sh /usr/bin/folder-thumbnailer>
 +#!/bin/bash
 +
 +convert -thumbnail "$1" "$2/folder.jpg" "$3" 1>/dev/null 2>&1 ||\
 +convert -thumbnail "$1" "$2/.folder.jpg" "$3" 1>/dev/null 2>&1 ||\
 +convert -thumbnail "$1" "$2/folder.png" "$3" 1>/dev/null 2>&1 ||\
 +convert -thumbnail "$1" "$2/cover.jpg" "$3" 1>/dev/null 2>&1 ||\
 +rm -f "$HOME/.cache/thumbnails/normal/$(echo -n "$4" | md5sum | cut -d " " -f1).png" ||\
 +rm -f "$HOME/.thumbnails/normal/$(echo -n "$4" | md5sum | cut -d " " -f1).png" ||\
 +rm -f "$HOME/.cache/thumbnails/large/$(echo -n "$4" | md5sum | cut -d " " -f1).png" ||\
 +rm -f "$HOME/.thumbnails/large/$(echo -n "$4" | md5sum | cut -d " " -f1).png" ||\
 +exit 1
 +</file>
 +
 +Dont forget to give execution permission to the file! E.g: sudo chmod a+x /usr/bin/folder-thumbnailer
 +
 +Note: imagemagick is a required dependency for this script.
 +
 +==== Customized Thumbnailer for text-based documents ====
 +A thumbnailer for text-based documents can be created using the convert function from the imagemagick package with the following thumbnailer file:
 +
 +<file txt /usr/share/thumbnailers/text.thumbnailer>
 +[Thumbnailer Entry]
 +Version=1.0
 +Encoding=UTF-8
 +Type=X-Thumbnailer
 +Name=Text Thumbnailer
 +MimeType=text/plain;text/html;text/css;
 +Exec=/usr/local/bin/textthumb %s %i %o
 +</file>
 +
 +And supporting script:
 +
 +<file sh /usr/local/bin/textthumb>
 +#!/bin/bash
 +iFile=$(<"$2")
 +iChopped="${iFile:0:1600}"
 +unset iFile
 +echo "${iChopped}" > tmp.txt
 +unset iChopped
 +convert -size 210x290 -background white -pointsize 5 -border 10x10 -bordercolor "#CCC" caption:@"tmp.txt" "$3"
 +rm tmp.txt
 +</file>
 +
 +You can add additional mime types to the MimeType line of the thumbnailer file to support additional text-based document types.
 +
 +==== Customized Thumbnailer for comic book archives ====
 +A thumbnailer for comic book archives (cbr, cbz, cbt, cb7) can be created using the comicthumb utility (search for it your distro's repositories). Use the following thumbnailer file:
 +<file txt /usr/share/thumbnailers/comicthumb.thumbnailer>
 +[Thumbnailer Entry]
 +TryExec=comicthumb
 +Exec=comicthumb %u %o %s
 +MimeType=application/x-cb7;application/x-cbr;application/x-cbt;application/x-cbz;application/x-ext-cb7;
 +application/x-ext-cbr;application/x-ext-cbt;application/x-ext-cbz;application/vnd.comicbook-rar
 +</file>
 +
 +==== Customized Thumbnailer for webp content ====
 +Note: Make sure there is an image/webp mimetype defined in your system.
 +<file txt /usr/share/thumbnailers/webp.thumbnailer>
 +[Thumbnailer Entry]
 +Version=1.0
 +Encoding=UTF-8
 +Type=X-Thumbnailer
 +Name=webp Thumbnailer
 +MimeType=image/webp;
 +Exec=/usr/bin/convert -thumbnail %s %i %o
 +</file>
 +
 +[[|Back To Top]]
 +----
 +[[:xfce:thunar:|Back to Thunar documentation page]]