Revision 1 as of 2012-05-26 20:38:56

Clear message

Contents

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.

  • 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.

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:

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

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:

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

The above, and other custom actions can be found at 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 Originally posted The Ubuntu Forums (ubuntuforums.org)