[Thunar-workers] [Thunar File Manager] page changed: documentation:custom_actions
thunar-workers at xfce.org
thunar-workers at xfce.org
Fri Nov 9 12:41:51 CET 2007
A page in your DokuWiki was added or changed. Here are the details:
Date : 2007/11/09 11:41
Browser : Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.8) Gecko/20071022 Ubuntu/7.10 (gutsy) Firefox/2.0.0.8
IP-Address : 202.7.166.182
Hostname : syd-pow-pr15.tpgi.com.au
Old Revision: http://thunar.xfce.org/pwiki/documentation/custom_actions?rev=1176844555
New Revision: http://thunar.xfce.org/pwiki/documentation/custom_actions
Edit Summary:
User : shelagh
@@ -102,5 +102,111 @@
* Appears if selection contains: Image Files
Note: get a randomizing wallpaper script here -
- [[http://s7dhansh.blogspot.com/2007/04/xfce-as-desktop-and-random-desktop.html]]
+ [[http://s7dhansh.blogspot.com/2007/04/xfce-as-desktop-and-random-desktop.html]]
+
+
+ ====== 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 **Custom Actions** dialog, available via the **Configure custom actions...** item in the **Edit** menu.
+
+ {{ documentation:thunar-custom-actions.png }}
+
+ This page serves as an introduction to the **Custom Actions** plugin, and includes a list of useful [[documentation:custom_actions#examples|Examples]].
+
+
+ ===== Adding a custom action =====
+
+ 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.
+
+ {{ documentation:thunar-custom-actions-1.png }}
+
+ 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).
+
+ Now, continue with the second page (the **Appearance Conditions** page).
+
+ {{ documentation:thunar-custom-actions-2.png }}
+
+ 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.
+
+ That's all. Click **OK** to close the **Create Action** dialog. The new action, labeled **Print File** 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.
+
+ {{ documentation:thunar-custom-actions-3.png }}
+
+ 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.
+
+ ===== Examples =====
+
+ Here are a few useful examples of custom actions, feel free to extend this list.
+
+ ==== working with archives (tar, gzip, etc) ====
+ * Name: Extract here (bzip2)
+ * Command: tar xjf %n
+ * File pattern: *.tar.bz2;*.tbz2
+ * Appears if selection contains: Other Files
+
+ * Name: Extract here (zip)
+ * Command: unzip %f
+ * File pattern: *.zip
+ * Appears if selection contains: Other Files
+
+ * Name: Create tar.gz from folder
+ * Command: tar czvf %n.tar.gz %n
+ * File pattern: *
+ * Appears if selection contains: folders
+
+ ==== Play music ====
+
+ * Name: Play with XMMS
+ * Command: xmms %F
+ * File pattern: *
+ * Appears if selection contains: Directories, Audio Files
+
+ * Name: Enqueue in XMMS
+ * Command: xmms -e %F
+ * File pattern: *
+ * Appears if selection contains: Directories, Audio Files
+
+ ==== Burn ====
+ * Name: Burn with K3B
+ * Command: k3b --cdimage %f
+ * File pattern: *.iso
+ * Appears if selection contains: Other Files
+
+ ==== View images ====
+ * Name: View with GQview
+ * Command: gqview %f
+ * File pattern: *
+ * Appears if selection contains: Directories, Image Files
+
+ ==== Convert PNGs to JPEGs ====
+ * Name: To JPEG
+ * Command: convert %f -quality 75 %f.jpg
+ * File pattern: *.png
+ * Appears if selection contains: Image Files
+
+ ==== Open a terminal ====
+ * Name: Open in a terminal
+ * Command: terminal --default-working-directory=%d
+ * File pattern: *
+ * Appears if selection contains: Directories
+
+
+ ==== Create a symbolic link ====
+ * Name: Create symlink
+ * Command: ln -s %f "%n (symlink)"
+ * File pattern: *
+ * Appears if selection contains: Directories, other files
+
+
+
+
+ ==== View the disk usage of the current directory ====
+ * Name: Disk Usage
+ * Command: baobab %d
+ * File pattern: *
+ * Appears if selection contains: Directories and Other Files
+
+ 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.
--
This mail was generated by DokuWiki at
http://thunar.xfce.org/pwiki/
More information about the Thunar-workers
mailing list