CI / test (push) Failing after 18s
- One shortcut table (compositor/shell/shortcuts.mbt): named actions with their default combos,
the same as before: Super tap launcher, Super+D, Alt+Tab, Super+Shift+S, Super+Shift+Print,
Print, Super+Print, Super+Ctrl+Print, Super+Shift+R, Super+Alt+R, Super+Ctrl+R. Combos are
"Super+Ctrl+Alt+Shift+Key" text (parse/print, aliases like Meta, PrtSc, Return); "Super" alone
is a Super tap. Two shortcuts on one combo conflict and the one listed first wins.
- The compositor looks every non-modifier key press up in the table (compositor/host/
shortcuts.mbt) instead of the hardcoded checks in showdesktop/screenshot/recorder; the switcher
reads its combo from it (hold the combo's modifiers, its key steps, Shift reverses, releasing a
held modifier switches). Matching is now exact on Super/Ctrl/Alt/Shift (caps/num lock ignored),
so e.g. Super+Shift+D or Ctrl+Print no longer fire Super+D / Print.
- Settings gets a fifth tab, Shortcuts (key 5, SettingsTab::Shortcuts): every shortcut and its
combo. Click a row (or Enter) and press the new keys: the compositor captures the combo before
anything else sees it (Escape cancels, Backspace unbinds, a Super tap binds "Super"; window
switching keeps waiting until the combo has a modifier). Changed rows get a Reset button
(Backspace/Delete on the highlighted row too), plus "Reset all to defaults"; conflicting combos
show in red with a line saying which shortcut wins. The popup is 360 px wide for the fifth tab.
- New `shortcuts` capability (shortcuts, capture, cancel-capture, reset, reset-all), served from
host table 10 and request 18 by the wasmer/wasmtime stub, host-wasm and the MoonBit wasmhost
(chandra:host/plasmoids `shortcut(s32)`).
- Changes are kept in state.edn as :shortcuts {:show-desktop "Super+Ctrl+D" ...} (only the ones
that differ; "" unbinds), applied at startup and live.
- There were no window-management or tiling key shortcuts to move into the table.
- Tests: combo parsing/printing, defaults, conflicts, switcher constraint, save/restore pairs,
rebinding through the compositor, capture (Escape/Backspace/Super tap), the Shortcuts tab
(capture, conflict line, Reset, Reset all) and the state.edn round trip.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hjypNwGHE9WeFvnWLA
129 lines
2.9 KiB
Plaintext
129 lines
2.9 KiB
Plaintext
package chandra:desktop@0.1.0;
|
|
|
|
/// Minimum every widget gets: theme tokens. Everything else is opt-in.
|
|
world widget {
|
|
import theme;
|
|
export plasmoid;
|
|
}
|
|
|
|
world clock-widget {
|
|
include widget;
|
|
import clock;
|
|
export module-config;
|
|
}
|
|
|
|
/// The optional `module-config` export on its own. A module of any world may add it to get its own
|
|
/// settings in its right-click menu; hosts look it up separately (host-wasm binds it with this world).
|
|
world configurable {
|
|
export module-config;
|
|
}
|
|
|
|
world launcher-widget {
|
|
include widget;
|
|
import app-catalog;
|
|
import app-launch;
|
|
}
|
|
|
|
world panel {
|
|
import theme;
|
|
export panel-layout;
|
|
}
|
|
|
|
/// Reference shell: panel + desktop background in one component.
|
|
world shell {
|
|
import theme;
|
|
export desktop-surface;
|
|
export panel-layout;
|
|
}
|
|
|
|
/// Desktop Pulse: reads machine state and the window list, and can raise a window.
|
|
world pulse-widget {
|
|
include widget;
|
|
import system;
|
|
import windows;
|
|
}
|
|
|
|
/// Panel task list: needs the window list.
|
|
world taskbar-widget {
|
|
include widget;
|
|
import windows;
|
|
import icons;
|
|
}
|
|
|
|
/// Layout switcher.
|
|
world layout-widget {
|
|
include widget;
|
|
import layout-control;
|
|
}
|
|
|
|
/// Interface Explorer toggle.
|
|
world inspector-widget {
|
|
include widget;
|
|
import inspector;
|
|
}
|
|
|
|
/// Everything a panel module can be granted. The native host instantiates any module against this
|
|
/// one world (a module simply imports the subset it uses) and serves each import from the data the
|
|
/// compositor publishes (wit/host/plasmoids.wit).
|
|
world plasmoid-host {
|
|
import theme;
|
|
import clock;
|
|
import app-catalog;
|
|
import app-launch;
|
|
import windows;
|
|
import layout-control;
|
|
import inspector;
|
|
import modules;
|
|
import system;
|
|
import session;
|
|
import wallpaper;
|
|
import session-settings;
|
|
import icons;
|
|
import screenshot;
|
|
import power;
|
|
import battery;
|
|
import network;
|
|
import shortcuts;
|
|
export plasmoid;
|
|
}
|
|
|
|
/// Logout button.
|
|
world logout-widget {
|
|
include widget;
|
|
import session;
|
|
}
|
|
|
|
/// The settings module: session switches (restore, window places, dark mode), the wallpaper, the
|
|
/// panel's modules (load, unload, browse; the panel menu's "Modules..." opens that tab), and power
|
|
/// (idle timeouts, battery, suspend / restart / power off) and keyboard shortcuts (rebind, reset).
|
|
world session-settings-widget {
|
|
include widget;
|
|
import session-settings;
|
|
import wallpaper;
|
|
import modules;
|
|
import power;
|
|
import system;
|
|
import shortcuts;
|
|
}
|
|
|
|
/// Screenshot and screen recording launcher.
|
|
world screenshot-widget {
|
|
include widget;
|
|
import screenshot;
|
|
}
|
|
|
|
/// Battery charge, charging state and time left in the panel; its right-click settings choose what
|
|
/// shows.
|
|
world battery-widget {
|
|
include widget;
|
|
import battery;
|
|
export module-config;
|
|
}
|
|
|
|
/// Network status (Ethernet, Wi-Fi name and signal, offline) and a popup to pick a Wi-Fi network,
|
|
/// connect, disconnect, and switch Wi-Fi or airplane mode.
|
|
world network-widget {
|
|
include widget;
|
|
import network;
|
|
}
|