How to change icon/emblem of a directory from bash

2019-02-09 18:59发布

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.

2条回答
做个烂人
2楼-- · 2019-02-09 19:19

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.

查看更多
劳资没心,怎么记你
3楼-- · 2019-02-09 19:23

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

查看更多
登录 后发表回答