You are not logged in.
Pages: 1
I would like to add a custom action to the Thunar send-to list, to right-click and move a selection of files to a specific directory. I've tried to follow so many examples found online, but I'm just not clever enough to understand.
Is it as simple as I hope?
Offline
You mention both custom actions and the send-to menu - these are different things.
send-to
Assuming you want to move files to only one existing directory, you can follow the instructions from the official Thunar send-to documentation. Specifically:
If it doesn't exist, create the directory ~/.local/share/Thunar/sendto/
create a file in that directory with the name "move.desktop" with the following content:
# move.desktop - move files to specified dir via send-to
[Desktop Entry]
Type=Application
Version=1.0
Encoding=UTF-8
Exec=mv %F /home/toz/Documents
Icon=folder-documents
Name=Documents
...change the destination folder location on the Exec= line to match where you want it to go. Save the file.
Now if you right-click on a selection in thunar, you will notice a "Documents" entry in the send-to menu, if selected, will move the selection to the Documents folder.
If you need the destination folder to be selectable (meaning a different folder every time), use this "move.desktop" contents instead:
# move.desktop - move files to user-selectable dir via send-to
[Desktop Entry]
Type=Application
Version=1.0
Encoding=UTF-8
Exec=bash -c "mv %F $(zenity --file-selection --directory --title 'Select the directory to move to...')"
Icon=stock_folder-move
Name=Another directory
Note, this option requires that you have zenity installed.
Custom Actions
Following the documentation here, you can create a new custom action via Edit > Configure custom actions. Let me know if the above isn't what you want to do and we can throw together a custom action for you. The main difference is that custom actions don't appear in the send-to submenu, the appear below.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Something I've wanted to work out for an age, now working beautifully!
I simply had no idea about the 'Send-to' menu being configurable. As my need is indeed for a static, non-selectable folder (to which to send files for a Syncthing sync), this option is perfect. It even looks pretty - so satisfying that Thunar can just pick up 'Icon=syncthing'.
Thanks so much for your help again, Toz. I'm already thinking of similar uses, for custom actions, too. Links bookmarked for future reference!
Offline
I simply had no idea about the 'Send-to' menu being configurable.
I've mostly ignored send-to my self. This is helpful, thanks for bringing it up.
I have many CA's that fit the send-to idea, so it seems another option to simplify the menu.
I see it can respond to mime types, so now we need a 'configure send-to' in Thunars menu!
Offline
Pages: 1
[ Generated in 0.009 seconds, 8 queries executed - Memory usage: 546.64 KiB (Peak: 547.48 KiB) ]