Compare commits
3 commits
0ded74dd85
...
ecf731d17c
| Author | SHA1 | Date | |
|---|---|---|---|
| ecf731d17c | |||
| 58233e7b4f | |||
| f2acb373f3 |
3 changed files with 127 additions and 17 deletions
|
|
@ -115,6 +115,12 @@ die Setup-Skripte nicht heruntergeladen werden.
|
||||||
- gitcheck Alias funktioniert in interaktiver Shell (nicht via `zsh -l -c`, das ist normal)
|
- gitcheck Alias funktioniert in interaktiver Shell (nicht via `zsh -l -c`, das ist normal)
|
||||||
- Powerlevel10k Instant Prompt: `POWERLEVEL9K_INSTANT_PROMPT=quiet` muss VOR dem source stehen, nicht in .p10k.zsh (wird sonst ueberschrieben)
|
- Powerlevel10k Instant Prompt: `POWERLEVEL9K_INSTANT_PROMPT=quiet` muss VOR dem source stehen, nicht in .p10k.zsh (wird sonst ueberschrieben)
|
||||||
|
|
||||||
|
### Claude Code Multi-Profile
|
||||||
|
- Zwei Profile: `claude-priv` (mail@motocamp.de) und `claude-work` (rene@rm202.de)
|
||||||
|
- Config-Dirs: `~/.claude-priv` und `~/.claude-work`
|
||||||
|
- `claude-account priv|work` fuer Re-Login (logout, Browser, login)
|
||||||
|
- Setup: `setup-claude-profiles.sh` richtet Verzeichnisse und Shell-Aliases ein
|
||||||
|
|
||||||
### asciiquarium
|
### asciiquarium
|
||||||
- benoetigt Perl-Modul Term::Animation (nicht in apt verfuegbar)
|
- benoetigt Perl-Modul Term::Animation (nicht in apt verfuegbar)
|
||||||
- Abhaengigkeiten: libcurses-perl (apt) + Term::Animation (CPAN)
|
- Abhaengigkeiten: libcurses-perl (apt) + Term::Animation (CPAN)
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,15 @@ else
|
||||||
ok "MBP 13\": nur Intel-GPU, kein Blacklisting nötig"
|
ok "MBP 13\": nur Intel-GPU, kein Blacklisting nötig"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Broadcom BCM4360: Open-Source-Treiber blockieren (b43 kann BCM4360 nicht,
|
||||||
|
# belegt aber den Chip und verhindert das Laden des proprietaeren wl-Treibers)
|
||||||
|
cat > /etc/modprobe.d/blacklist-bcm.conf <<EOF
|
||||||
|
blacklist b43
|
||||||
|
blacklist bcma
|
||||||
|
blacklist ssb
|
||||||
|
EOF
|
||||||
|
ok "b43/bcma/ssb geblockt — wl-Treiber wird verwendet"
|
||||||
|
|
||||||
# Fn-Tasten + ISO-Layout-Fix (iso_layout=1 korrigiert ^/< auf Apple ISO-Keyboards)
|
# Fn-Tasten + ISO-Layout-Fix (iso_layout=1 korrigiert ^/< auf Apple ISO-Keyboards)
|
||||||
echo 'options hid_apple fnmode=2 iso_layout=1' > /etc/modprobe.d/hid_apple.conf
|
echo 'options hid_apple fnmode=2 iso_layout=1' > /etc/modprobe.d/hid_apple.conf
|
||||||
ok "hid_apple: fnmode=2, iso_layout=1"
|
ok "hid_apple: fnmode=2, iso_layout=1"
|
||||||
|
|
@ -259,14 +268,13 @@ fi
|
||||||
|
|
||||||
ok "Systemkonfigurationen gesetzt"
|
ok "Systemkonfigurationen gesetzt"
|
||||||
|
|
||||||
# ── 8. XFCE-Konfiguration (MBP 16": Compositor aus, Display-Skalierung) ─
|
# ── 8. XFCE-Konfiguration (beide MBPs haben Retina-Displays) ─────────────
|
||||||
if [[ "$MODEL" == "16" ]]; then
|
echo -e "\n=== 8/11 XFCE-Konfiguration (HiDPI) ==="
|
||||||
echo -e "\n=== 8/11 XFCE-Konfiguration (MBP 16\") ==="
|
XFCE_XML_DIR="/home/rene/.config/xfce4/xfconf/xfce-perchannel-xml"
|
||||||
XFCE_XML_DIR="/home/rene/.config/xfce4/xfconf/xfce-perchannel-xml"
|
mkdir -p "$XFCE_XML_DIR"
|
||||||
mkdir -p "$XFCE_XML_DIR"
|
|
||||||
|
|
||||||
# Compositor deaktivieren + HiDPI-Theme + Titelschrift
|
# Compositor deaktivieren + HiDPI-Theme + Titelschrift
|
||||||
cat > "$XFCE_XML_DIR/xfwm4.xml" <<XFEOF
|
cat > "$XFCE_XML_DIR/xfwm4.xml" <<XFEOF
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<channel name="xfwm4" version="1.0">
|
<channel name="xfwm4" version="1.0">
|
||||||
<property name="general" type="empty">
|
<property name="general" type="empty">
|
||||||
|
|
@ -277,8 +285,8 @@ if [[ "$MODEL" == "16" ]]; then
|
||||||
</channel>
|
</channel>
|
||||||
XFEOF
|
XFEOF
|
||||||
|
|
||||||
# Display-Skalierung für Retina (2x)
|
# Display-Skalierung für Retina (2x)
|
||||||
cat > "$XFCE_XML_DIR/xsettings.xml" <<XSEOF
|
cat > "$XFCE_XML_DIR/xsettings.xml" <<XSEOF
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<channel name="xsettings" version="1.0">
|
<channel name="xsettings" version="1.0">
|
||||||
<property name="Gdk" type="empty">
|
<property name="Gdk" type="empty">
|
||||||
|
|
@ -293,15 +301,12 @@ XFEOF
|
||||||
</channel>
|
</channel>
|
||||||
XSEOF
|
XSEOF
|
||||||
|
|
||||||
# xfce4-display-settings deaktivieren (Endlosschleife)
|
# xfce4-display-settings deaktivieren (Endlosschleife)
|
||||||
dpkg-divert --local --rename --divert /usr/bin/xfce4-display-settings.real /usr/bin/xfce4-display-settings 2>/dev/null || true
|
dpkg-divert --local --rename --divert /usr/bin/xfce4-display-settings.real /usr/bin/xfce4-display-settings 2>/dev/null || true
|
||||||
ln -sf /usr/bin/true /usr/bin/xfce4-display-settings
|
ln -sf /usr/bin/true /usr/bin/xfce4-display-settings
|
||||||
|
|
||||||
chown -R 1000:1000 /home/rene/.config/xfce4
|
chown -R 1000:1000 /home/rene/.config/xfce4
|
||||||
ok "XFCE: Compositor aus, Retina-Skalierung, Display-Settings deaktiviert"
|
ok "XFCE: Compositor aus, Retina-Skalierung, Display-Settings deaktiviert"
|
||||||
else
|
|
||||||
echo -e "\n=== 8/11 XFCE-Konfiguration — Standard (MBP 13\") ==="
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ── 9. Netzwerk: NetworkManager statt netplan ─────────────────────────────
|
# ── 9. Netzwerk: NetworkManager statt netplan ─────────────────────────────
|
||||||
echo -e "\n=== 9/11 Netzwerk ==="
|
echo -e "\n=== 9/11 Netzwerk ==="
|
||||||
|
|
|
||||||
99
setup-claude-profiles.sh
Executable file
99
setup-claude-profiles.sh
Executable file
|
|
@ -0,0 +1,99 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# setup-claude-profiles.sh
|
||||||
|
# Richtet zwei getrennte Claude-Code-Profile ein (priv/work)
|
||||||
|
# Verwendung: bash setup-claude-profiles.sh
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# ── Farben ──────────────────────────────────────────────────────────────
|
||||||
|
RED='\033[0;31m'; GREEN='\033[0;32m'; YELLOW='\033[1;33m'; NC='\033[0m'
|
||||||
|
ok() { echo -e "${GREEN}[OK] $*${NC}"; }
|
||||||
|
warn() { echo -e "${YELLOW}[!!] $*${NC}"; }
|
||||||
|
fail() { echo -e "${RED}[FAIL] $*${NC}"; }
|
||||||
|
|
||||||
|
MARKER="claude-profiles-start"
|
||||||
|
ZSHRC="$HOME/.zshrc"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "============================================"
|
||||||
|
echo " Claude-Code Multi-Profile Setup"
|
||||||
|
echo "============================================"
|
||||||
|
|
||||||
|
# ── Claude Code installiert? ────────────────────────────────────────────
|
||||||
|
if ! command -v claude &>/dev/null; then
|
||||||
|
warn "claude nicht gefunden - bitte zuerst installieren (npm install -g @anthropic-ai/claude-code)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ── Bestehende ~/.claude migrieren ──────────────────────────────────────
|
||||||
|
echo -e "\n=== Migration ==="
|
||||||
|
if [[ -d "$HOME/.claude" && ! -d "$HOME/.claude-priv" ]]; then
|
||||||
|
mv "$HOME/.claude" "$HOME/.claude-priv"
|
||||||
|
ok "~/.claude nach ~/.claude-priv verschoben"
|
||||||
|
elif [[ -d "$HOME/.claude" && -d "$HOME/.claude-priv" ]]; then
|
||||||
|
warn "~/.claude und ~/.claude-priv existieren beide - manuelle Migration noetig"
|
||||||
|
else
|
||||||
|
ok "Nichts zu migrieren"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ── Config-Verzeichnisse anlegen ────────────────────────────────────────
|
||||||
|
echo -e "\n=== Verzeichnisse ==="
|
||||||
|
mkdir -p "$HOME/.claude-priv" "$HOME/.claude-work"
|
||||||
|
ok "~/.claude-priv angelegt (mail@motocamp.de)"
|
||||||
|
ok "~/.claude-work angelegt (rene@rm202.de)"
|
||||||
|
|
||||||
|
# ── Aliases in .zshrc ──────────────────────────────────────────────────
|
||||||
|
echo -e "\n=== Shell-Aliases ==="
|
||||||
|
if [[ ! -f "$ZSHRC" ]]; then
|
||||||
|
fail "$ZSHRC existiert nicht"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if grep -qF "$MARKER" "$ZSHRC"; then
|
||||||
|
warn "$ZSHRC - Aliases bereits vorhanden"
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo ""
|
||||||
|
echo "# claude-profiles-start"
|
||||||
|
echo "alias claude-priv='CLAUDE_CONFIG_DIR=~/.claude-priv command claude' # mail@motocamp.de"
|
||||||
|
echo "alias claude-work='CLAUDE_CONFIG_DIR=~/.claude-work command claude' # rene@rm202.de"
|
||||||
|
echo 'alias claude='"'"'echo "Bitte claude-priv oder claude-work verwenden."'"'"''
|
||||||
|
cat << 'FUNC'
|
||||||
|
claude-account() {
|
||||||
|
local profile="$1"
|
||||||
|
if [[ "$profile" != "priv" && "$profile" != "work" ]]; then
|
||||||
|
echo "Verwendung: claude-account priv|work"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
local config_dir="$HOME/.claude-${profile}"
|
||||||
|
echo "==> Claude Code abmelden (${profile})..."
|
||||||
|
CLAUDE_CONFIG_DIR="$config_dir" command claude /logout
|
||||||
|
echo ""
|
||||||
|
echo "==> Browser oeffnen - bitte ab- und neu anmelden..."
|
||||||
|
open "https://console.anthropic.com"
|
||||||
|
read -r "?Wenn im Browser fertig, Enter druecken..."
|
||||||
|
echo ""
|
||||||
|
echo "==> Claude Code anmelden (${profile})..."
|
||||||
|
CLAUDE_CONFIG_DIR="$config_dir" command claude /login
|
||||||
|
}
|
||||||
|
FUNC
|
||||||
|
echo "# claude-profiles-end"
|
||||||
|
} >> "$ZSHRC"
|
||||||
|
ok "$ZSHRC - Aliases eingefuegt"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ── Zusammenfassung ─────────────────────────────────────────────────────
|
||||||
|
echo ""
|
||||||
|
echo "============================================"
|
||||||
|
echo " Fertig! Profil-Zuordnung:"
|
||||||
|
echo " claude-priv -> mail@motocamp.de"
|
||||||
|
echo " claude-work -> rene@rm202.de"
|
||||||
|
echo "============================================"
|
||||||
|
echo ""
|
||||||
|
echo "Naechste Schritte:"
|
||||||
|
echo " 1. source ~/.zshrc"
|
||||||
|
echo " 2. claude-priv (mit mail@motocamp.de einloggen)"
|
||||||
|
echo " 3. claude-work (mit rene@rm202.de einloggen)"
|
||||||
|
echo ""
|
||||||
|
echo "Account wechseln: claude-account priv oder claude-account work"
|
||||||
|
echo ""
|
||||||
Loading…
Add table
Add a link
Reference in a new issue