Repository navigation
Expand file tree
/
Copy pathinstall.sh
More file actions
41 lines (35 loc) · 1.46 KB
/
Copy pathinstall.sh
File metadata and controls
41 lines (35 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env bash
#
# install.sh — Install the Claude Account Switcher applet on Linux Mint / Cinnamon.
#
# Author: Jose Jimenez (https://github.com/JoseJimenez-M)
# License: MIT
set -euo pipefail
UUID="claude-switcher@josejimenez"
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
DEST="$HOME/.local/share/cinnamon/applets/$UUID"
echo "-> Installing Claude Account Switcher..."
# The manage window is a GTK app in Python. python3-gi ships with Mint, but
# make sure it's there.
if ! python3 -c "import gi; gi.require_version('Gtk','3.0')" >/dev/null 2>&1; then
echo " Installing python3-gi (needed for the manage window)..."
if command -v apt >/dev/null 2>&1; then
sudo apt install -y python3-gi gir1.2-gtk-3.0 || \
echo " Could not install automatically; run: sudo apt install python3-gi gir1.2-gtk-3.0"
fi
fi
mkdir -p "$DEST/bin" "$DEST/icons"
cp "$HERE/applet/$UUID/applet.js" "$DEST/applet.js"
cp "$HERE/applet/$UUID/metadata.json" "$DEST/metadata.json"
cp "$HERE/applet/$UUID/icons/"* "$DEST/icons/"
cp "$HERE/bin/"* "$DEST/bin/"
chmod +x "$DEST/bin/"* 2>/dev/null || true
echo ""
echo "OK. Installed to $DEST"
echo ""
echo "Next:"
echo " 1. Reload Cinnamon: Ctrl+Alt+Esc (or Alt+F2 -> r -> Enter)"
echo " 2. Right-click the panel -> 'Add applets to the panel'"
echo " 3. Find 'Claude Account Switcher' -> add it"
echo ""
echo "First run: click the icon -> Manage accounts -> Add, to create a profile."