From 6c1dfe191843ad56aaa0381e5645ad9e74c38b8b Mon Sep 17 00:00:00 2001 From: srdusr <99972264+srdusr@users.noreply.github.com> Date: Fri, 17 Jan 2025 23:01:00 +0200 Subject: Accumulate config engine, build metadata, and doc updates Remaining files from the backlog: Lua config engine additions (general/register/support/window), workspace Cargo.toml/ Cargo.lock churn from the new dependencies added elsewhere in this sweep, srdwm/main.rs wiring, and docs (DEFAULTS.md plus a new SESSION_HANDOFF.md written mid-session for continuity across a restart - see that file's own header for what it is and isn't). --- crates/config/src/engine/window.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'crates/config/src/engine/window.rs') diff --git a/crates/config/src/engine/window.rs b/crates/config/src/engine/window.rs index a7e6bf3..61e7b89 100644 --- a/crates/config/src/engine/window.rs +++ b/crates/config/src/engine/window.rs @@ -139,6 +139,20 @@ impl Engine { })?) } + pub(super) fn fn_window_set_corner_radius(&self) -> Result> { + let state = self.state.clone(); + Ok(self.lua.create_function(move |_, radius: u32| { + let wm = state.borrow().wm.clone(); + let mut wm = wm.borrow_mut(); + if let Some(id) = wm.focused_id() { + if let Some(w) = wm.window_mut(id) { + w.corner_radius = radius; + } + } + Ok(()) + })?) + } + pub(super) fn fn_window_set_opacity(&self) -> Result> { let state = self.state.clone(); Ok(self.lua.create_function(move |_, opacity: f32| { -- cgit v1.2.3