Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 43116  / 1 Year ago, mon, may 1, 2023, 12:11:07

On some key folders in nautilus I've changed the folder icons. It looks nice, and aids my productivity because I can easily find important folders in a mass of others.



But then I move to another machine and all the folders are plain again.



So the question is where is this stored, and is there a way to have it persist between users/systems.


More From » gnome

 Answers
1

gio info



Since gvfs-info is outdated, use gio info instead.
To get information about a dir/file simple use



gio info /path/to/director/or/file


After invoking this command you will get an output like



...
metadata::custom-icon: file:///home/.../.../myicon.png
...


If you would like the exact full-path name of your icon in a script use something like:



gio info /path/to/director/or/file | awk '/custom-icon/ {print $2}' | cut -c8-



Usage: gio info [OPTION…] LOCATION…



Show information about locations.



Options:

-w, --query-writable : List writable attributes

-f, --filesystem : Get file system info

-a, --attributes=ATTRIBUTES: The attributes to get

-n, --nofollow-symlinks: Don’t follow symbolic links



gio info is similar to the traditional ls utility, but using GIO
locations instead of local files: for example, you can use something
like smb://server/resource/file.txt as location. File attributes can
be specified with their GIO name, e.g. standard::icon, or just by
namespace, e.g. unix, or by “*”, which matches all attributes




How to set an icon from command line can be found here.



A complete set of the gio commands can be found on the gnome developer page.


[#37435] Monday, May 1, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
donurp

Total Points: 328
Total Questions: 128
Total Answers: 123

Location: Faroe Islands
Member since Thu, Apr 8, 2021
3 Years ago
;