feat(app): wire the app icon into the GUI, waybar, and SDL window
screencast_icon/ holds the single source icon set; meson install ships the 256 px PNG into the hicolor theme for the GTK panel (themed icon name) and the waybar CSS, and a custom target embeds it as icon_png_data.h so the SDL receiver window sets it via SDL_SetWindowIcon with an optional SDL3_image dependency (built-in find_library, since no pkg-config file ships with it).
This commit is contained in:
+18
-5
@@ -146,11 +146,24 @@ screencast waybar --toggle # stop a running sender / restart the last
|
||||
```
|
||||
|
||||
The waybar module (installed to this machine's `~/.config/waybar/` — see
|
||||
`custom/screencast` there): `▶` while streaming (tooltip: receiver, bitrate,
|
||||
elapsed), `⏸` while idle; left-click toggles streaming to the last receiver
|
||||
via the state file, right-click opens the panel. The sender publishes its
|
||||
state to `$XDG_RUNTIME_DIR/screencast/sender.json`, so every front-end —
|
||||
CLI, GUI, widget — agrees on what is running.
|
||||
`custom/screencast` there): the app icon as the module face (dimmed while
|
||||
idle, green tint while streaming; the `▶`/`⏸` text from the JSON is hidden
|
||||
in the CSS), tooltip with receiver, bitrate, elapsed; left-click toggles
|
||||
streaming to the last receiver via the state file, right-click opens the
|
||||
panel. The sender publishes its state to `$XDG_RUNTIME_DIR/screencast/sender.json`,
|
||||
so every front-end — CLI, GUI, widget — agrees on what is running.
|
||||
|
||||
**Icons**: `screencast_icon/screencast_256.png` is the single app icon.
|
||||
`meson install` puts it in `share/icons/hicolor/256x256/apps/screencast.png`;
|
||||
the GTK panel uses it by themed name (`set_icon_name` — GTK4 removed the
|
||||
pixel-buffer window icon, so themed icons only), and the waybar CSS
|
||||
references the installed path. The SDL receiver window embeds the PNG at
|
||||
build time (`icon_png_data.h` generated by `scripts/icon_to_header.py`) and
|
||||
sets it via `SDL_SetWindowIcon` when SDL3_image is available (optional
|
||||
dependency; no pkg-config ships with it, so meson finds the library
|
||||
directly). Icons surface in compositor taskbars/switchers, not in title
|
||||
bars (neither GTK4's CSD nor Hyprland's decorations draw them).
|
||||
Restart waybar after changing `style.css` to pick up icon changes.
|
||||
|
||||
## Under the hood: resilience (Phase 7)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user