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
Next revisionBoth sides next revision
xfce:thunar:tumbler [2018/08/25 15:37] – [Customized Thumbnailer for folders] alexxconsxfce:thunar:tumbler [2019/11/30 00:08] – Added overview on available tumbler plugins alexxcons
Line 24: Line 24:
 ! 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.
  
 +===== Available Plugins =====
 +=== Image Thumbnailers ===
 +  * JPEG-thumbnailer
 +     * - Details missing. Please add, if known -
 +     * Is it still thumbnailer needed ? Pixbuf-thumbnailer as well supports jpeg. Is this one 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 CR3, Epson ERF, Fuji RAF, Minolta MRW, Nikon NEF and NRW, Olympus ORF, Panasonic RAW and RW2, Pentax PEF, Sony ARW)
 +=== Video Thumbnailers ===
 +  * Cover-thumbnailer
 +     * Download cover from omdbapi.com or themoviedb.org if an API key is given. See details below 
 +  * ffmpeg-thumbnailer
 +     * - Details missing. Please add, if known -
 +  * GStreamer-thumbnailer
 +     * - Details missing. Please add, if known -
 +=== Other Thumbnailers ===
 +  * Font thumbnailer
 +     * - Details missing. Please add, if known -
 +  * Poppler thumbnailer
 +     * Thumbnailer for PS/PDF files
 +  * Odf thumbnailer
 +     * Open document thumbnailer
 +  * Desktop thumbnailer
 +     * All thumbnailers provided by *.desktop files 
  
 ===== Cover Thumbnailer ===== ===== Cover Thumbnailer =====
Line 94: Line 119:
 rm -f "$HOME/.cache/thumbnails/large/$(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" ||\ rm -f "$HOME/.thumbnails/large/$(echo -n "$4" | md5sum | cut -d " " -f1).png" ||\
-exit 0+exit 1
 </file> </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.
 +
 +
 +[[|Back To Top]]
 +----
 +[[:xfce:thunar:|Back to Thunar documentation page]]