feat(gui): add a GTK sender panel and a waybar widget
A gtkmm-4.0 control panel (behind -Dgui=true, default off): refresh shows discovered receivers (grouped and preference-sorted), a bitrate scale, and start/stop that runs the whole session on a worker thread so the interactive portal picker never blocks the UI. The CLI and the GUI now share the new sc_app_core static library holding the pipelines, session orchestration (negotiation + PLI feedback), and a state store. The sender pipeline publishes its state to $XDG_RUNTIME_DIR/screencast/sender.json (session id, receiver, bitrate, pid, start time; stale files detected by pid liveness) and persists the last session for one-click restarts. The new 'screencast waybar' subcommand prints a waybar module line and its --toggle flag stops a running sender gracefully or spawns a detached restart of the last receiver. Waybar on the dev machine is wired: custom/screencast module with click-to-toggle and right-click panel, plus styles, with a timestamped backup of both config files. Both binaries are installed to /usr/local/bin. Validated: waybar output (idle and streaming states with a synthetic state file), GUI launches on the desktop (window observed via hyprctl), meson test 5/5 in both build configurations, formatting clean.
This commit is contained in:
+4
-3
@@ -89,9 +89,10 @@ discovered addresses in reachability order (private IPv4 first).
|
||||
- [x] Jitter/reorder window on the receiver (16 packets / 60 ms).
|
||||
- [x] Hardware H.264 decode probe with software fallback (h264_v4l2m2m —
|
||||
the Pi's VideoCore path; --swdecode opts out).
|
||||
- [ ] GTK4 sender GUI behind `meson -Dgui=true` + a waybar widget
|
||||
(requested; plan approved scope: sender panel, state file,
|
||||
`screencast waybar` subcommand).
|
||||
- [x] GTK4 sender GUI behind `meson -Dgui=true` (gtkmm; receiver list,
|
||||
bitrate, start/stop) plus a waybar widget (`screencast waybar`,
|
||||
click-to-toggle, right-click opens the panel; state shared via
|
||||
$XDG_RUNTIME_DIR/screencast/sender.json).
|
||||
- [ ] VAAPI hardware encode probe on the sender (deferred: software
|
||||
encode is not the bottleneck).
|
||||
- Deferred: .desktop file, packaging.
|
||||
|
||||
@@ -134,6 +134,24 @@ A window manager only comes with the desktop-session alternative, where
|
||||
the receiver runs inside it (uncomment the `Environment=` lines in the
|
||||
service file as described above).
|
||||
|
||||
## GTK panel and waybar widget (Phase 7)
|
||||
|
||||
Build the GUI alongside the CLI (`meson configure build -Dgui=true`, then
|
||||
recompile; installs as `screencast-gui`):
|
||||
|
||||
```sh
|
||||
screencast-gui # receiver list → pick one → bitrate → Start
|
||||
screencast waybar # one JSON line for a waybar custom module
|
||||
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.
|
||||
|
||||
## Under the hood: resilience (Phase 7)
|
||||
|
||||
The receiver absorbs loss in two stages and recovers actively:
|
||||
|
||||
Reference in New Issue
Block a user