Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
desktop menu: resolve the Terminal entry like the launcher
The context menu's Terminal button hardcoded foot, so it ignored the
default-terminal setting (config.kdl `default_terminal`, the settings
app's Default Apps pick, honored by cce-cloud since 5877564). Resolve
the same chain: $TERMINAL (session env, exported by startcce) →
config.kdl → foot fallback, each validated on PATH.
Co-Authored-By: Claude Fable 5 <[email protected]>
scripts/cce-desktop-menu | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/scripts/cce-desktop-menu b/scripts/cce-desktop-menu
index bd25887..468f70c 100644
--- a/scripts/cce-desktop-menu
+++ b/scripts/cce-desktop-menu
@@ -54,8 +54,17 @@ btn=$(echo "$selected" | python3 -c "import sys, json; print(json.load(sys.stdin
case "$btn" in
"terminal")
- # Run terminal
- foot &
+ # The DE's default terminal, resolved like the launcher: $TERMINAL
+ # (session env, exported by startcce) → config.kdl `default_terminal`
+ # (the settings app's Default Apps pick) → foot.
+ term="$TERMINAL"
+ if [[ -z "$term" ]] || ! command -v "$term" >/dev/null 2>&1; then
+ term=$(sed -n 's/^[[:space:]]*default_terminal[[:space:]]*"\([^"]*\)".*/\1/p' "$HOME/.config/cce/config.kdl" 2>/dev/null | head -n 1)
+ fi
+ if [[ -z "$term" ]] || ! command -v "$term" >/dev/null 2>&1; then
+ term=foot
+ fi
+ "$term" &
;;
"files")
# Run files