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:15] – [Customized Thumbnailer for folders] tozxfce:thunar:tumbler [2019/04/23 13:00] – [Customized Thumbnailer for folders] toz
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>
 +
 +Note: imagemagick is a required dependency for this script.