Diff for "ThunarCustomActions"


Differences between revisions 1 and 2
Revision 1 as of 2012-05-26 20:38:56
Size: 3276
Editor: mobile-166-137-142-209
Comment:
Revision 2 as of 2012-05-27 00:19:59
Size: 3288
Editor: mobile-166-137-142-209
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
= Thunar Custom Actions =
Line 6: Line 7:
If you like thunar, you will probably love custom actions. These are user-defined commands that act upon selected files in thunar. Either on its own, or combined with a simple dialog app such as Zenity, these can be very powerful and useful indeed. If you like Thunar file manager (default in Xubuntu), you will probably love custom actions. These are user-defined commands that act upon selected files in Thunar. Either on its own, or combined with a simple dialog app such as Zenity, these can be very powerful and useful.
Line 8: Line 9:
 Thunar > Edit > Configure custom actions will take you to the dialog for creating and organising your custom actions. However, because this is GUI-oriented, the easiest way to install someone else's custom action is through a bash command. '''Thunar > Edit > Configure custom actions''' will take you to the dialog for creating and organising your custom actions. However, because this is GUI-oriented, the easiest way to install someone else's custom action is through a bash command.
This is a list of a number of custom actions contributed by the Ubuntu community.
Line 11: Line 13:
'''Remove...'''
 
Command: ''rm -r''
 
Description: Removes the selected file(s) from the disk, bypassing any local Recycle bin. Useful when in samba shares. Requires confirmation for reasons of safety.
 
Requires: zenity
 
Installation:
== Delete/Bypass Recycle Bin ==
Command: '''rm -r''' <<BR>>
Description: Removes the selected file(s) from the disk, bypassing any local Recycle bin. Useful when in samba shares. Requires confirmation for reasons of safety.<<BR>>
Requires: zenity<<BR>>
Installation:
Line 27: Line 29:
'''Create Symlink'''
 
Command: ''ln -s''
 
Description: Creates an absolute symbolic link to the selected file in the same folder, which can then be moved or renamed as desired. `man ln` for more info   Requires:
 
Installation:
== Create Symlink ==
Command: '''ln -s'''<<BR>>
Description: Creates an absolute symbolic link to the selected file in the same folder, which can then be moved or renamed as desired. `man ln` for more info.<<BR>>
Requires: <<BR>>
Installation:
Line 43: Line 45:
The above, and other custom actions can be found at [[http://thunar.xfce.org/pwiki/documentation/custom_actions| http://thunar.xfce.org/pwiki/documen...custom_actions]] , but it is by no means an exhaustive list.    If you have any custom actions of your own, please check out '~/config/Thunar/uca.xml' and post them here! Similar format appreciated
-e
One good source of custom actions can be found in the [[http://thunar.xfce.org/pwiki/documentation/custom_actions|Thunar wiki]], but it is by no means an exhaustive list.
----

Thunar Custom Actions

If you like Thunar file manager (default in Xubuntu), you will probably love custom actions. These are user-defined commands that act upon selected files in Thunar. Either on its own, or combined with a simple dialog app such as Zenity, these can be very powerful and useful.

Thunar > Edit > Configure custom actions will take you to the dialog for creating and organising your custom actions. However, because this is GUI-oriented, the easiest way to install someone else's custom action is through a bash command. This is a list of a number of custom actions contributed by the Ubuntu community.

Delete/Bypass Recycle Bin

Command: rm -r
Description: Removes the selected file(s) from the disk, bypassing any local Recycle bin. Useful when in samba shares. Requires confirmation for reasons of safety.
Requires: zenity
Installation:

CONTENT='&lt;action&gt;&lt;icon&gt;stock_delete&lt;/icon&gt;&lt;name&gt;Remove...&lt;/name&gt;&lt;command&gt;zenity --question --title=&amp;quot;Remove...&amp;quot; --window-icon=&amp;quot;/usr/share/icons/Tango/16x16/actions/edit-delete.png&amp;quot; --text=&amp;quot;Do you wish to permanently\nremove the selected file(s)?&amp;quot; ; if [ $? = 0 ] ; then rm -r %F ; fi&lt;/command&gt;&lt;description&gt;Permanently remove the selected file(s)&lt;/description&gt;&lt;patterns&gt;*&lt;/patterns&gt;&lt;directories/&gt;&lt;audio-files/&gt;&lt;image-files/&gt;&lt;other-files/&gt;&lt;text-files/&gt;&lt;video-files/&gt;&lt;/action&gt;'
cat $HOME/.config/Thunar/uca.xml &gt;&gt; newtmp
sed 's/&lt;\/actions&gt;//' &lt;newtmp &gt;newfile
echo $CONTENT &gt;&gt; newfile
mv $HOME/.config/Thunar/uca.xml $HOME/.config/Thunar/uca.xml.bak
mv newfile $HOME/.config/Thunar/uca.xml
rm newtmp

Command: ln -s
Description: Creates an absolute symbolic link to the selected file in the same folder, which can then be moved or renamed as desired. man ln for more info.
Requires:
Installation:

CONTENT='&lt;action&gt;&lt;icon&gt;emblem-symbolic-link&lt;/icon&gt;&lt;name&gt;Create Symlink&lt;/name&gt;&lt;command&gt;ln -s %f %n.symlink&lt;/command&gt;&lt;description&gt;Creates a symbolic link to the selected object&lt;/description&gt;&lt;patterns&gt;*&lt;/patterns&gt;&lt;directories/&gt;&lt;audio-files/&gt;&lt;image-files/&gt;&lt;other-files/&gt;&lt;text-files/&gt;&lt;video-files/&gt;&lt;/action&gt;'
cat $HOME/.config/Thunar/uca.xml &gt;&gt; newtmp
sed 's/&lt;\/actions&gt;//' &lt;newtmp &gt;newfile
echo $CONTENT &gt;&gt; newfile
mv $HOME/.config/Thunar/uca.xml $HOME/.config/Thunar/uca.xml.bak
mv newfile $HOME/.config/Thunar/uca.xml
rm newtmp

One good source of custom actions can be found in the Thunar wiki, but it is by no means an exhaustive list.


Originally posted The Ubuntu Forums (ubuntuforums.org)

ThunarCustomActions (last edited 2020-11-26 12:49:36 by serhii-gipsy)