# @zesbe/tmux-config

[![npm version](https://badge.fury.io/js/%40zesbe%2Ftmux-config.svg)](https://badge.fury.io/js/%40zesbe%2Ftmux-config)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

🚀 **Tmux configuration with mouse scrolling and touch screen support optimized for Termux and VPS**

## ✨ Features

- 🖱️ **Mouse Scrolling** - Smooth scrolling with mouse wheel
- 📱 **Touch Screen Support** - Optimized for Android/Touch devices
- 🔄 **SSH/VPS Ready** - Perfect for remote servers
- ✂️ **Easy Copy/Paste** - Click and drag to select
- 🎨 **Clean Status Bar** - Informative and minimal
- ⚡ **Performance** - Fast and responsive

## 🚀 Quick Install

```bash
# Install globally
npm install -g @zesbe/tmux-config

# Run setup
tmux-setup
```

## 📖 Usage

### Interactive Setup

```bash
tmux-setup
```

This will show you options to:
1. Install local/Termux configuration
2. Install VPS configuration
3. Install both
4. Deploy to VPS

### Manual Installation

```bash
# For local/Termux
cp node_modules/@zesbe/tmux-config/config/tmux.conf ~/.tmux.conf

# For VPS
cp node_modules/@zesbe/tmux-config/config/tmux-vps.conf ~/.tmux.conf
```

### Deploy to VPS

```bash
# Interactive deployment
tmux-setup --deploy

# Or manually
scp node_modules/@zesbe/tmux-config/config/tmux-vps.conf user@vps:~/.tmux.conf
```

## 🎯 Configuration Types

### 1. Local/Termux (`tmux.conf`)
- Optimized for local terminal usage
- Enhanced mouse support
- Copy/paste with clipboard
- Better scrolling performance

### 2. VPS/SSH (`tmux-vps.conf`)
- Touch screen friendly
- SSH connection stability
- Lightweight configuration
- Terminal overrides for remote sessions

## ⌨️ Keyboard Shortcuts

```bash
Prefix (default): Ctrl + A
```

### Window Management
- `Prefix + c` - New window
- `Prefix + |` - Split horizontal
- `Prefix + -` - Split vertical
- `Prefix + 1-9` - Switch to window

### Pane Navigation
- `Prefix + h/j/k/l` - Move between panes
- `Alt + Arrow` - Quick pane switch
- Click - Select pane with mouse

### Copy Mode
- `Prefix + [` - Enter copy mode
- `v` - Start selection
- `y` - Copy selection
- `Prefix + ]` - Paste

### Session Management
- `Prefix + d` - Detach from session
- `tmux ls` - List sessions
- `tmux attach` - Reattach to session
- `tm` - Quick start (alias added)

## 🖱️ Mouse/Touch Controls

- **Scroll** - Mouse wheel or swipe
- **Click** - Position cursor
- **Drag** - Select text
- **Right Click** - Context menu
- **Double Click** - Select word
- **Triple Click** - Select line

## 📱 On Android/Termux

```bash
# Install dependencies
pkg install tmux

# Install config
npm install -g @zesbe/tmux-config
tmux-setup

# Start tmux
tmux
```

## 🖥️ On Linux/macOS

```bash
# Ubuntu/Debian
sudo apt install tmux

# macOS
brew install tmux

# Install config
npm install -g @zesbe/tmux-config
tmux-setup
```

## 🔧 Customization

Add to your `~/.tmux.conf.local`:

```bash
# Custom status bar
set -g status-bg colour236
set -g status-fg white

# Custom bindings
bind-key -n C-t new-window
```

## 🐛 Troubleshooting

### Mouse not working?
1. Make sure `set -g mouse on` is in your config
2. Check your terminal supports mouse
3. Try reloading: `tmux source-file ~/.tmux.conf`

### Scrolling issues?
1. For SSH: Use `tmux-vps.conf`
2. Check terminal type: `echo $TERM`
3. Set: `export TERM=xterm-256color`

### Copy/paste not working?
1. Enter copy mode: `Prefix + [`
2. Select with mouse or `v`
3. Copy with `y`
4. Paste with `Prefix + ]`

## 🤝 Contributing

1. Fork this repo
2. Create feature branch
3. Make changes
4. Test thoroughly
5. Submit PR

## 📄 License

MIT © [Zesbe](https://github.com/zesbe)

## 🔗 Links

- [GitHub Repository](https://github.com/zesbe/tmux-config)
- [NPM Package](https://www.npmjs.com/package/@zesbe/tmux-config)
- [Report Issues](https://github.com/zesbe/tmux-config/issues)

---

Made with ❤️ for terminal lovers everywhere!