How to change icon/emblem of a directory from bash
Asked Answered
R

2

7

I'm playing around with get_iplayer (fantastic) it's running every few hours to grab any new episodes of whatever....

After it has finished grabbing anything new i'd like to change the emblem of ~/Videos to add a plus or star (nautilus emblem preferably)

Do i go about this via nautilus?
Do i need to change something in gnome-config?
I'm sure this can't be FS level?

Cheers for any links and advice.

Rotow answered 1/2, 2010 at 22:8 Comment(2)
I wanted to give +1 for your question. However, I refrain from doing so as I see you neither up-voted nor accepted any of your two answers.Prelude
Yes i know, very sorry to both answerers but i have not had any time to revisit this problem (or the project). An accepted answer will be coming, i haven't forgotten about either.Rotow
J
12

gvfs-set-attribute ~/Videos -t stringv metadata::emblems new urgent

gvfs-set-attribute -t string $FOLDER metadata::custom-icon file:///home/user/path/to/icon.jpg

Jelly answered 3/4, 2010 at 11:37 Comment(1)
im getting an error "Error setting attribute: Setting attribute metadata::emblems not supported" on ubuntu 10.04Sorel
D
2

There's a package called libnautilus that provides tools for working with nautilus, including emblems. It's what Dropbox uses, for example, to add emblems showing sync status. You could try looking at the source of that.

Dramatization answered 1/2, 2010 at 22:36 Comment(1)
This looks to be a C library, no good here unfortunately, i've found python-nautilus bindings which might help meRotow

© 2022 - 2024 — McMap. All rights reserved.