-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtmux-setup.sh
More file actions
executable file
·78 lines (70 loc) · 2.26 KB
/
tmux-setup.sh
File metadata and controls
executable file
·78 lines (70 loc) · 2.26 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
# =============================================================================
# MateBot Tmux Setup - Unified Configuration Script
# Simplified setup for open source project
# =============================================================================
set -e
# Color codes
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
BLUE='\033[0;34m'
NC='\033[0m'
print_success() { echo -e "${GREEN}[✓]${NC} $1"; }
print_warning() { echo -e "${YELLOW}[!]${NC} $1"; }
print_error() { echo -e "${RED}[✗]${NC} $1"; }
print_info() { echo -e "${BLUE}[→]${NC} $1"; }
echo ""
echo "=========================================="
echo " MateBot Tmux Setup"
echo "=========================================="
echo ""
# Check if tmux is installed
if ! command -v tmux &> /dev/null; then
print_error "tmux not found. Please install tmux first."
echo ""
echo "Installation:"
echo " Ubuntu/Debian: sudo apt-get install tmux"
echo " macOS: brew install tmux"
echo " RHEL/CentOS: sudo yum install tmux"
exit 1
fi
# Install oh-my-tmux if not present
if [ ! -d "$HOME/.tmux" ]; then
print_info "Installing oh-my-tmux..."
git clone --depth 1 https://github.com/gpakosz/.tmux.git ~/.tmux
ln -sf ~/.tmux/.tmux.conf ~/.tmux.conf
print_success "oh-my-tmux installed"
else
print_info "Updating oh-my-tmux..."
#cd ~/.tmux && git pull origin master
fi
# Copy MateBot configuration
PROJECT_DIR=${PWD}
if [ -f "$PROJECT_DIR/.tmux.conf.local" ]; then
print_info "Installing MateBot configuration..."
cp "$PROJECT_DIR/.tmux.conf.local" ~/.tmux/.tmux.conf
print_success "Configuration installed"
print_info "Copied from: $PROJECT_DIR/.tmux.conf.local"
print_info "Copied to: $HOME/.tmux.conf"
else
print_error "MateBot config not found at $PROJECT_DIR/.tmux.conf.local"
exit 1
fi
echo ""
echo "=========================================="
echo " Setup Complete"
echo "=========================================="
echo ""
echo "Quick start:"
echo " tmux new -s mysession"
echo ""
echo "Key features:"
echo " ✓ Mouse support enabled"
echo " ✓ 50000 line history limit"
echo " ✓ Vi mode for copy/paste"
echo " ✓ Quick window switch: Alt+1-5"
echo " ✓ Status bar at top"
echo ""
echo "For help: Ctrl+b ?"
echo ""