CI / test (push) Failing after 17s
The dock showed the first eight catalog apps as letter tiles, and that list reshuffled after every launch (the catalog puts recent apps first). Now: - Pinned apps first, in the order you set, then the other running apps after a thin divider (like macOS). Windows find their app by desktop id, case, the last dotted part, or the app's name (xterm -> debian-xterm.desktop "XTerm"); windows without an app id stay out. - Real icons from the icon theme (the `icons` capability, as in the task manager), with the letter tile as fallback. The shell publishes icons for pinned apps that aren't running too. - A dot under an icon per open window (up to three), a longer accent bar when the app has focus. - Click: start the app if it isn't running, otherwise bring its newest window forward (restoring it if minimized); click a focused app again to step through its windows. - Hover: the icon grows (neighbours a little) on a light highlight, and the shell draws the app's name in a label above it. - Right-click an icon (drawn by the shell, like the task manager's window menu): Open / New window, Pin to dock / Unpin from dock, Move left / Move right, Quit or Close N windows, and Dock settings. - Dock settings (module-config): Icon size (Small/Medium/Large), Magnify icons under the pointer, Show running apps that aren't pinned. The pinned list is a hidden setting (empty label: the shell's settings menu skips it), saved in state.edn's :module-config. Until it is set the dock pins the catalog's first five, and the shell saves that once so launches don't move them. - The panel sizes the dock from its current items (a module's preferred width is read once). Plumbing: new WIT world dock-widget (app-catalog, app-launch, windows, icons, exports module-config); no new interfaces, so both hosts load it as is. lib/dock holds the items, layout, hit-testing, drawing and pin edits, shared by the module and compositor/shell/dock.mbt. The shell's Launch handling moved into launch_catalog_app so the menu can use it. Also: DesktopShell::pointer_move delivered every hover move twice (a duplicated block). Tests: lib/dock (settings round trip, app matching, item order, hit-testing with the divider, clicks and window cycling, drawing, pin edits), compositor/host input_test (the dock in a real compositor: saved default pins, growing for running apps, hover label, the menu's rows and actions, settings menu without the pinned row, focusing by click), dock_test (screenshots in _build/dock_hover.png and dock_menu.png). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hkmB8pJF5ckPeecFxL
143 lines
3.6 KiB
Plaintext
143 lines
3.6 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;
|
|
}
|
|
|
|
/// The application launcher. The launcher's popup
|
|
/// also ends in a session row: Reload, Log out, Suspend, Restart, Power off.
|
|
world launcher-widget {
|
|
include widget;
|
|
import app-catalog;
|
|
import app-launch;
|
|
import session;
|
|
import power;
|
|
}
|
|
|
|
/// The dock: pinned apps plus running ones, with their theme icons, a dot per open window, a click
|
|
/// that starts the app or brings its windows forward, and right-click settings (icon size,
|
|
/// magnification, running apps). The shell keeps the pinned list (hidden `pinned` setting) and
|
|
/// draws the per-app right-click menu (Pin, Move, Quit), sharing lib/dock's layout.
|
|
world dock-widget {
|
|
include widget;
|
|
import app-catalog;
|
|
import app-launch;
|
|
import windows;
|
|
import icons;
|
|
export module-config;
|
|
}
|
|
|
|
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;
|
|
import default-apps;
|
|
export plasmoid;
|
|
}
|
|
|
|
/// 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), keyboard shortcuts (rebind, reset) and
|
|
/// default apps (browser, email, files, terminal, editor, viewers and players).
|
|
world session-settings-widget {
|
|
include widget;
|
|
import session-settings;
|
|
import wallpaper;
|
|
import modules;
|
|
import power;
|
|
import system;
|
|
import shortcuts;
|
|
import default-apps;
|
|
}
|
|
|
|
/// 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;
|
|
}
|