Xfce Wiki

Sub domains
 

Differences

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

Link to this comparison view

Next revision
Previous revision
xfce:thunar:custom-actions [2012/12/04 11:13] – created nickxfce:thunar:custom-actions [2024/03/29 19:47] (current) – Using dbus-launch seems to be the best way to get proper support for D-Bus services and as few warnings as possible gael
Line 1: Line 1:
-====== Custom actions ======+~~NOTOC~~ 
 +{{ :xfce:xfce.thunar.png?no link|}} 
 +====== Thunar - Custom Actions ======
  
-Thunar allows users to add custom actions to the file and folder context menus (by the use of the ''thunar-uca'' plugin, part of the Thunar distribution, in the ''plugins/'' subdirectory). You can setup new actions in the {gui>Custom Actions} dialog, available via the {gui>Configure custom actions...} item in the {gui>Edit} menu.+Thunar allows users to add custom actions to the file and folder context menus (by the use of the ''thunar-uca'' plugin, part of the Thunar distribution, in the ''plugins/'' subdirectory). You can set up new actions in the {gui>Custom Actions} dialog, available via the {gui>Configure custom actions...} item in the {gui>Edit} menu.
  
 This page serves as an introduction to the **Custom Actions** plugin, and includes a list of useful examples. This page serves as an introduction to the **Custom Actions** plugin, and includes a list of useful examples.
  
-===== Adding a custom action =====+  * **[[#Adding a Custom Action|Adding a Custom Action]]** 
 +  * **[[#Using mnemonics to open Custom Actions|Using mnemonics to open Custom Actions]]** 
 +  * **Examples** 
 +    * **[[#Search files with catfish|Search files with catfish]]** 
 +    * **[[#Work with archives (tar, gzip, etc)|Work with archives (tar, gzip, etc)]]** 
 +    * **[[#Play/Enqueue music files|Play/Enqueue music files]]** 
 +    * **[[#Convert PNGs to JPEGs|Convert PNGs to JPEGs]]** 
 +    * **[[#Rotate JPEGs|Rotate JPEGs]]** 
 +    * **[[#Open terminal here|Open terminal here]]** 
 +    * **[[#Open root terminal here|Open root terminal here]]** 
 +    * **[[#Open thunar as root here|Open thunar as root here]]** 
 +    * **[[#Edit file as root|Edit file as root]]** 
 +    * **[[#Create a symbolic link|Create a symbolic link]]** 
 +    * **[[#Create a hardlink|Create a hardlink]]** 
 +    * **[[#View disk usage of the current directory|View disk usage of the current directory]]** 
 +    * **[[#Open file in terminal text editor|Open file in terminal text editor]]** 
 +    * **[[#Compare selected files/directories|Compare selected files/directories]]** 
 +    * **[[#Change OpenDocument-supported formats|Change OpenDocument-supported formats]]** 
 +    * **[[#Download video subtitles|Download video subtitles]]** 
 +    * **[[#Rename subtitles easily|Rename subtitles easily]]** 
 +    * **[[#Move files into a new folder|Move files into a new folder]]** 
 +    * **[[#Create Shared Thumbnails|Create Shared Thumbnails]]** 
 +    * **[[#Use 'bulk rename' on a single file|Use 'bulk rename' on a single file]]** 
 +    * **[[#Trust multiple desktop files at once|Trust multiple desktop files at once]]** 
 +  * **[[https://help.ubuntu.com/community/ThunarCustomActions|List of assorted custom actions]]** (from Ubuntu documentation)
  
-This section provides a step-by-step introduction to the **Custom Actions** plugin, demonstrating how to add a **Print File** action, which uses xfprint to print text files. We start by opening the **Custom Actions** dialog as explained above. In the dialog, click on the first button in the list of buttons (the one labeled with the ''+''). The **Create Action** dialog will appear, as shown in the screenshot below.+----
  
-On the first page, enter ''Print File'' as name and ''Print the selected using xfprint'' as description. Enter ''xfprint4 %f'' as command (the ''%f'' will be replaced with the path to the selected file, as explained in the dialog), and select an icon for the icon (in the screenshot the ''xfprint.svg'' icon was used). **NB:** Thunar seems to do the sensible thing when passing file/folder names with spaces in them, so don't worry excessively about putting single or double quotes around the "%" placeholder.+===== Adding a Custom Action =====
  
-Nowcontinue with the second page (the {gui>Appearance Conditions} page).+This section provides a step-by-step introduction to the **Custom Actions** plugindemonstrating how to add a simple action. We start by opening the **Custom Actions** dialog as explained above. In the dialog, click on the first button in the list of buttons (the one labeled with the ''+''). The **Create Action** dialog will appear, as shown in the screenshot below.
  
-We want to create an action that is only applicable to text files, so select the **Text Files** options and unselect the options for the other file types. Next you can specify a **File Pattern** to display the action only for text files that match a certain pattern. In the example, we set the file pattern to ''*'' (which matches all filenames) to indicate that the action should be displayed for all text files.+<figure "Create Action Dialog"> 
 +{{:xfce:thunar:uca-create.png|}} 
 +</figure>
  
-That's all. Click **OK** to close the **Create Action** dialog. The new actionlabeled **Print File** will appear in the **Custom Actions** list.+On the first page, enter ''Create symlink'' in {gui>Name:} Enter ''ln -Ts %f %n" (link)"'' for the {gui>Command:} (the ''%f'' will be replaced with the path to the selected file, as explained in the dialog)and select an icon by clicking {gui>Icon:} (in the screenshot ''emblem-symbolic-link'' was used).
  
-Now close the **Custom Actions** dialogselect text file in Thunar and open the context menu (right-click on the file icon). The newly created **Print File** action will appear in the context menu, as shown in the screenshot below.+Optionallyyou can specify {gui>Submenu:}, in order to group multiple custom actions into the same menu.
  
-{{ documentation:thunar-custom-actions-3.png }}+<note>Never quote field codes, unless you know why [particularly true if their expansion contains quotes, but not only]
  
-You can use the [[http://thunar.xfce.org/pwiki/start#mailinglist|thunar-dev mailinglist]] to get in touch with the developers, if you have questions about this short tutorial or custom actions in general.+Always quote shell variable expansions, unless you know why [classical shell programming advice, but it might be useful to recall here]
  
-===== Examples =====+When a field code appears in quotes, you can generally extract it and concatenate: 
 +    cmd "foo %f bar" (wrong) ->; cmd "foo "%f" bar" (correct)
  
-Here are few useful examples of custom actions. Feel free to extend this list.+Or you can put its content in shell variable and use this variable instead: 
 +    cmd "foo %f bar" (wrong) ->; f=%f; cmd "foo $f bar" (correct)
  
-==== Finding files in the current folder ==== +In case of multiple arguments, you can safely use a for loop in that way
-    * Name**Search...** +    for f in %F; do cmd "foo $bar"; done 
-    * Command: ''gnome-search-tool --path=%f'' +</note>
-    * File pattern: * +
-    * Appears if selection contains: Directories+
  
-**Note:** For this actionyou'll need to have ''gnome-search-tool'' installed, which is part of the ''gnome-utils'' package. This program also has a [[http://linux.die.net/man/1/gnome-search-tool|lot of other nice command-line options]] which you could use to create even more specialized actions.+Nowcontinue with the second page (the {gui>Appearance Conditions} page).
  
 +We want to create an action that is only applicable to folders, so select the **Folders** options and unselect the options for the other file types. Next you can specify a **File Pattern** to display the action only for text files that match a certain pattern. In the example, we set the file pattern to ''*'' (which matches all filenames) to indicate that the action should be displayed for all folders.
  
 +That's all. Click **OK** to close the **Create Action** dialog. The new action, labeled **Search with Catfish** will appear in the **Custom Actions** list.
  
 +Now close the **Custom Actions** dialog, select a folder in Thunar and open the context menu (right-click on the file icon). The newly created **Search with Catfish** action will appear in the context menu, as shown in the screenshot below.
  
 +<figure "Custom Actions Dialog">
 +{{:xfce:thunar:uca-list.png}}
 +</figure>
  
 +[[|Back to Top]]
 +----
  
-==== Finding files in the current folder with catfish ==== +===== Using mnemonics to open Custom Actions =====
-    * Name: **Search files...** +
-    * Command: ''%%catfish --fileman=thunar --path=%f%%'' +
-    * File pattern: * +
-    * Appears if selection contains: Directories+
  
-**Note:** For this action, you'll need to have ''catfish'' installedwhich is part of the ''catfish'' package.+When you create a Thunar Custom Action you can set the name with an underscore "_" before a letter to use it as mnemonic.  When you right click in a Thunar viewyou can type the letter to access your custom action. 
 +----
  
 +===== Examples =====
  
 +Here are a few useful examples of custom actions. Feel free to extend this list.
  
  
- +==== Search files with catfish ==== 
- +    * Name: **Search files in folder** 
-==== Finding files inside the selected folder with catfish ==== +    * Command: ''catfish %f''
-    * Name: **Search files inside...** +
-    * Command: ''%%catfish --fileman=thunar --path=%f%d%%''+
     * File pattern: *     * File pattern: *
     * Appears if selection contains: Directories     * Appears if selection contains: Directories
Line 61: Line 94:
 **Note:** For this action, you'll need to have ''catfish'' installed, which is part of the ''catfish'' package. **Note:** For this action, you'll need to have ''catfish'' installed, which is part of the ''catfish'' package.
  
-==== Working with archives  (tar, gzip, etc) ====+---- 
 + 
 +==== Work with archives  (tar, gzip, etc) ====
     * Name: **Extract here (bzip2)**     * Name: **Extract here (bzip2)**
     * Command: ''tar xjf %n''     * Command: ''tar xjf %n''
Line 77: Line 112:
     * Appears if selection contains: Directories     * Appears if selection contains: Directories
  
-**Hint:** You may prefer the [[http://thunar.xfce.org/plugins.html#thunar-archive-plugin|Thunar Archive Plugin]], which does pretty much the same thing with less manual setup required on your part. It's either included with your distribution (in the case of [[http://xubuntu.org/|Xubuntu]]), or available as a separate package (''thunar-archive-plugin'' in Debian Etch). You might also need the ''xarchiver'' or "squeeze" package for things to work quite right.+**Hint:** You may prefer the [[https://docs.xfce.org/xfce/thunar/archive|Thunar Archive Plugin]], which does pretty much the same thing with less manual setup required on your part. It's either included with your distribution (in the case of [[https://xubuntu.org/|Xubuntu]]), or available as a separate package (''thunar-archive-plugin'' in Debian Etch). You might also need the ''xarchiver'' or "squeeze" package for things to work quite right.
  
-==== Playing music files ====+---- 
 + 
 +==== Play/Enqueue music files ====
     * Name: **Play with XMMS**     * Name: **Play with XMMS**
     * Command: ''xmms %F''     * Command: ''xmms %F''
     * File pattern: *     * File pattern: *
     * Appears if selection contains: Directories, Audio Files     * Appears if selection contains: Directories, Audio Files
- 
     * Name: **Enqueue in XMMS**     * Name: **Enqueue in XMMS**
     * Command: ''xmms -e %F''     * Command: ''xmms -e %F''
Line 92: Line 128:
 **Hint:** Works exactly the same with Audacious. **Hint:** Works exactly the same with Audacious.
  
-==== Burning an ISO file to a CD ==== +----
-    * Name: **Burn with K3B** +
-    * Command: ''%%k3b --cdimage %f%%'' +
-    * File pattern: *.iso +
-    * Appears if selection contains: Other Files +
- +
-==== Viewing images ==== +
-    * Name: **View with GQview** +
-    * Command: ''gqview %f'' +
-    * File pattern: * +
-    * Appears if selection contains: Directories, Image Files +
-**Note:** This tip also works just as well with GThumb+
  
  
-==== Converting PNGs to JPEGs ==== +==== Convert PNGs to JPEGs ==== 
-    * Name: **To JPEG**+    * Name: **Convert to JPEG**
     * Command: ''convert %f -quality 75 %f.jpg''     * Command: ''convert %f -quality 75 %f.jpg''
     * File pattern: *.png     * File pattern: *.png
     * Appears if selection contains: Image Files     * Appears if selection contains: Image Files
  
-**Hint:** ''`basename %f .png`.jpg'' (be careful--those are //back//ticks) will strip the old .png extension off of the original filename.+**Hint:** ''<nowiki>"$(basename %f .png).jpg"</nowiki>'' will strip the old .png extension off of the original filename.
  
 +----
  
- +==== Rotate JPEGs ====
-==== Losslessly Rotating JPEGs ====+
     * Name: **Rotate Clockwise**     * Name: **Rotate Clockwise**
-    * Command: ''for file in %F; do tempfile=$(mktemp); (jpegtran -copy all -rotate 90 $file > $tempfile); mv -f $tempfile $file; rm -f $tempfile; done''+    *  
 +    * Command: ''<nowiki>for file in %F; do exiftran -i9 "$file"; done</nowiki>'' 
 +    * Command(counterclockwise): ''<nowiki>for file in %Fdo exiftran -i2 "$file"; done</nowiki>''
     * File pattern: *.jpg;*.JPG;*.jpeg;*.JPEG     * File pattern: *.jpg;*.JPG;*.jpeg;*.JPEG
     * Appears if selection contains: JPEG Image Files     * Appears if selection contains: JPEG Image Files
-**Note:** jpegtran is available as part of the libjpeg or libjpeg-progs packages of most distributions. Unlike using "convert", the complicated loop structure is necessary with "jpegtran": "jpegtran -rotate 90 -outfile %F %F" will produce a 0kb file.+**Note:** exiftran is available for most distributions.
  
-==== Opening a terminal ==== +---- 
-    * Name: **Open in a terminal** + 
-    * Command: ''%%terminal --default-working-directory=%d%%''+==== Open terminal here ==== 
 + 
 +    * Name: **Open terminal here** 
 +    * Command 1: ''<nowiki>for f in %F; do exo-open --working-directory "$f" --launch TerminalEmulator;  done</nowiki>'' 
 +    * Command 2: ''<nowiki>for f in %F; do if [ -"$f" ]; then exo-open --working-directory "$f" --launch TerminalEmulator; elif [ -z "$default" ]; then default=1; exo-open --launch TerminalEmulator; fi done</nowiki>''
     * File pattern: *     * File pattern: *
-    * Appears if selection contains: Directories+    * Appears if selection contains: any
  
-**Note:** You might need to type ''xfce4-terminal'' instead of just ''terminal'' for some distributions.+''Command 1'' will open a terminal on all selected folder.
  
-==== Opening a root terminal ==== +''Command 2'' in addition will open a terminal on the current directory, when executed on a non-folder files (or multiple) 
-    * Name: **Open root terminal here** +---- 
-    * Command: ''gksu "xfce4-terminal --default-working-directory=%f"''+ 
 +==== Open root terminal here ==== 
 +    * Name: **Open root terminal here** 
 +    * Command(1): ''<nowiki>pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY dbus-launch xfce4-terminal --default-working-directory=%f</nowiki>'' 
 +    * Command(2): ''<nowiki>gksu xfce4-terminal --default-working-directory=%f</nowiki>''
     * File pattern: *     * File pattern: *
     * Appears if selection contains: Directories     * Appears if selection contains: Directories
 +
 +**Note:** Use either pkexec or gksu, depending on what is available for your distro.
  
 **Note:** You should rewrite the command with normal straight quotes. **Note:** You should rewrite the command with normal straight quotes.
  
-==== Opening a root Thunar ==== +---- 
-    * Name: **Open root Thunar here** +==== Open thunar as root here ==== 
-    * Command: ''gksu thunar %f''+    * Name: **Open thunar as root here** 
 +    * Command(1): ''pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY dbus-launch thunar %f'' 
 +    * Command(2): ''thunar admin:/''''/''''/%f'' 
 +    * Command(3): ''gksu thunar %f''
     * File pattern: *     * File pattern: *
     * Appears if selection contains: Directories     * Appears if selection contains: Directories
  
-==== Editing as root ====+**Note:** Some distributions no longer include ''gksu''. Use ''pkexec'' or the ''admin'' interface instead. 
 + 
 +---- 
 +==== Edit file as root ====
     * Name: **Edit as root**     * Name: **Edit as root**
-    * Command: ''gksu put-your-favourite-text-editor-here %f''+    * Command(1): ''pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY dbus-launch put-your-favourite-text-editor-here %f'' 
 +    * Command(2): ''gksu put-your-favourite-text-editor-here %f''
     * File pattern: *     * File pattern: *
     * Appears if selection contains: Text files     * Appears if selection contains: Text files
  
-**Note:** You'll need to replace put-your-favourite-text-editor-here with your favourite text editor (e.g. mousepad or geany).+**Note:** You'll need to replace put-your-favourite-text-editor-here with your favourite text editor (e.g. mousepad or geany). Also, see previous note about ''gksu''
 +----
  
-==== Creating a symbolic link ====+==== Create a symbolic link ====
     * Name: **Create symlink**     * Name: **Create symlink**
-    * Command: ''ln -%f "%n (symlink)"''+    * Command: ''<nowiki>ln -Ts %f %n(symlink)"</nowiki>''
     * File pattern: *     * File pattern: *
     * Appears if selection contains: Directories, other files     * Appears if selection contains: Directories, other files
  
-==== Saving the selected file/folder's pathname to the clipboard ==== +----
-For fans of the Windows "SendTo Extensions" power toy. **This tip requires the ''xclip'' program, which you may need to install using your distribution's package manager.** +
-    * Name: **Copy Pathname to Clipboard** +
-    * Description: Copies file's full pathname to the X PRIMARY selection +
-    * Command: ''echo -n %f | xclip -i'' +
-    * File pattern: * +
-    * Appears if selection contains: //any//+
  
- +==== Create a hardlink ==== 
- +    * Name: **Create hardlink** 
-==== Setting an image as the desktop background ==== +    * Command: ''<nowiki>ln %f %n" (hardlink)"</nowiki>''
-    * Name: **Set as desktop background** +
-    * Command:<code>xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s %f</code>+
     * File pattern: *     * File pattern: *
-    * Appears if selection contains: Image Files+    * Appears if selection contains: Directories, other files
  
-==== Viewing the disk usage of the current directory ====+---- 
 +==== View disk usage of the current directory ====
     * Name: **Disk Usage**     * Name: **Disk Usage**
     * Command: ''baobab %d''     * Command: ''baobab %d''
Line 183: Line 221:
 **Note:** The idea is to get a visual picture of the current directory and any subdirectories. You could also use fsview or filelight, but the visuals are crisper in baobab. **Note:** The idea is to get a visual picture of the current directory and any subdirectories. You could also use fsview or filelight, but the visuals are crisper in baobab.
  
-==== Using 'nano' text editor ==== +---- 
-    * Command: ''terminal -x nano %f''+==== Open file in terminal text editor ==== 
 +    * Name: **Open in Terminal** 
 +    * Command: xfce4-terminal -x editor %f 
 +    *  File pattern: * 
 +    * Appearance Conditions: Text files
  
-Since nano isn't a GUI app, you must start it in a terminal window.+----
  
-==== Comparing selected files/directories ====+==== Compare selected files/directories ====
     * Name: **Compare**     * Name: **Compare**
     * Command: ''meld %F''     * Command: ''meld %F''
Line 194: Line 236:
     * Appears if selection contains: Directories and Text files     * Appears if selection contains: Directories and Text files
  
-**Note:** You will need ''meld'' package.+**Note:** You will need the ''meld'' package.
  
-==== Changing OpenOffice.org supported formats ====+---- 
 + 
 +==== Change OpenDocument-supported formats ====
 **Note:** You will need ''unoconv'' package for all following actions. **Note:** You will need ''unoconv'' package for all following actions.
  
Line 210: Line 254:
  
 You can go on, try ''man unoconv'' for details. You can go on, try ''man unoconv'' for details.
-==== Download subtitles with periscope ====+ 
 +---- 
 + 
 +==== Download video subtitles ====
     * Name: **Download subtitles**     * Name: **Download subtitles**
-    * Command: ''periscope -l en %F && zenity --info --title "Done" --text "Subtitles downloaded successfully" || zenity --error --title "Error" --text "Subtitles not downloaded successfully"''+    * Command: ''<nowiki>~/.local/bin/OpenSubtitlesDownload.py --gui=gnome %F</nowiki>''
     * File pattern: *     * File pattern: *
     * Appears if selection contains: Video Files     * Appears if selection contains: Video Files
  
-**Note:** You will need ''python-periscope'' package. Get it [[http://code.google.com/p/periscope/|here]]. You'll also neeed ''zenity'' package. This command will try to get the English subtitles, change ''-l en'' to something else (''fr'', ''de'', ''pt-br'', ...). You should rewrite the command with normal straight quotes.+**Note:** You will need to follow the instructions on [[https://github.com/emericg/OpenSubtitlesDownload|OpenSubtitlesDownload]] which requires ''python'' and ''zenity'' (check the link for a complete list of requirements). You can tweak the behavior of the python script simply by editing with a text editor, the code is all commented, so it is very easy to understand. 
 + 
 +---- 
 ==== Rename subtitles easily ==== ==== Rename subtitles easily ====
     * Name: **Rename subtitles**     * Name: **Rename subtitles**
Line 224: Line 274:
     * Appears if selection contains: Video Files, Text Files, Other Files     * Appears if selection contains: Video Files, Text Files, Other Files
  
-**Note:** You will need ''subrnm'' script. Get it [[http://pastebin.com/DA8jwHz3|here]]. You'll also neeed ''zenity'' package.+**Note:** You will need ''subrnm'' script. Get it [[http://pastebin.com/DA8jwHz3|here]]. You'll also need ''zenity'' package.
  
-==== Resize and email images ==== +---- 
-     * Name: **Resize Images then email them** + 
-     * Description: Select Image files and resize them before sending in emailLeaves originals untouched+==== Move files into a new folder ==== 
-     * File pattern: * +    * Name: **Move into new folder** 
-     * Appears if selection contains: Image files +    * Description: Select any number of file/folders. A dialog will popup in which you can write the name of a new folder to createSelected Files will be moved there
-** Note:** You will need the script here (which I name thunar-resize-sendto and place in /usr/local/bin), "zenity", and "imagemagick" packagesI used the xfce-newmail iconUse the following command line:\\ +    * Command: ''<nowiki>NEW_FOLDER=$(/usr/bin/zenity --entry --title 'Move into new folder' --text 'Please enter a name for the new folder') && mkdir "$NEW_FOLDER" && mv %F "$NEW_FOLDER"</nowiki>'' 
-/usr/local/bin/thunar-resize-sendto %F\\ +    * File pattern: * 
-\\ +    * Appears if selection contains: All 
-Not sure why this isn't part of Thunar plugins, since it's pretty sweet. Tested on Xubuntu Lucid.\\ + 
-\\ +**Note:** You'll will need the ''zenity'' package. 
-**NOTE!:** This uses /tmp/thunar-pics0 & /tmp/thunar-pics1 as temp directories, and will completely remove anything in these directories I doubt there's a conflict, but you've been warned You can see the list of files it creates below in /tmp.+ 
 +---- 
 + 
 +==== Create Shared Thumbnails ==== 
 +    * Name: **Create shared thumbnails** 
 +    * Description: Creates [[https://specifications.freedesktop.org/thumbnail-spec/thumbnail-spec-latest.html#SHARED|shared thumbnails]] for the selected folder and all subfolders via DBus Thumbnailing service. 
 +    * Command: ''<nowiki>/path/to/script/sharedx.sh %f</nowiki>'' 
 +    * File pattern: * 
 +    Appears if selection contains: Folders 
 + 
 +**Note:** Required to download [[https://raw.githubusercontent.com/SKefalidis/DBusSharedThumbnailRepositoryCreator/main/sharedx.sh|this script]] and store it locallyRequires ''python3'' and ''realpath''. 
 +---- 
 +==== Use 'bulk rename' on a single file ==== 
 +    * Name: **Open in bulk renamer** 
 +    * Description: Opens the bulk renamer for a single file 
 +    * Command: ''<nowiki>thunar --bulk-rename %f</nowiki>'' 
 +    * File pattern: * 
 +    * Appears if selection contains: any 
 +    * Range: 1-1
  
-<code> +----
-#!/bin/bash +
-#input to this is a list of files to send. +
-# depends on thunar, ImageMagick and Zenity +
-TMP=/tmp/thunar-pics +
-LOG=/tmp/thunar-resize-sendto.log +
-MARKER=/tmp/thunar-resize-sendto.marker +
-SENDTO="/usr/lib/thunar/thunar-sendto-email" +
-SIZES="320x200 640x480 800x600 1024x640" +
-DISCMD="zenity --list --text=\"Select Size\" --checklist --column=Select --column=New --hide-header --print-column=ALL" +
-# Find unused tmp dir +
-if [ -e $MARKER ]; then +
-  CUR=$(cat $MARKER) +
-else +
-  CUR=1 +
-fi +
-if [ 1 == $CUR ]; then +
-  CUR=0 +
-else +
-  CUR=1 +
-fi +
-echo "$CUR" >$MARKER +
-TEMP="${TMP}$CUR" +
-mkdir -p $TEMP +
-rm -rf $TEMP/*+
  
-for in $SIZES; do +==== Trust multiple desktop files at once ==== 
-  if [ -z $COLS ]; then  +    * Name: **Trust Desktop Files** 
-    COLS="$s " +    * Description: Sets gvfs checksum and +x flag for all selected *.desktop files 
-  else +    * Command: ''<nowiki>for f in %F; do sha256sum "$f| awk '{print $1}' | xargs gio set "$f" metadata::xfce-exe-checksum && chmod +x "$f"; done</nowiki>'' 
-    COLS="$COLS 0 $s" +    * File pattern: *.desktop 
-  fi +    * Appears if selection contains: other files 
-done +    * Range: 1-1
-SIZE=$($DISCMD $COLS) +
-echo "CUR=$CUR SIZE=$SIZE" >$LOG+
  
-for f in "$@"; do +[[|Back To Top]] 
-  n=$(basename "$f")  +---- 
-  echo "item '$f'->$TEMP/$n" >>$LOG +[[:xfce:thunar:|Back to Thunar documentation page]]
-  convert $f -resize $SIZE "$TEMP/$n" +
-  FILES="$FILES $TEMP/$n" +
-done +
-$SENDTO $FILES +
-</code>+