Wasm panel modules, widget host, merged plasmoid host design, and shell/UI work
Panel and wasm host - The panel is built from wasm plasmoid modules (compositor/wasm: wasmer-backed host). Modules get capabilities by importing host interfaces; the host publishes data tables and serves a request queue (launch, focus window, set layout, inspector, load/unload modules). New WIT: windows, layout-control, inspector, modules, system. - Merged two competing host designs: generic tables + requests are the base; the `system` snapshot and the id-stable `windows.all/focus` (Desktop Pulse) run on top of it. - Panel widgets: load a .wasm from a path or file chooser, reorder by dragging, right-click replace/remove/add, saved to panel.edn. - Desktop widget, system sampler (sysinfo), app catalog/humanised names, Interface Explorer (inspector), real font rendering (compositor/font, assets/fonts). Compositor - Drag the divider between tiled windows; lower tiled rows leave room for the title bar. - Title-bar buttons, 12-hour clock, truncated titles, task-list/layout menus. - DRM/KMS session, tcc debug builds (vendored tinycc incl. conftest.c), justfile recipes (modules, run, test), pixi.toml. Known gaps - The sources for the pulse, tasks, layout, inspector, module-manager, moon-* and clock-digital12 modules are not in the tree yet, so `just modules` stops at pulse and the host tests that load those modules fail until they land. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
080377fd79
commit
0145981c6a
57 files changed
+11461
-221
No files matched your search
@@ -0,0 +1,44 @@
|
||||
///| Desktop widget: a card on the wallpaper (below all windows, top-right) showing
|
||||
/// the time, the date and the current moon phase. Built from the same pure lib/*
|
||||
/// renderers as the panel widgets.
|
||||
|
||||
///|
|
||||
let desktop_widget_w : Int = 260
|
||||
|
||||
///|
|
||||
let desktop_widget_h : Int = 120
|
||||
|
||||
///|
|
||||
fn render_desktop_widget(
|
||||
screen_w : Int,
|
||||
tokens : @theme.Tokens,
|
||||
at : @types.Datetime,
|
||||
out : Array[@scene.DrawOp],
|
||||
) -> Unit {
|
||||
let r = tokens.radius.reinterpret_as_int()
|
||||
let hour = at.hour.to_int()
|
||||
let minute = at.minute.to_int()
|
||||
let time = @timefmt.hhmm12(hour, minute)
|
||||
let date = @timefmt.weekday_short(at.weekday.to_int()) +
|
||||
", " +
|
||||
at.day.to_int().to_string() +
|
||||
" " +
|
||||
@timefmt.month_short(at.month.to_int())
|
||||
let p = @moon.phase(at.year.reinterpret_as_int(), at.month.to_int(), at.day.to_int())
|
||||
let ops : Array[@types.DrawOp] = [
|
||||
@ui.fill_rect(@ui.rect(0, 0, desktop_widget_w, desktop_widget_h), tokens.palette.surface, radius=r),
|
||||
@ui.stroke_rect(@ui.rect(0, 0, desktop_widget_w, desktop_widget_h), tokens.palette.border, width=1, radius=r),
|
||||
@ui.text(18, 38, time, 32, tokens.palette.foreground, bold=true),
|
||||
@ui.text(18, 74, date, tokens.font_size.reinterpret_as_int(), tokens.palette.foreground),
|
||||
@ui.text(
|
||||
18,
|
||||
98,
|
||||
@moon.phase_name(p) + " " + @moon.illumination(p).to_string() + "%",
|
||||
tokens.font_size.reinterpret_as_int() - 2,
|
||||
tokens.palette.foreground,
|
||||
),
|
||||
]
|
||||
let x0 = screen_w - desktop_widget_w - 24
|
||||
translate(ops, x0, 24, out)
|
||||
translate(@moon.render_disc(@ui.size(56, 56), tokens, p), x0 + desktop_widget_w - 56 - 18, 24 + 18, out)
|
||||
}
|
||||
Reference in new issue
Block a user