Add chandra-remote: VNC and web control over Tailscale
CI / test (push) Failing after 50s

- remote/: shared-memory framebuffer mirror served as RFB 3.8 (VNC, port 5900) and an HTTP/WebSocket PWA (port 6080), bound to the Tailscale interface and loopback by default
- Compositor: remote pointer, button, scroll, modifier, key, key-tap, text and clipboard input, routed past OLED blanking
- chandra-ctl: add status, refresh and osk commands; add input-* and clipboard-set for remote control
- Camera: debayer 10-bit CSI-2 Quad-Bayer frames for imx371 and high-quality still capture
- Camera: rotate frames by the libcamera mounting angle (CCW for 90), fix the expected test values, and restyle the UI for a dark theme
This commit is contained in:
nandi committed 2026-11-28 17:57:55 -08:00
1 parent de39b74282
commit bfc60ee0e5
24 files changed
+5310 -79

No files matched your search

+42 -23
View File
@@ -1105,43 +1105,53 @@ static gboolean start_worker_process(CameraApp *app) {
}
static void build_ui(CameraApp *app) {
GtkSettings *settings = gtk_settings_get_default();
if (settings) {
g_object_set(settings, "gtk-application-prefer-dark-theme", TRUE, NULL);
}
const char *css =
"window, .cam-root { background-color: #0b0d14; color: #f4f6fc; }\n"
".cam-pill { background-color: rgba(14, 18, 30, 0.74); color: #f4f6fc;\n"
" border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 18px;\n"
" padding: 5px 12px; font-size: 13px; font-weight: 600; min-height: 24px; }\n"
".cam-pill:hover { background-color: rgba(30, 38, 60, 0.88); }\n"
".cam-pill-active { background-color: rgba(110, 140, 255, 0.88);\n"
" color: #090d16; border-color: rgba(180, 200, 255, 0.90); }\n"
".cam-pill-danger { background-color: rgba(239, 68, 68, 0.88);\n"
" color: #ffffff; border-color: rgba(255, 180, 180, 0.80); }\n"
".cam-dock { background-color: rgba(10, 12, 20, 0.86);\n"
" border-top: 1px solid rgba(255, 255, 255, 0.10); padding: 10px 16px 14px 16px; }\n"
".cam-mode-bar { background-color: rgba(255, 255, 255, 0.08);\n"
"window, .cam-root { background-color: #0b0d14; background-image: none; color: #f4f6fc; }\n"
"button.cam-pill { background-color: rgba(14, 18, 30, 0.82); background-image: none; color: #f4f6fc;\n"
" border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 18px;\n"
" box-shadow: none; text-shadow: none; -gtk-icon-shadow: none;\n"
" padding: 4px 10px; font-size: 12px; font-weight: 600; min-height: 24px; }\n"
"button.cam-pill label { color: inherit; }\n"
"button.cam-pill:hover { background-color: rgba(34, 43, 68, 0.92); background-image: none; }\n"
"button.cam-pill.cam-pill-active { background-color: #6e8cff; background-image: none;\n"
" color: #090d16; border-color: rgba(180, 200, 255, 0.95); }\n"
"button.cam-pill.cam-pill-danger { background-color: #ef4444; background-image: none;\n"
" color: #ffffff; border-color: rgba(255, 180, 180, 0.85); }\n"
".cam-dock { background-color: rgba(10, 12, 20, 0.88); background-image: none;\n"
" border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 10px 14px 14px 14px; }\n"
".cam-mode-bar { background-color: rgba(255, 255, 255, 0.10); background-image: none;\n"
" border-radius: 18px; padding: 3px; }\n"
".cam-mode-btn { background-color: transparent; color: #c2cadc; border: none;\n"
"button.cam-mode-btn { background-color: transparent; background-image: none; color: #c2cadc;\n"
" border: none; box-shadow: none; text-shadow: none; -gtk-icon-shadow: none;\n"
" border-radius: 15px; padding: 4px 18px; font-size: 13px; font-weight: 600; min-height: 22px; }\n"
".cam-mode-selected { background-color: #6e8cff; color: #0b0d14; }\n"
".cam-mode-selected-video { background-color: #ef4444; color: #ffffff; }\n"
".cam-rec-badge { background-color: rgba(239, 68, 68, 0.90); color: #ffffff;\n"
"button.cam-mode-btn label { color: inherit; }\n"
"button.cam-mode-btn.cam-mode-selected { background-color: #6e8cff; background-image: none; color: #0b0d14; }\n"
"button.cam-mode-btn.cam-mode-selected-video { background-color: #ef4444; background-image: none; color: #ffffff; }\n"
".cam-rec-badge { background-color: rgba(239, 68, 68, 0.92); color: #ffffff;\n"
" border-radius: 12px; padding: 2px 10px; font-size: 12px; font-weight: 700; }\n"
".cam-icon-btn { background-color: transparent; border: none; padding: 0; box-shadow: none; }\n"
".cam-gallery-bar { background-color: #111523;\n"
" border-bottom: 1px solid rgba(255, 255, 255, 0.10); padding: 8px 12px; }\n"
".cam-gallery-foot { background-color: #111523;\n"
" border-top: 1px solid rgba(255, 255, 255, 0.10); padding: 8px 14px; }\n"
"button.cam-icon-btn, button.cam-icon-btn:hover { background-color: transparent; background-image: none;\n"
" border: none; padding: 0; box-shadow: none; outline: none; }\n"
".cam-gallery-bar { background-color: #111523; background-image: none;\n"
" border-bottom: 1px solid rgba(255, 255, 255, 0.12); padding: 8px 10px; }\n"
".cam-gallery-foot { background-color: #111523; background-image: none;\n"
" border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 8px 12px; }\n"
".cam-title { font-size: 14px; font-weight: 700; color: #f4f6fc; }\n"
".cam-sub { font-size: 12px; color: #9ba6c2; }\n";
GtkCssProvider *prov = gtk_css_provider_new();
gtk_css_provider_load_from_data(prov, css, -1, NULL);
gtk_style_context_add_provider_for_screen(
gdk_screen_get_default(), GTK_STYLE_PROVIDER(prov), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
gdk_screen_get_default(), GTK_STYLE_PROVIDER(prov), GTK_STYLE_PROVIDER_PRIORITY_USER);
g_object_unref(prov);
app->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(app->window), "Camera");
gtk_window_set_default_size(GTK_WINDOW(app->window), 520, 960);
gtk_window_set_default_size(GTK_WINDOW(app->window), 480, 860);
gtk_widget_set_size_request(app->window, 340, 480);
gtk_style_context_add_class(gtk_widget_get_style_context(app->window), "cam-root");
@@ -1372,6 +1382,15 @@ int main(int argc, char **argv) {
sync_ui_labels(&app);
gtk_widget_show_all(app.window);
GdkDisplay *dpy = gdk_display_get_default();
GdkMonitor *mon = dpy ? gdk_display_get_monitor(dpy, 0) : NULL;
if (mon) {
GdkRectangle geo;
gdk_monitor_get_geometry(mon, &geo);
if (geo.width <= 900 || geo.height > geo.width) {
gtk_window_maximize(GTK_WINDOW(app.window));
}
}
if (app.open_gallery_start) {
open_gallery_view(&app);
} else {