Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
fix(scripts): the window and desktop menus spell no marks or arrows
cce-app-menu and cce-desktop-menu built their Window Mode page out of
characters: "Window Mode >", "< Back", and "● " against three spaces for
the current mode. cce-cloud now draws a JSON menu's marks and page turns
as cce-icons glyphs (cce-cloud@820bf57), so the labels carry only words:
the page and Back rows get their chevrons from target_page, and the mode
rows are a radio group, "● " on and "○ " off, drawn as the circle glyphs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CLAUDE.md | 5 ++++-
scripts/cce-app-menu | 10 +++++++---
scripts/cce-desktop-menu | 10 +++++++---
3 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/CLAUDE.md b/CLAUDE.md
index 1c6ebf80..b18c2590 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -586,7 +586,10 @@ sat outside the edges and the ring that followed hugged them.
bodies are excluded. The menu's "Window Mode" page — a second JSON page
reached through a `target_page` button, which switches pages without
closing the popup — sets the mode with `ccectl set-mode <mode> <id>`, one
- window by id. Not `ccectl mode`, which appends a persistent app_id rule.
+ window by id. Its marks and arrows are cce-cloud's glyphs, not text: the
+ mode rows lead with `"● "` / `"○ "` (drawn as the circle glyphs), and the
+ page and Back rows carry only their words, cce-cloud adding the chevrons
+ from `target_page` (see cce-cloud's CLAUDE.md, the `Json` mode). Not `ccectl mode`, which appends a persistent app_id rule.
`cce-desktop-menu` carries the same page for the FOCUSED window: the
background right-click passes it as `-i <id> -a <app_id>` (settable modes
only) because it drops focus right after the spawn, so the script could
diff --git a/scripts/cce-app-menu b/scripts/cce-app-menu
index 9b1798dc..344e1bac 100755
--- a/scripts/cce-app-menu
+++ b/scripts/cce-app-menu
@@ -63,10 +63,14 @@ current_mode=$("$CCE_CTL" windows --json 2>/dev/null | jq -Rrn --arg want "$wind
# for JSON rather than spliced into it.
json_layout=$(jq -nc --arg app_id "$app_id" --arg current "$current_mode" '
def btn($text; $id): {type: "button", text: $text, id: $id};
-def mode($text; $id): btn((if $id == $current then "● " else " " end) + $text; $id);
+# The mode page is a radio group: cce-cloud draws the toolkit leading
+# marks ("● " on, "○ " off) as the circle glyphs, and a `target_page` button
+# as a page row (chevron-right) or, turning back to an earlier page, a back
+# row (chevron-left) -- so no label spells a mark or an arrow of its own.
+def mode($text; $id): btn((if $id == $current then "● " else "○ " end) + $text; $id);
{pages: [
{title: $app_id, justify: "left", widgets: [
- btn("Window Mode >"; "mode_page") + {target_page: 1},
+ btn("Window Mode"; "mode_page") + {target_page: 1},
btn("Minimize"; "minimize"),
btn("Close Window"; "close")
]},
@@ -74,7 +78,7 @@ def mode($text; $id): btn((if $id == $current then "● " else " " end) + $tex
mode("Floating"; "floating"),
mode("Tiled"; "tiled"),
mode("Fullscreen"; "fullscreen"),
- btn("< Back"; "back") + {target_page: 0}
+ btn("Back"; "back") + {target_page: 0}
]}
]}')
diff --git a/scripts/cce-desktop-menu b/scripts/cce-desktop-menu
index 473d2094..cedcb652 100755
--- a/scripts/cce-desktop-menu
+++ b/scripts/cce-desktop-menu
@@ -71,7 +71,11 @@ fi
# pages without closing the popup.
json_layout=$(jq -nc --arg app_id "$app_id" --arg current "$current_mode" '
def btn($text; $id): {type: "button", text: $text, id: $id};
-def mode($text; $id): btn((if $id == $current then "● " else " " end) + $text; $id);
+# The mode page is a radio group: cce-cloud draws the toolkit leading
+# marks ("● " on, "○ " off) as the circle glyphs, and a `target_page` button
+# as a page row (chevron-right) or, turning back to an earlier page, a back
+# row (chevron-left) -- so no label spells a mark or an arrow of its own.
+def mode($text; $id): btn((if $id == $current then "● " else "○ " end) + $text; $id);
[
btn("Terminal"; "terminal"),
btn("Files"; "files"),
@@ -82,7 +86,7 @@ def mode($text; $id): btn((if $id == $current then "● " else " " end) + $tex
]
# The focused-window verbs, together, the same three cce-app-menu has.
+ (if $current != "" then [
- btn("Window Mode >"; "mode_page") + {target_page: 1},
+ btn("Window Mode"; "mode_page") + {target_page: 1},
btn("Minimize"; "minimize"),
btn("Close Window"; "close")
] else [] end)
@@ -93,7 +97,7 @@ def mode($text; $id): btn((if $id == $current then "● " else " " end) + $tex
mode("Floating"; "floating"),
mode("Tiled"; "tiled"),
mode("Fullscreen"; "fullscreen"),
- btn("< Back"; "back") + {target_page: 0}
+ btn("Back"; "back") + {target_page: 0}
]}] else [] end)
)}')