- Projektname: Linux Zero (LX0), Chat-Komponente heisst jetzt AGI-Station - Neuer Haupt-Agent Kato (Cato der Aeltere) als Default-Modell in Open WebUI - scripts/set-main-agent.sh: Haupt-Agent per Befehl wechselbar (MAIN_AGENT in .env) - ENABLE_PERSISTENT_CONFIG=False: Konfiguration deterministisch aus .env - Alle Pfade, Shortcuts, Logs, Theme und README umbenannt (lx0-*, ~/.linux-zero) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
64 lines
1.9 KiB
Bash
Executable file
64 lines
1.9 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# Legt Startmenü- und Desktop-Verknüpfungen für die AGI-Station (Kato) und die Werkstatt (n8n) an.
|
|
set -euo pipefail
|
|
|
|
log() { printf '\033[1;33m[LX0]\033[0m %s\n' "$*"; }
|
|
|
|
# shellcheck disable=SC1091
|
|
. ./.env
|
|
webui_port="${WEBUI_PORT:-3000}"
|
|
n8n_port="${N8N_PORT:-5678}"
|
|
|
|
apps_dir="$HOME/.local/share/applications"
|
|
icon_dir="$HOME/.local/share/icons/hicolor/scalable/apps"
|
|
mkdir -p "$apps_dir" "$icon_dir"
|
|
|
|
if [ -f theme/icon.svg ]; then
|
|
cp -f theme/icon.svg "$icon_dir/lx0.svg"
|
|
fi
|
|
|
|
# Chromium-Familie kann ein sauberes App-Fenster öffnen, sonst Standardbrowser
|
|
launcher_for() {
|
|
url="$1"
|
|
for b in brave-browser google-chrome chromium chromium-browser; do
|
|
if command -v "$b" >/dev/null 2>&1; then
|
|
printf '%s --app=%s' "$b" "$url"
|
|
return
|
|
fi
|
|
done
|
|
printf 'xdg-open %s' "$url"
|
|
}
|
|
|
|
make_entry() {
|
|
file="$1"; name="$2"; comment="$3"; url="$4"
|
|
cat > "$file" <<EOF
|
|
[Desktop Entry]
|
|
Type=Application
|
|
Name=$name
|
|
Comment=$comment
|
|
Exec=$(launcher_for "$url")
|
|
Icon=lx0
|
|
Terminal=false
|
|
Categories=Network;Utility;
|
|
EOF
|
|
chmod +x "$file"
|
|
}
|
|
|
|
make_entry "$apps_dir/lx0-agi-station.desktop" "AGI-Station" "Sprich mit Kato und deinen Beratern" "http://localhost:$webui_port"
|
|
make_entry "$apps_dir/lx0-werkstatt.desktop" "Linux Zero — Werkstatt" "KI-Workflows bauen (n8n)" "http://localhost:$n8n_port"
|
|
|
|
if command -v xdg-user-dir >/dev/null 2>&1; then
|
|
desktop_dir="$(xdg-user-dir DESKTOP)"
|
|
else
|
|
desktop_dir="$HOME/Desktop"
|
|
fi
|
|
|
|
if [ -d "$desktop_dir" ]; then
|
|
cp -f "$apps_dir/lx0-agi-station.desktop" "$apps_dir/lx0-werkstatt.desktop" "$desktop_dir/"
|
|
chmod +x "$desktop_dir/lx0-agi-station.desktop" "$desktop_dir/lx0-werkstatt.desktop"
|
|
# GNOME verlangt sonst einen Rechtsklick → "Starten erlauben"
|
|
gio set "$desktop_dir/lx0-agi-station.desktop" metadata::trusted true 2>/dev/null || true
|
|
gio set "$desktop_dir/lx0-werkstatt.desktop" metadata::trusted true 2>/dev/null || true
|
|
fi
|
|
|
|
log "Verknüpfungen angelegt (Startmenü + Schreibtisch)."
|