CI / test (push) Failing after 45s
- A sixth Settings tab, Apps (key 6, SettingsTab::Apps; the popup is 390 px wide for it): Web
browser, Email, File manager, Terminal, Text editor, Image viewer, Video player, Music player,
PDF and documents, Archive manager. Each row shows the current default with its real icon (the
icon-theme lookup the task manager uses; a letter tile when there is none). Click a row to list
the installed apps that can take it, click one to make it the default. A chosen app that has
been uninstalled since is named in red under its row ("gthumb is not installed any more").
- Installed apps come from the .desktop files in the XDG data dirs (and flatpak's exports), with
MimeType= and Categories= (desktop_entry_keys, now shared with the launcher's parse_desktop).
A kind lists the shown apps that handle one of its MIME types; the terminal lists
TerminalEmulator apps; browsers are only offered as browsers.
- Reading follows the mimeapps.list spec: $XDG_CONFIG_HOME/[chandra-]mimeapps.list, then
$XDG_CONFIG_DIRS (/etc/xdg), then $XDG_DATA_HOME and $XDG_DATA_DIRS applications/; the first
installed [Default Applications] entry wins, else [Added Associations], else mimeinfo.cache
(minus [Removed Associations]), else the first installed app that handles the type. A hidden
(NoDisplay) default still counts and its name is shown.
- Setting writes [Default Applications] in ~/.config/mimeapps.list for each of the kind's MIME
types the app handles (always the main one: http/https/text/html for browsers, mailto,
inode/directory, text/plain, image/png..., video/mp4..., audio/mpeg..., application/pdf...,
application/zip...), as xdg-mime default / xdg-settings do, without running them. Every other
section, entry, comment and blank line is kept; the app leaves those types' [Removed
Associations]; a chandra-mimeapps.list that already names one of those types is updated too.
- The terminal has no MIME type: state.edn :terminal "kitty" (desktop id), also written first in
~/.config/xdg-terminals.list (xdg-terminal-exec). Terminal=true apps from the launcher (and
session restore) now start in it (foot -e, kgx/gnome-terminal/ptyxis --, kitty <cmd>, wezterm
start --) instead of always foot; with no choice: xdg-terminals.list, then foot, then any
installed terminal. Terminal apps are listed when any terminal emulator is installed, not only
foot.
- New `default-apps` capability (categories, apps, set-default, refresh): host tables 11 (sss:
name current missing) and 12 (issii: category id name icon current), request 19 (category *
1000 + app, -1 rescans) in the wasmer/wasmtime stub, host-wasm and the MoonBit wasmhost
(chandra:host/plasmoids default-app(s32)). Nothing is scanned until the tab opens (refresh).
- Tests with a temporary XDG tree: categories and current defaults (user file, system file,
Added Associations, mimeinfo.cache, missing apps, hidden defaults), writing that keeps other
entries, desktop-specific files, the terminal list and commands, the Apps tab end to end, and
the :terminal round trip through state.edn.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hgywj7RPmFdFhpzGZj
130 lines
3.2 KiB
Plaintext
130 lines
3.2 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 (and the dock, which uses only the first two). 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;
|
|
}
|
|
|
|
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;
|
|
}
|