Xfce Forum

Sub domains
 

You are not logged in.

#1 2012-01-09 08:22:37

unhammer
Member
Registered: 2011-11-08
Posts: 13

Custom folder icons?

Hi, I've got some subfolders of ~/Desktop which I would like to give custom icons. Is this possible?

If not, is it possible to make a launcher with an icon on the Desktop like "my-thunar-handler /real/location/of/folder" such that I can drag stuff into the launcher, and thunar moves them into that folder? I could write a script like that if the path of the dragged file(s) were passed to the script, but that doesn't seem to happen when I drag stuff onto it (do I need a special "%s" or something at the end?)

Offline

#2 2012-01-09 22:13:17

Forester
Member
Registered: 2012-01-01
Posts: 13

Re: Custom folder icons?

Hi,

I'm not suggesting you can't do something along the lines you suggest, but here's what I would do ...

... create a symbolic link in your desktop directory to the real location .. open a console ...

  cd ~/Desktop
  ln -s /rea/location/of/folder bitbucket

an icon should appear on your desktop with the name bitbucket.  Any file you drag and drop into bitbucket will really go into the directory /rea/location/of/folder.

Offline

#3 2012-01-10 07:20:40

unhammer
Member
Registered: 2011-11-08
Posts: 13

Re: Custom folder icons?

Forester wrote:

Hi,

I'm not suggesting you can't do something along the lines you suggest, but here's what I would do ...

... create a symbolic link in your desktop directory to the real location .. open a console ...

  cd ~/Desktop
  ln -s /rea/location/of/folder bitbucket

an icon should appear on your desktop with the name bitbucket.  Any file you drag and drop into bitbucket will really go into the directory /rea/location/of/folder.

OK, screenshot but how do I change the icon? That's what I'm really after (I don't care if it's "really" stored in a subdirectory of ~/Desktop or not.)

Last edited by unhammer (2012-01-10 07:21:20)

Offline

#4 2012-01-10 09:04:11

jeromeg
Member
From: France
Registered: 2010-11-11
Posts: 131
Website

Re: Custom folder icons?

For the script thing, you can create a .desktop file (you can tweak its icon) which executes the script in the Exec key:

Exec=/path/to/my/script %F

By adding %F (see http://standards.freedesktop.org/deskto … 1s06.html), files dropped on the .desktop file will be used as arguments for the script.

Offline

#5 2012-01-10 11:02:19

unhammer
Member
Registered: 2011-11-08
Posts: 13

Re: Custom folder icons?

jeromeg wrote:

For the script thing, you can create a .desktop file (you can tweak its icon) which executes the script in the Exec key:

Exec=/path/to/my/script %F

By adding %F (see http://standards.freedesktop.org/deskto … 1s06.html), files dropped on the .desktop file will be used as arguments for the script.

Ah, thanks :-) if anyone's interested, my script looks like this:

#!/bin/sh
if [ "$#" -eq 0 ]; then
    echo 'No target directory!'
    exit 1
fi

if [ "$#" -eq 1 ]; then
    /usr/bin/thunar "$@"
else
    mv -f --backup=numbered "$@"
fi

Then I create a .desktop file where

Exec=/path/to/myscript %F /realpath/to/directory/being/faked

(I would prefer to use the Path key instead to get it more gui-like, and copy to ".", but … https://bugzilla.xfce.org/show_bug.cgi?id=5760 …)

Offline

#6 2012-01-10 17:57:35

eric_the_idiot
Member
Registered: 2011-12-23
Posts: 58

Re: Custom folder icons?

There is code to handle custom file icons in xfdesktop but there's a bug with how it's written. I noticed it when I was writing a thumbnail patch for xfdesktop. I created a bug report/patch to fix your issue: https://bugzilla.xfce.org/show_bug.cgi?id=8326 With this all you have to do is make your image file have the same name as your folder in your ~/.thumbnails directory so ~/Desktop/bitbucket needs an icon named ~/.thumbnails/bitbucket.png

Offline

#7 2012-01-11 08:41:13

unhammer
Member
Registered: 2011-11-08
Posts: 13

Re: Custom folder icons?

eric_the_idiot wrote:

There is code to handle custom file icons in xfdesktop but there's a bug with how it's written. I noticed it when I was writing a thumbnail patch for xfdesktop. I created a bug report/patch to fix your issue: https://bugzilla.xfce.org/show_bug.cgi?id=8326 With this all you have to do is make your image file have the same name as your folder in your ~/.thumbnails directory so ~/Desktop/bitbucket needs an icon named ~/.thumbnails/bitbucket.png

Wow, that's great! Can't wait to try, but it may take some time before I get xfce compiled on my own wink

Offline

Board footer

Powered by FluxBB