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:custom-actions [2018/08/03 23:03] – [Losslessly Rotating JPEGs] alexxconsxfce:thunar:custom-actions [2019/11/22 02:55] – added bottom of page navigation kevinbowen
Line 10: Line 10:
  
 <figure "Create Action Dialog"> <figure "Create Action Dialog">
-{{:xfce:thunar:1.6:thunar_create-action-dialog.png?nolink&|}}+{{:xfce:thunar:uca-create.png?nolink&|}}
 </figure> </figure>
  
-On the first page, enter ''Print File'' in {gui>Name:} and ''Print the selected file using xfprint'' in {gui>Description:} Enter ''xfprint4 %f'' 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 the ''printer-symbolic.svg'' icon was used). <note>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.</note>+On the first page, enter ''Search with Catfish'' in {gui>Name:} and ''search'' in {gui>Description:} Enter ''catfish %f'' 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 the ''system-search.svg'' icon was used). <note>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.</note>
  
 Now, continue with the second page (the {gui>Appearance Conditions} page). Now, continue with the second page (the {gui>Appearance Conditions} page).
  
-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.+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 **Print File** will appear in the **Custom Actions** list.+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 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.+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"> <figure "Custom Actions Dialog">
-{{thunar:thunar_custom-actions-dialog.png}}+{{:xfce:thunar:uca-list.png}}
 </figure> </figure>
  
-You can use the [[https://mail.xfce.org/mailman/listinfo/thunar-dev|thunar-dev mailinglist]] to get in touch with the developersif you have questions about this short tutorial or custom actions in general.+===== Use mnemonics to open Thunar Custom Actions ===== 
 + 
 +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 view, you can type the letter to access your custom action.
  
 ===== Examples ===== ===== Examples =====
Line 33: Line 35:
 Here are a few useful examples of custom actions. Feel free to extend this list. Here are a few useful examples of custom actions. Feel free to extend this list.
  
-==== Finding files in the current folder ====+==== Finding files in the current folder with gnome-search-tool ====
     * Name: **Search...**     * Name: **Search...**
     * Command: ''gnome-search-tool --path=%f''     * Command: ''gnome-search-tool --path=%f''
Line 41: Line 43:
 **Note:** For this action, you'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. **Note:** For this action, you'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.
  
-==== Finding files in the current folder with catfish ==== 
-    * Name: **Search files...** 
-    * Command: ''%%catfish --path=%f%%'' 
-    * File pattern: * 
-    * Appears if selection contains: Directories 
- 
-**Note:** For this action, you'll need to have ''catfish'' installed, which is part of the ''catfish'' package. 
  
-==== Finding files inside the selected folder with catfish ====+==== Finding files inside the current/selected folder with catfish ====
     * Name: **Search files inside...**     * Name: **Search files inside...**
-    * Command: ''%%catfish --path=%f%d%%''+    * Command: ''catfish %f''
     * File pattern: *     * File pattern: *
     * Appears if selection contains: Directories     * Appears if selection contains: Directories
Line 177: Line 172:
 **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 ==== +==== Using 'nano' text editor in a terminal ==== 
-    * Command: ''terminal -x nano %f''+    * Name: **Open in Terminal** 
 +    * Command: xfce4-terminal -x nano %f 
 +    *  File pattern: * 
 +    * Appearance Conditions: Text files 
  
 Since nano isn't a GUI app, you must start it in a terminal window. Since nano isn't a GUI app, you must start it in a terminal window.
Line 219: Line 218:
  
 **Note:** You will need ''subrnm'' script. Get it [[http://pastebin.com/DA8jwHz3|here]]. You'll also need ''zenity'' package. **Note:** You will need ''subrnm'' script. Get it [[http://pastebin.com/DA8jwHz3|here]]. You'll also need ''zenity'' package.
 +
 +==== Move files into a new folder ====
 +    * Name: **Move into new folder**
 +    * Description: Select any number of file/folders. A dialog will popup in which you can write the name of a new folder to create. Selected Files will be moved there.
 +    * Command: 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 
 +    * File pattern: *
 +    * Appears if selection contains: All
 +
 +**Note:** You'll will need the ''zenity'' package.
  
  
 +[[|Back To Top]]
 +----
 +[[:xfce:thunar:|Back to Thunar documentation page]]