Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
xfce:thunar:tumbler [2018/08/24 16:30] – [Desktop Thumbnailer Plugin] alexxcons | xfce:thunar:tumbler [2019/11/22 03:05] – added bottom of page navigation kevinbowen | ||
---|---|---|---|
Line 70: | Line 70: | ||
==== Customized Thumbnailer for folders ==== | ==== 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 '' | + | 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 '' |
<file txt / | <file txt / | ||
[Thumbnailer Entry] | [Thumbnailer Entry] | ||
Line 78: | Line 78: | ||
Name=Folder Thumbnailer | Name=Folder Thumbnailer | ||
MimeType=inode/ | MimeType=inode/ | ||
- | Exec=/ | + | Exec=/ |
</ | </ | ||
+ | |||
+ | 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 / | <file sh / | ||
#!/bin/bash | #!/bin/bash | ||
- | convert -thumbnail " | + | convert -thumbnail " |
- | convert -thumbnail " | + | convert -thumbnail " |
- | convert -thumbnail " | + | convert -thumbnail " |
- | convert -thumbnail " | + | convert -thumbnail " |
- | rm -f " | + | rm -f " |
- | rm -f " | + | rm -f " |
- | rm -f " | + | rm -f " |
- | rm -f " | + | rm -f " |
- | exit 0 | + | exit 1 |
</ | </ | ||
+ | |||
+ | Dont forget to give execution permission to the file! E.g: sudo chmod a+x / | ||
+ | |||
+ | 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 / | ||
+ | [Thumbnailer Entry] | ||
+ | Version=1.0 | ||
+ | Encoding=UTF-8 | ||
+ | Type=X-Thumbnailer | ||
+ | Name=Text Thumbnailer | ||
+ | MimeType=text/ | ||
+ | Exec=/ | ||
+ | </ | ||
+ | |||
+ | And supporting script: | ||
+ | |||
+ | <file sh / | ||
+ | #!/bin/bash | ||
+ | iFile=$(<" | ||
+ | iChopped=" | ||
+ | unset iFile | ||
+ | echo " | ||
+ | unset iChopped | ||
+ | convert -size 210x290 -background white -pointsize 5 -border 10x10 -bordercolor "# | ||
+ | rm tmp.txt | ||
+ | </ | ||
+ | |||
+ | You can add additional mime types to the MimeType line of the thumbnailer file to support additional text-based document types. | ||
+ | |||
+ | |||
+ | [[|Back To Top]] | ||
+ | ---- | ||
+ | [[: |