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 00:13] – [Customized Thumbnailer for folders] tozxfce:thunar:tumbler [2018/08/25 20:35] – [Customized Thumbnailer for folders] alexxcons
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  ''folder.jpg'' or ''cover.jpg'' into a folder and display its thumbnail instead od the default folder icon:+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> <file txt /usr/share/thumbnailers/folder.thumbnailer>
 [Thumbnailer Entry] [Thumbnailer Entry]
Line 78: Line 78:
 Name=Folder Thumbnailer Name=Folder Thumbnailer
 MimeType=inode/directory; MimeType=inode/directory;
-Exec=/usr/bin/folder-thumbnailer %s %i %o+Exec=/usr/bin/folder-thumbnailer %s %i %o %u
 </file> </file>
  
Line 86: Line 86:
 #!/bin/bash #!/bin/bash
  
-convert -thumbnail "$1" "$2/folder.jpg" "$3" > /dev/null 2>&1 ||\ +convert -thumbnail "$1" "$2/folder.jpg" "$3" 1>/dev/null 2>&1 ||\ 
-convert -thumbnail "$1" "$2/.folder.jpg" "$3" > /dev/null 2>& ||\ +convert -thumbnail "$1" "$2/.folder.jpg" "$3" 1>/dev/null 2>&1 ||\ 
-convert -thumbnail "$1" "$2/folder.png" "$3" > /dev/null 2>& ||\ +convert -thumbnail "$1" "$2/folder.png" "$3" 1>/dev/null 2>&1 ||\ 
-convert -thumbnail "$1" "$2/cover.jpg" "$3" > /dev/null 2>& ||\ +convert -thumbnail "$1" "$2/cover.jpg" "$3" 1>/dev/null 2>&1 ||\ 
-rm -f "$HOME/.cache/thumbnails/normal/$(echo -n "file://$2" | md5sum | cut -d " " -f1).png" ||\ +rm -f "$HOME/.cache/thumbnails/normal/$(echo -n "$4" | md5sum | cut -d " " -f1).png" ||\ 
-rm -f "$HOME/.thumbnails/normal/$(echo -n "file://$2" | 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 "file://$2" | 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 "file://$2" | md5sum | cut -d " " -f1).png" ||\ +rm -f "$HOME/.thumbnails/large/$(echo -n "$4" | md5sum | cut -d " " -f1).png" ||\ 
-exit 0+exit 1
 </file> </file>