SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2009-01-25 03:55:45

kestrel
Species: F. sparverius
From: Moscow, Idaho
Registered: 2008-11-29
Posts: 170
Website

HOWTO: Add folder destinations to the Thunar sendto action.

Functionality that I enjoyed on other operating systems is the ability to create destinations and actions in the context menu of the file browser.  Thunar has this functionality though it is a bit of chore to setup. First a screenshot showing the result.

2009-01-24--1232850361_1024x600_scrot286.png.xs.jpg

The first step is to create the directory,

 mkdir ~/.local/share/Thunar/sendto 

Here we'll add what are called dot desktop files. Notice in screenshot the menu option called Podcast Archive. Here is the file, placed in the ~/.local/share/Thunar/sendto directory.

[Desktop Entry]
Type=Application
Version=1.0
Encoding=UTF-8
Exec=/home/will/.local/share/Thunar/sendto/mvtmp %F
Icon=stock_undo
Name=Podcast Archive

The file referred to on the "Exec=" line is a script that simply move the highlighted file to an archive directory.  Here I put the script in the same directory as the dot desktop files but it doesn't have to go there. The applications or scripts either have to be explicitly referred to or the they have to be in your $PATH.

Here is the whole script.

#!/bin/bash
#Move files using sendto functionality
mv $1 ~/podcast-archive/
exit # 

This is just a sample as the sendto functionality could be used for a variety of other functions.


My web activities: Etsy Shop | Facebook | Blog

Offline

Help fund CrunchBang, donate to the project!

#2 2009-01-26 22:09:28

xploded
New Member
From: Bristol, UK
Registered: 2009-01-26
Posts: 8
Website

Re: HOWTO: Add folder destinations to the Thunar sendto action.

Hi Kestrel,

I really like this but normally SendTo copies the file to the new location your script will move the file, it might be good to add a script that copies files.

James

Offline

#3 2009-01-27 01:12:18

kestrel
Species: F. sparverius
From: Moscow, Idaho
Registered: 2008-11-29
Posts: 170
Website

Re: HOWTO: Add folder destinations to the Thunar sendto action.

Yes, James. What I like about openbox is that I can decide if I want to move or copy. In this case I want to move not copy. This is for my podcasts. Some, I save most I delete. Either way, I want them out of the directory tree I sync my player with.

This was meant as a sample. We can create what ever script, to do what ever we want. Cool beans!


My web activities: Etsy Shop | Facebook | Blog

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo