-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-ghostty.sh
More file actions
executable file
·52 lines (44 loc) · 1.61 KB
/
setup-ghostty.sh
File metadata and controls
executable file
·52 lines (44 loc) · 1.61 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
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env bash
#
# Ghostty Configuration Setup Script
# Links ghostty config from dots repo to ~/.config/ghostty
set -e
DOTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
GHOSTTY_CONFIG_DIR="$HOME/.config/ghostty"
GHOSTTY_DOTS_DIR="$DOTS_DIR/.config/ghostty"
echo "🚀 Setting up Ghostty configuration..."
# Check if ghostty config exists
if [ -e "$GHOSTTY_CONFIG_DIR" ] && [ ! -L "$GHOSTTY_CONFIG_DIR" ]; then
echo "⚠️ Warning: $GHOSTTY_CONFIG_DIR already exists and is not a symlink."
echo " Backing up to $GHOSTTY_CONFIG_DIR.backup"
mv "$GHOSTTY_CONFIG_DIR" "$GHOSTTY_CONFIG_DIR.backup"
fi
# Remove existing symlink if present
if [ -L "$GHOSTTY_CONFIG_DIR" ]; then
echo "📝 Removing existing symlink..."
rm "$GHOSTTY_CONFIG_DIR"
fi
# Create .config directory if it doesn't exist
mkdir -p "$HOME/.config"
# Create symlink
echo "🔗 Creating symlink: $GHOSTTY_CONFIG_DIR -> $GHOSTTY_DOTS_DIR"
ln -s "$GHOSTTY_DOTS_DIR" "$GHOSTTY_CONFIG_DIR"
echo "✅ Ghostty configuration linked successfully!"
echo ""
echo "📚 Available themes:"
echo " - tokyo-night (default)"
echo " - catppuccin-mocha"
echo " - nord"
echo " - gruvbox-dark"
echo ""
echo "💡 To switch themes, edit ~/.config/ghostty/config and change the 'theme' line"
echo ""
echo "🔤 Font setup:"
echo " The config uses JetBrainsMono Nerd Font Mono."
echo " Install a JetBrains Mono Nerd Font package for your platform if needed."
echo ""
echo "🧰 For full machine setup, use:"
echo " bin/bootstrap plan"
echo " bin/bootstrap apply"
echo ""
echo "🔄 Reload ghostty config with: Cmd+Comma or restart Ghostty"