From 4a55182ce17fd4474f8be1e8819a41b7ccd11045 Mon Sep 17 00:00:00 2001 From: srdusr <99972264+srdusr@users.noreply.github.com> Date: Sun, 31 Aug 2025 14:04:00 +0200 Subject: Wire aspect_ratio, phone_mode and pin_input through config/IPC/CLI The Lua and IPC/CLI surface for the three new core primitives (crates/core: aspect_ratio rule action, general.phone_mode, virtual- pointer window pinning): - srd.rule(..., { aspect_ratio = "9:16" }): parses a "W:H" string into a validated (u32, u32), rejecting a malformed value as a real Lua error at config-load time rather than silently ignoring it. - general.phone_mode config default, plus srd set phone_mode for the live equivalent (same shape as animations/shadows/rounded_corners). - pin_input IPC dispatch ({"cmd":"pin_input","pid":,"id":}, id omitted to unpin) and its CLI surface, srd dispatch pin input / unpin input . Keyed by the owning client's process id, not an opaque per-object id nothing outside the Wayland backend could ever learn - a controlling tool already knows its own pid for free. See docs/TODO.md for the full design reasoning behind each of these. --- crates/config/src/engine/support.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'crates/config/src/engine/support.rs') diff --git a/crates/config/src/engine/support.rs b/crates/config/src/engine/support.rs index 7537fce..97c499f 100644 --- a/crates/config/src/engine/support.rs +++ b/crates/config/src/engine/support.rs @@ -154,11 +154,25 @@ pub(super) fn default_config() -> HashMap { // every other ordinary flag rather than left absent for a backend to // decide. set("general.gpu", Bool(false)); + // `false`: opt-in single-app-at-a-time placement, off by default so + // an ordinary desktop session's floating/tiling behavior is + // completely unaffected - see `WindowManager::phone_mode`'s own doc + // comment. + set("general.phone_mode", Bool(false)); // Real desktop icons (Home/Computer/Trash plus `~/Desktop`'s own // contents) on by default - see `WindowManager::desktop_icons_ // enabled`'s own doc comment for why this, unlike `general.gpu` just // above, doesn't need an opt-in safety net. set("general.desktop_icons", Bool(true)); + // On by default - see `WindowManager::desktop_icons_all_monitors`'s + // own doc comment. + set("general.desktop_icons_all_monitors", Bool(true)); + // `0` (no static reservation) by default - see `WindowManager:: + // reserve_top`'s own doc comment for what this is and why. + set("general.reserve_top", Number(0.0)); + set("general.reserve_bottom", Number(0.0)); + set("general.reserve_left", Number(0.0)); + set("general.reserve_right", Number(0.0)); // Empty by default - see `WindowManager::file_manager`'s own doc // comment: empty means "dispatch via `xdg-open`", not "no file manager // configured, do nothing". -- cgit v1.2.3