|
Author | Topic: Thunar - custom actions (Read 3,959 times) |
hipsauerkraut New Member
 member is offline
Joined: Jan 2011 Gender: Male  Posts: 35
|  | Thunar - custom actions « Thread Started on Jan 28, 2011, 6:30pm » | |
I thought it would be nice to have a small collection for custom actions in Thunar, especially for newcomers. So, here are some to start:
1) File Size/Disk Usage Counter: For a name give for example: Counter For description give like: Disk usage counter And this is the key, in the command field put this code: du -chs --apparent-size %N | zenity --text-info or du -h -c %N | grep total | zenity --text-info set everything on in Appearance conditions.
2) Printing: lp %f Appearance conditions text files, image files.
3) MD5SUM Calculation: zenity --info --title="Check md5 for %n" --text="$(md5sum %f)" Use the file type 'other files' and the pattern '*.iso; *.usb; *.img'. Zenity is powerful and with the %F option you can feed in multiple files and have the output in columns.
4) Search including hidden files/folders: catfish --fileman=thunar --hidden --path=%f File pattern: * Appears if selection contains: Check all NB: *I use catfish as my search app, but you can substitute catfish for any search app that you like.
Please add some more.
| |
|
Anthony Nordquist Administrator
     member is offline
![[homepage] [homepage]](http://images.proboards.com/new/buttons/www_sm.png) Joined: Dec 2010 Gender: Male  Posts: 1,336
|  | Re: Thunar - custom actions « Reply #1 on Jan 28, 2011, 6:34pm » | |
I stickied this as the information is useful, but could use some clarification for new users. Such as what custom actions are. If you do not wish to write this I can modify your post for you. Just do not want to step on any toes
| |
|
hipsauerkraut New Member
 member is offline
Joined: Jan 2011 Gender: Male  Posts: 35
|  | Re: Thunar - custom actions « Reply #2 on Jan 28, 2011, 7:27pm » | |
No problem at all, English isn't my native language, you may add or modify anything. The important thing is to share information.
| |
|
62chevy Senior Member
    member is offline
![[avatar] [avatar]](http://img541.imageshack.us/img541/451/hrdp0704patinachevrolet.jpg)
Hard Core!
Joined: Jan 2011 Gender: Male  Posts: 412 Location: West Virginia, USA
|  | Re: Thunar - custom actions « Reply #3 on Jan 28, 2011, 11:40pm » | |
I'm not sure where to put the information, I can take an guess. Open your Home folder click on edit>Configure Custom Actions..... Then place the information in the popup box when done right click in the folder and select what you want. Right? Is Zenity installed by default or do I need to aptitude install?
|
Debian 6.0.3 Gnome2 Debian - Sid Caution DE may change on a whim. SalineOS 1.5
|
|
Anthony Nordquist Administrator
     member is offline
![[homepage] [homepage]](http://images.proboards.com/new/buttons/www_sm.png) Joined: Dec 2010 Gender: Male  Posts: 1,336
|  | Re: Thunar - custom actions « Reply #4 on Jan 28, 2011, 11:42pm » | |
Yeah Chevy thats the correct way to input the custom actions. You have Zenity pre-installed, its the graphical toolkit that remastersys uses
| |
|
62chevy Senior Member
    member is offline
![[avatar] [avatar]](http://img541.imageshack.us/img541/451/hrdp0704patinachevrolet.jpg)
Hard Core!
Joined: Jan 2011 Gender: Male  Posts: 412 Location: West Virginia, USA
|  | Re: Thunar - custom actions « Reply #5 on Jan 28, 2011, 11:48pm » | |
Jan 28, 2011, 11:42pm, Anthony Nordquist wrote:Yeah Chevy thats the correct way to input the custom actions. You have Zenity pre-installed, its the graphical toolkit that remastersys uses |
|
Cool I'll give it a spin tomorrow.
|
Debian 6.0.3 Gnome2 Debian - Sid Caution DE may change on a whim. SalineOS 1.5
|
|
Richard Elder Member
     member is offline
![[avatar] [avatar]](http://dl.dropbox.com/u/10332409/bender.gif)
Joined: Jan 2011 Gender: Male  Posts: 586 Location: Venezuela
|  | Re: Thunar - custom actions « Reply #6 on Jan 29, 2011, 8:14am » | |
Be sure to open the Appearance Conditions and check at least Directories or others as needed.
|
SalineOS-1.7, Xfce4.6.2, w/ 3.2.0-0.bpo.4-686-pae; SalineOS-2.0, Xfce4.8, w/ 3.2.0-4-686-pae Fedora-18, Xfce4.10, w/ 3.8.x
|
|
hipsauerkraut New Member
 member is offline
Joined: Jan 2011 Gender: Male  Posts: 35
|  | Re: Thunar - custom actions « Reply #7 on Jan 29, 2011, 3:30pm » | |
I just found that one, very cool and handy 
Name: Move files Description: Move files Command: mv %F `zenity --file-selection --directory` File pattern * + everything
| |
|
hipsauerkraut New Member
 member is offline
Joined: Jan 2011 Gender: Male  Posts: 35
|  | Re: Thunar - custom actions « Reply #8 on Feb 8, 2011, 6:07pm » | |
Converting svg to png:
I was looking for a solution to quickly convert svg-files to png, here's a solution with an entry in Thunar Custom-Actions.
First download the python-script: wget http://gtk-apps.org/CONTENT/content-files/129688-Convert-Svg-To-Png.py.tar.gz, extract anywhere (p.e. your homefolder) and make executable. Install librsvg: #aptitude install librsvg2-bin
Name: Convert SVG to PNG Description: whatever you like Command: ~/Convert-Svg-To-Png.py %F Conditions: image files + *.svg
This converts quick and easily your SVGs (%F for batch), hf .
| |
|
aicardi New Member
 member is offline
![[avatar] [avatar]](http://aicardi.net/spyder-A3_100.jpg)
![[homepage] [homepage]](http://images.proboards.com/new/buttons/www_sm.png) Joined: Mar 2011 Gender: Male  Posts: 31
|  | Re: Thunar - custom actions « Reply #9 on Apr 8, 2011, 10:06am » | |
An image resizing script I use with Thunar Actions. What the scrip does; When the script is run on an image file/files it will first create a directory called "Resized" in the current working directory. Then it will resize selected images and put them in the respective folders within the resized directory. It will also append the size of the image to the file name. Example: image1.jpg An image resized to 480 will be placed in ./Resized/480/image1_480.jpg
First you need imagemagick installed.
The script. I named mine rsz, but you can name it what you want. Place the code below in your path (e.g. ~/bin, or /usr/local/bin).
Code:#!/bin/bash mkdir -p ./Resized/$1 for file do if [ ! -e "$file" ] then continue fi name=$( echo $file | cut -f1 -d.) convert -geometry $1x$1 -quality 100 $file ./Resized/$1/${name}_$1.jpg done
|
|
Make the file executable.
Code: Now we add it to Thunar Actions. This action will resize the long side of an image to 480. I use 480, 640, 800, and 1024. So you would just repeat the steps with a new action for each size you want.
Edit >> Configure custom actions and click the "+" to add a new custom action. Basic Settings Name: Resize 480 Description: Resize images to 480x480 Command: rsz 480 %N Icon: No icon
Appearance and Conditions File Pattern: *.jpg;*.JPG;*.jpeg;*.JPEG;*.png;*.PNG
In the "Appears if selection contains:" tick Image files.
Now you can open Thunar, right click an image, or highlight many images and right click. You will now see "Resize 480". Click it and watch it work.
You can run the script on the command line as well. On the command line you can select any size on the fly. Example:
Code: Or for all files in a directory:
Code:
| |
|
Richard Elder Member
     member is offline
![[avatar] [avatar]](http://dl.dropbox.com/u/10332409/bender.gif)
Joined: Jan 2011 Gender: Male  Posts: 586 Location: Venezuela
|  | Re: Thunar - custom actions « Reply #10 on Apr 8, 2011, 10:29am » | |
These are neat. I tend to lose mine when I reinstall after some screw-up, mine or machine. Probably could put mine in /data/bin with all my other data that survives said screw-up. Thanks for these.
|
SalineOS-1.7, Xfce4.6.2, w/ 3.2.0-0.bpo.4-686-pae; SalineOS-2.0, Xfce4.8, w/ 3.2.0-4-686-pae Fedora-18, Xfce4.10, w/ 3.8.x
|
|
aicardi New Member
 member is offline
![[avatar] [avatar]](http://aicardi.net/spyder-A3_100.jpg)
![[homepage] [homepage]](http://images.proboards.com/new/buttons/www_sm.png) Joined: Mar 2011 Gender: Male  Posts: 31
|  | Re: Thunar - custom actions « Reply #11 on Apr 8, 2011, 10:37am » | |
Apr 8, 2011, 10:29am, Richard wrote:These are neat. I tend to lose mine when I reinstall after some screw-up, mine or machine. Probably could put mine in /data/bin with all my other data that survives said screw-up. Thanks for these. |
|
I keep a backup of my ~/bin I also keep a backup of my ~/.config/ as well. /data/bin/ is a good idea.
| |
|
Anthony Nordquist Administrator
     member is offline
![[homepage] [homepage]](http://images.proboards.com/new/buttons/www_sm.png) Joined: Dec 2010 Gender: Male  Posts: 1,336
|  | Re: Thunar - custom actions « Reply #12 on Apr 8, 2011, 11:21am » | |
If you have a tendency to go messing around with your system an awful lot, it might pay to make some backup ISO's with Remastersys
| |
|
Richard Elder Member
     member is offline
![[avatar] [avatar]](http://dl.dropbox.com/u/10332409/bender.gif)
Joined: Jan 2011 Gender: Male  Posts: 586 Location: Venezuela
|  | Re: Thunar - custom actions « Reply #13 on Apr 8, 2011, 2:16pm » | |
Good idea. I use fsarchiver. Not as easy but quicker both ways.  http://www.fsarchiver.org/Main_Page
It's really a neat tool for moving things around. I use SysRescueCD or USB for recovery. Has more capability than I've ever used.
|
SalineOS-1.7, Xfce4.6.2, w/ 3.2.0-0.bpo.4-686-pae; SalineOS-2.0, Xfce4.8, w/ 3.2.0-4-686-pae Fedora-18, Xfce4.10, w/ 3.8.x
|
|
murdock Full Member
   member is offline
![[avatar] [avatar]](http://images.proboards.com/avatars/greenhead.gif)
![[homepage] [homepage]](http://images.proboards.com/new/buttons/www_sm.png) Joined: Feb 2011 Gender: Male  Posts: 188 Location: Costa Rica
|  | Re: Thunar - custom actions « Reply #14 on Apr 9, 2011, 11:01pm » | |
Good stuff guys.
|
|
|
|