Overhaul icons: bundled Lucide symbolics, soft tiles, mixer app icon, container host icons
This commit is contained in:
1 parent
b1f0965e02
commit
011dab35a2
47 files changed
+970
-158
No files matched your search
@@ -153,14 +153,16 @@ install -Dm755 _build/native/release/build/cmd/moonmix/moonmix.exe ~/.local/bin/
|
||||
install -Dm644 data/org.latha.moonmix.desktop ~/.local/share/applications/org.latha.moonmix.desktop
|
||||
install -Dm644 data/icons/hicolor/scalable/apps/org.latha.moonmix.svg ~/.local/share/icons/hicolor/scalable/apps/org.latha.moonmix.svg
|
||||
install -Dm644 data/icons/hicolor/symbolic/apps/org.latha.moonmix-symbolic.svg ~/.local/share/icons/hicolor/symbolic/apps/org.latha.moonmix-symbolic.svg
|
||||
install -Dm644 -t ~/.local/share/icons/hicolor/scalable/actions data/icons/hicolor/scalable/actions/moonmix-*.svg
|
||||
gtk-update-icon-cache -f -t ~/.local/share/icons/hicolor # optional
|
||||
```
|
||||
|
||||
The app icon is `org.latha.moonmix` (a speaker with a volume slider), shipped
|
||||
as scalable and symbolic SVGs under `data/icons/hicolor/`. The window uses it
|
||||
as its icon and the program name is `org.latha.moonmix`, which matches the
|
||||
`.desktop` file so Wayland shells show it too. Run from a checkout, moonmix
|
||||
also searches `./data/icons` and `$MOONMIX_ICON_DIR`.
|
||||
The app icon is `org.latha.moonmix` (three gold-lit mixer faders on a dark
|
||||
violet-slate card), shipped as scalable and symbolic SVGs under
|
||||
`data/icons/hicolor/`. The window uses it as its icon and the program name is
|
||||
`org.latha.moonmix`, which matches the `.desktop` file so Wayland shells show
|
||||
it too. Run from a checkout, moonmix also searches `./data/icons` and
|
||||
`$MOONMIX_ICON_DIR`.
|
||||
|
||||
### OCI container and desktop launcher (Wayland)
|
||||
|
||||
@@ -190,12 +192,19 @@ set `MOONMIX_IMAGE` to run a different local tag.
|
||||
|
||||
The runner maps your user ID and mounts only the Wayland and PipeWire
|
||||
sockets (including `PIPEWIRE_RUNTIME_DIR` / `PIPEWIRE_REMOTE` overrides),
|
||||
plus `$XDG_RUNTIME_DIR/bus` when present for desktop appearance settings.
|
||||
It has no network, GPU devices, home-directory mount or elevated privileges;
|
||||
the root filesystem is read-only and temporary files disappear on exit.
|
||||
Software rendering avoids depending on the host's GPU drivers. The image
|
||||
sets `MOONMIX_ICON_THEME=Adwaita` so a host-only icon theme (such as Papirus)
|
||||
does not cause missing icons; native runs keep the desktop's icon theme.
|
||||
`$XDG_RUNTIME_DIR/bus` when present for desktop appearance settings, and
|
||||
whichever standard host icon, pixmap and `.desktop` directories exist
|
||||
(`/usr/share/{icons,pixmaps,applications}`, Flatpak exports and
|
||||
`$XDG_DATA_HOME/{icons,applications}`) read-only under `/run/moonmix/host/`.
|
||||
Setting `XDG_DATA_DIRS` inside the container lets GIO and `GtkIconTheme`
|
||||
resolve full-colour host application icons (such as Firefox, Spotify or
|
||||
Flatpaks) while bundled Lucide symbolic icons in `/usr/share/icons/hicolor`
|
||||
remain used for devices and controls. It has no network, GPU devices,
|
||||
home-directory mount or elevated privileges; the root filesystem is
|
||||
read-only and temporary files disappear on exit. Software rendering avoids
|
||||
depending on the host's GPU drivers. The image sets
|
||||
`MOONMIX_ICON_THEME=Adwaita` so a host-only icon theme does not leave
|
||||
symbolic fallback icons missing; native runs keep the desktop's icon theme.
|
||||
This is packaging, **not a sandbox for untrusted apps**: the sockets still
|
||||
grant access to your audio session, display and, when mounted, session
|
||||
D-Bus. X11 sessions are not supported by this runner.
|
||||
@@ -206,23 +215,31 @@ graph without changing it.
|
||||
|
||||
### Icons
|
||||
|
||||
Everything else uses the desktop's icon theme (Adwaita, Breeze, Papirus...
|
||||
any theme with the standard freedesktop names; install `adwaita-icon-theme`
|
||||
if icons are missing). The names are chosen in `model/icons.mbt` and tested
|
||||
with `moon test`; the GTK layer only asks the theme `has_icon`:
|
||||
UI controls, tabs, devices and fallback streams use bundled crisp 24×24
|
||||
[Lucide](https://lucide.dev) symbolic SVGs (`data/icons/hicolor/scalable/actions/moonmix-*.svg`,
|
||||
under the ISC License — see [LICENSE.lucide](data/icons/LICENSE.lucide)),
|
||||
which GTK4 recolours automatically to match light, dark and accent-tinted
|
||||
surfaces, with standard freedesktop icon names as secondary fallbacks.
|
||||
Row icons sit inside a 36×36 px soft rounded tile (20 px for symbolic icons,
|
||||
26 px for full-colour app icons, and accent-tinted for the default device);
|
||||
button and tab icons are 16 px.
|
||||
|
||||
- **Devices**: the device's own `device.icon-name` / `node.icon-name`, then
|
||||
`device.form-factor` (headphone, headset, speaker, microphone, webcam,
|
||||
handset, tv, hdmi...), HDMI/webcam/Bluetooth/USB hints, then the direction
|
||||
(speakers or microphone), then `audio-card-symbolic` and
|
||||
`audio-x-generic-symbolic`. Symbolic variants are tried first so they follow
|
||||
the theme's foreground colour. `image-missing` is the very last resort.
|
||||
- **Streams**: `application.icon-name` / `media.icon-name`, then the app's
|
||||
launcher icon found in the installed `.desktop` files (by
|
||||
`pipewire.access.portal.app_id`, `application.process.binary` or
|
||||
`application.name`), then `application-x-executable-symbolic`.
|
||||
- **Mute button**: `audio-volume-high/medium/low/muted-symbolic` following the
|
||||
volume and mute state. Row icons are 32 px, button and tab icons 16 px.
|
||||
The chains are chosen in `model/icons.mbt` and tested with `moon test`;
|
||||
the GTK layer checks `has_icon` (or `"file:<path>"` for absolute icon paths):
|
||||
|
||||
- **Devices**: bundled `moonmix-device-*-symbolic` icons matched from
|
||||
`device.form-factor` (speaker, headphones, headset, microphone, webcam,
|
||||
phone, tv/hdmi display), HDMI/DisplayPort/webcam/Bluetooth/USB hints and
|
||||
sink/source direction, falling back to freedesktop names (`audio-card-symbolic`,
|
||||
`audio-x-generic-symbolic`).
|
||||
- **Streams**: full-colour application icons first (`application.icon-name` /
|
||||
`media.icon-name`, `.desktop` lookup via `GDesktopAppInfo` including `GFileIcon`
|
||||
file paths, and direct theme names from `app_id` / binary), then any
|
||||
symbolic hints, then `moonmix-device-mic-symbolic` for recording streams and
|
||||
`moonmix-app-fallback-symbolic`.
|
||||
- **Mute button & tabs**: `moonmix-volume-high/medium/low/muted-symbolic` and
|
||||
`moonmix-tab-{playback,recording,output,input}-symbolic` (with freedesktop
|
||||
fallbacks).
|
||||
|
||||
Pkg-config flags: moon does not expand `$(pkg-config ...)` in `moon.pkg`
|
||||
link options. Instead, the packages point `link.native.stub-cc` and `cc` at
|
||||
|
||||
Reference in new issue
Block a user