add cline

This commit is contained in:
2026-10-28 06:26:57 -06:00
parent 28a6e43e07
commit 7c22510eee
8 changed files with 89 additions and 5 deletions
+18
View File
@@ -43,6 +43,24 @@ if [ -f "$CLAUDE_SETTINGS" ]; then
fi
fi
# Cline Desktop is opened from the app menu, so an entry of the same name in
# ~/.local/share/applications, which wins over the package's, runs it in the
# sandbox. It's removed when the package is.
CLINE_DESKTOP="/usr/share/applications/cline-desktop.desktop"
CLINE_ENTRY="$HOME/.local/share/applications/cline-desktop.desktop"
if [ -f "$CLINE_DESKTOP" ]; then
tmp="$(mktemp)"
sed "s#^Exec=.*#Exec=$COREDESKTOP/sandbox/bin/cline-desktop %U#" "$CLINE_DESKTOP" > "$tmp"
if cmp -s "$tmp" "$CLINE_ENTRY"; then
rm -f "$tmp"
else
echo "Running Cline Desktop in the sandbox..."
mkdir -p "$(dirname "$CLINE_ENTRY")" && mv -f "$tmp" "$CLINE_ENTRY" && chmod 644 "$CLINE_ENTRY" || STATUS=1
fi
elif [ -f "$CLINE_ENTRY" ]; then
rm -f "$CLINE_ENTRY"
fi
# Hermes' gateway acts on messages from outside this machine, so it runs in
# the sandbox too: a systemd drop-in starts it through sandbox/bin/hermes. It
# also needs to reach the Matrix server in Hermes' settings, which differs on