git.lucas.co / cce-icons
SVG icon set
git clone https://git.lucas.co/cce-icons.git

hicolor/README.md (3.6K)

 1 # App icons (`hicolor/`)
 2 
 3 The XDG icon theme cce apps are looked up in. `ccebuild install` mirrors this
 4 tree into `$XDG_DATA_HOME/icons/hicolor/`, so **the path here is the path there** —
 5 the size and context of an icon are its directory (`scalable/apps`), not a rule
 6 buried in the installer. Adding `48x48/apps/` or `scalable/mimetypes/` later needs
 7 no change to `ccebuild`.
 8 
 9 ## Why `hicolor` and not the `cce` theme
10 
11 `hicolor` is the spec-mandated fallback: every implementation searches it last, no
12 matter what the user's icon theme is set to. The sibling `cursors/` theme installs
13 as `~/.local/share/icons/cce` and, as its README notes, **nothing selects it** —
14 there is no icon-theme setting anywhere in the DE. An app icon put there would
15 resolve for nobody. Putting them in `hicolor` means they resolve unconditionally.
16 
17 Deliberately **no `index.theme` here.** The system `hicolor-icon-theme` package
18 already ships one at `/usr/share/icons/hicolor/index.theme` declaring every
19 size/context directory, and a theme is the union of its per-base-dir trees. A
20 second index in `$XDG_DATA_HOME` that listed only `scalable/apps` would be read
21 first and make every other hicolor directory invisible.
22 
23 ## Every file is a symlink into `../../../svg/`
24 
25 `svg/` stays the sole source (see the design-language notes there). An entry here
26 is a *name*, not artwork: `cce-files.svg -> ../../../svg/folder.svg` says "the
27 Files app is drawn with the folder glyph", and the glyph itself is edited in one
28 place. The link is intra-repo, so it never dangles in a standalone clone; `install`
29 dereferences it and writes a real file to the destination.
30 
31 ## Adding an app
32 
33 1. The name must equal the `Icon=` key in the crate's `<crate>.desktop`, which by
34    convention is the binary name. `Icon=cce-files` ⇒ `cce-files.svg`.
35 2. `ln -s ../../../svg/<glyph>.svg cce-<app>.svg` — or add a new glyph to `svg/`
36    first if none fits.
37 3. `ccebuild install` picks it up with no edit to the installer.
38 
39 ## Third-party apps (`svg/apps/`)
40 
41 cce also draws its own icons for apps it does not ship — Firefox, Steam,
42 Houdini, every entry the launcher lists — so the launcher and the Super-Tab
43 switcher read as one set rather than a wall of vendor logos. Their glyphs live
44 in `svg/apps/`, kept out of `svg/` itself because that directory is the flat
45 widget-glyph namespace `cce_ui::upload_icon` reads by bare name. They follow
46 the same language as the rest: white, 40×40, back layers at 0.55, lighting
47 facets at 0.7/0.42, dark accents in `#282a36` at 0.35.
48 
49 Each is installed under one of two names, and which one matters:
50 
51 - **The entry's `Icon=` value** when that is an app-specific theme name
52   (`Icon=steam` ⇒ `steam.svg`). `$XDG_DATA_HOME/icons` is the first base dir
53   every lookup searches, so this wins over the vendor's icon in
54   `/usr/share/icons` for any consumer, not just cce's.
55 - **The desktop-file ID** (the `.desktop` file's stem) when `Icon=` cannot be
56   overridden by name: an absolute path (`houdini.svg` for
57   `Icon=/opt/hfs/houdini_logo.png`), missing (`raindropio.svg`), or a generic
58   name several apps share (`avahi-discover`, `bssh` and `bvnc` all say
59   `Icon=network-wired`; `qt5ct`/`qt6ct` say `preferences-desktop-theme`).
60   Only cce-cloud honours these — it checks for
61   `hicolor/scalable/apps/<id>.svg` before reading `Icon=` (`icon_override`) —
62   so a new ID-named icon reaches the launcher and switcher and nothing else.
63 
64 A versioned ID (`com.sidefx.houdini22.0.429.svg`) goes stale on the next
65 upgrade; re-point it when the entry is renamed. Several names can share one
66 glyph (all four Houdini entries do), and the links say so.