Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
chore: HOME-relative paths, untrack scratch/, refresh CLAUDE.md
The menu scripts and cursor.rs context-menu spawns resolve ~/.local/bin
through HOME instead of a hardcoded /home/lsgalante. scratch/ debug
artifacts leave version control (files stay on disk, now gitignored).
CLAUDE.md drops its stale-README note (README was already rewritten)
and the TOML-comments note (those comments are gone), and updates the
central-file descriptions for the policy-crate split.
Co-Authored-By: Claude Fable 5 <[email protected]>
.gitignore | 1 +
CLAUDE.md | 23 ++++++++++-------------
scripts/cce-app-menu | 4 ++--
scripts/cce-desktop-menu | 10 +++++-----
src/server/cursor.rs | 6 ++++--
5 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/.gitignore b/.gitignore
index 5552c02..c189624 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
*.log
check_errors.txt
/scenefx/build/
+/scratch/
diff --git a/CLAUDE.md b/CLAUDE.md
index d13ddfc..869da62 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -22,10 +22,6 @@ extracted from this crate's `src/server/policy/`; `src/lib.rs` re-exports it as
`crate::policy` / `crate::tiling` / `crate::slotmap`, so mechanism code keeps using
the historical paths.
-> Note: `README.md` is stale — it describes an old split `cce-server`/`cce-client`
-> architecture. The real architecture is monolithic (a single `cce-fx` server binary
-> plus the `ccectl` control client). `standalone client mode is deprecated`.
-
## Build / run / install
```sh
@@ -105,12 +101,14 @@ treats them as opaque.
server, loads config + persisted state, adds the wayland socket, spawns the init
program (`~/.config/cce/init` via `sh -c`) and the IPC + status servers, then
`wl_display_run`.
-- **`window_manager.rs`** (~3800 lines) — the heart. Holds the WM state, viewport
- pan/zoom ("overview"/desktop-grid), window lists, and the IPC command dispatcher
- `process_ipc_command()`. IPC requests arrive on an mpsc channel drained by a
- wlroots event-loop timer (`handle_ipc_timer`) so all mutation happens on the main
- thread.
-- **`window.rs`** (~3300 lines) — per-window model and rendering (borders, blur,
+- **`window_manager.rs`** (~3900 lines) — the heart of the mechanism side. Holds the
+ WM state, the camera fields, window lists, the IPC command dispatcher
+ `process_ipc_command()`, the `Policy::action` snapshot builder
+ (`build_action_ctx`) and the `Compositor` command applier. IPC requests arrive on
+ an mpsc channel drained by a wlroots event-loop timer (`handle_ipc_timer`) so all
+ mutation happens on the main thread. Decision logic (camera math, action
+ dispatch, snapping, refocus, grid geometry) lives in `cce-window-manager`.
+- **`window.rs`** (~3900 lines) — per-window model and rendering (borders, blur,
viewport transforms).
- **`crate::tiling`** (from `cce-window-manager`) — `TilingMode` enum: `Floating`,
`Cascade`, `Grid`, `Fullscreen`, `Popup`, `Overlay`, `Maximized`. Modes apply
@@ -128,9 +126,8 @@ treats them as opaque.
Loaded on startup from **`$XDG_CONFIG_HOME/cce/config.kdl`** (falls back to
`~/.config/cce/config.kdl`). An adjacent `input.kdl` is merged in for key bindings and
-input settings. **The format is KDL** (via the `kdl` crate) despite some source
-comments in `config.rs` still saying "TOML" — trust `parse_kdl_config`, not the
-comments. `config.rs` maps parsed values onto `WindowManager` state (layout gaps,
+input settings. **The format is KDL** (via the `kdl` crate; `parse_kdl_config`).
+`config.rs` maps parsed values onto `WindowManager` state (layout gaps,
border/blur/desktop styling, keybindings → `Action`s, startup programs, output/display
settings). Live reconfiguration comes in over IPC (`ccectl reload`, `bind`, `layout …`,
`config-done`, etc.).
diff --git a/scripts/cce-app-menu b/scripts/cce-app-menu
index 0aa7808..de594e6 100644
--- a/scripts/cce-app-menu
+++ b/scripts/cce-app-menu
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
# cce-app-menu — Context menu for CCE application windows
-CCE_CTL="/home/lsgalante/.local/bin/ccectl"
-CLEAR_CLOUD="/home/lsgalante/.local/bin/cce-cloud"
+CCE_CTL="$HOME/.local/bin/ccectl"
+CLEAR_CLOUD="$HOME/.local/bin/cce-cloud"
# Default to empty/none
x_arg=""
diff --git a/scripts/cce-desktop-menu b/scripts/cce-desktop-menu
index 82bad24..4c11f90 100644
--- a/scripts/cce-desktop-menu
+++ b/scripts/cce-desktop-menu
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
# cce-desktop-menu — Context menu for CCE desktop background
-CCE_CTL="/home/lsgalante/.local/bin/ccectl"
-CLEAR_CLOUD="/home/lsgalante/.local/bin/cce-cloud"
+CCE_CTL="$HOME/.local/bin/ccectl"
+CLEAR_CLOUD="$HOME/.local/bin/cce-cloud"
# Default to empty coordinates if not provided
x_arg=""
@@ -59,11 +59,11 @@ case "$btn" in
;;
"files")
# Run files
- /home/lsgalante/.local/bin/cce-files &
+ "$HOME"/.local/bin/cce-files &
;;
"data_editor")
# Run data editor
- /home/lsgalante/.local/bin/cce-data-editor &
+ "$HOME"/.local/bin/cce-data-editor &
;;
"apps")
# Run applications search/list
@@ -71,7 +71,7 @@ case "$btn" in
;;
"settings")
# Run settings interface
- /home/lsgalante/.local/bin/cce-system-settings &
+ "$HOME"/.local/bin/cce-system-settings &
;;
"expose")
$CCE_CTL expose
diff --git a/src/server/cursor.rs b/src/server/cursor.rs
index 5ff6ca0..316a60c 100644
--- a/src/server/cursor.rs
+++ b/src/server/cursor.rs
@@ -912,7 +912,8 @@ unsafe extern "C" fn handle_button(listener: *mut ffi::wl_listener, data: *mut s
cursor.right_click_on_bg = true;
let x = cursor.x() as i32;
let y = cursor.y() as i32;
- let cmd = format!("/home/lsgalante/.local/bin/cce-desktop-menu -x {} -y {}", x, y);
+ let home = std::env::var("HOME").unwrap_or_default();
+ let cmd = format!("{}/.local/bin/cce-desktop-menu -x {} -y {}", home, x, y);
(*server).wm.execute_action(&crate::config::Action::Spawn, Some(&cmd));
seat.focus(Focus::None);
@@ -1042,7 +1043,8 @@ unsafe extern "C" fn handle_button(listener: *mut ffi::wl_listener, data: *mut s
let y = cursor.y() as i32;
let index = (*border_target_win).ref_key.index;
let app_id = (*border_target_win).get_app_id_string().unwrap_or_else(|| "unknown".to_string());
- let cmd = format!("/home/lsgalante/.local/bin/cce-app-menu -x {} -y {} -i {} -a {}", x, y, index, app_id);
+ let home = std::env::var("HOME").unwrap_or_default();
+ let cmd = format!("{}/.local/bin/cce-app-menu -x {} -y {} -i {} -a {}", home, x, y, index, app_id);
(*server).wm.execute_action(&crate::config::Action::Spawn, Some(&cmd));
cursor.pressed.insert((*event).button, None);