mirror of
https://github.com/boxpositron/absolute-dotfiles.git
synced 2026-02-28 03:30:37 +00:00
feat(tmux): add lightweight server config with Ctrl+/ prefix and bottom status bar
- Create .tmux-server.conf for remote servers (plugin-free, minimal) - Prefix key set to Ctrl+/ (C-_) instead of Ctrl+b - Status bar positioned at bottom with simple catppuccin-inspired theme - Include all essential keybindings without TPM dependencies - Add README section with one-liner download/setup instructions
This commit is contained in:
9
.config/opencode/plugin/package.json
Normal file
9
.config/opencode/plugin/package.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"name": "opencode-plugins",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "OpenCode plugins for dotfiles",
|
||||||
|
"dependencies": {
|
||||||
|
"@opencode-ai/plugin": "^1.0.51",
|
||||||
|
"with-context-mcp": "^3.0.4"
|
||||||
|
}
|
||||||
|
}
|
||||||
1147
.config/opencode/plugin/with-context.ts
Normal file
1147
.config/opencode/plugin/with-context.ts
Normal file
File diff suppressed because it is too large
Load Diff
120
.tmux-server.conf
Normal file
120
.tmux-server.conf
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
# tmux Server Configuration
|
||||||
|
# Minimal, plugin-free config optimized for remote servers
|
||||||
|
# Prefix: Ctrl+/ (sends C-_)
|
||||||
|
# Status bar: Bottom
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
# Core Settings
|
||||||
|
# =============================================================================
|
||||||
|
|
||||||
|
set -g mouse on
|
||||||
|
set-option -a terminal-features 'XXX:RGB'
|
||||||
|
set-option -sg escape-time 10
|
||||||
|
set-option -g focus-events on
|
||||||
|
set-window-option -g mode-keys vi
|
||||||
|
set-option -g renumber-windows on
|
||||||
|
set -g visual-activity off
|
||||||
|
|
||||||
|
set -ga update-environment TERM
|
||||||
|
set -ga update-environment TERM_PROGRAM
|
||||||
|
|
||||||
|
# Set base index to 1
|
||||||
|
set -g base-index 1
|
||||||
|
setw -g pane-base-index 1
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
# Prefix Key: Ctrl+/ (which sends C-_)
|
||||||
|
# =============================================================================
|
||||||
|
|
||||||
|
set -g prefix C-_
|
||||||
|
unbind C-b
|
||||||
|
bind C-_ send-prefix
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
# Status Bar - Bottom Position
|
||||||
|
# =============================================================================
|
||||||
|
|
||||||
|
set -g status-position bottom
|
||||||
|
set -g status-interval 5
|
||||||
|
set -g status-justify left
|
||||||
|
|
||||||
|
# Simple, readable status bar colors
|
||||||
|
set -g status-style 'bg=#1e1e2e fg=#cdd6f4'
|
||||||
|
set -g status-left-length 30
|
||||||
|
set -g status-right-length 50
|
||||||
|
|
||||||
|
set -g status-left '#[fg=#1e1e2e,bg=#89b4fa,bold] #S #[fg=#89b4fa,bg=#1e1e2e]'
|
||||||
|
set -g status-right '#[fg=#6c7086]#H #[fg=#89b4fa]%H:%M '
|
||||||
|
|
||||||
|
# Window status
|
||||||
|
set -g window-status-format '#[fg=#6c7086] #I:#W '
|
||||||
|
set -g window-status-current-format '#[fg=#1e1e2e,bg=#a6e3a1,bold] #I:#W#{?window_zoomed_flag,(),} '
|
||||||
|
set -g window-status-separator ''
|
||||||
|
|
||||||
|
# Pane borders
|
||||||
|
set -g pane-border-style 'fg=#313244'
|
||||||
|
set -g pane-active-border-style 'fg=#89b4fa'
|
||||||
|
|
||||||
|
# Message style
|
||||||
|
set -g message-style 'bg=#89b4fa fg=#1e1e2e bold'
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
# Key Bindings
|
||||||
|
# =============================================================================
|
||||||
|
|
||||||
|
# Reload config
|
||||||
|
unbind r
|
||||||
|
bind r source-file ~/.tmux.conf \; display "Reloaded!"
|
||||||
|
|
||||||
|
# Search with / and ?
|
||||||
|
bind-key / copy-mode \; send-key ?
|
||||||
|
|
||||||
|
# Vi copy mode bindings
|
||||||
|
bind-key -T copy-mode-vi "v" send-keys -X begin-selection
|
||||||
|
bind-key -T copy-mode-vi "y" send-keys -X copy-selection
|
||||||
|
unbind -T copy-mode-vi MouseDragEnd1Pane
|
||||||
|
|
||||||
|
# Split panes with | and -
|
||||||
|
unbind %
|
||||||
|
bind | split-window -h -c '#{pane_current_path}'
|
||||||
|
unbind '"'
|
||||||
|
bind - split-window -v -c '#{pane_current_path}'
|
||||||
|
|
||||||
|
# Kill pane with Shift + Option + X
|
||||||
|
bind -n M-X kill-pane
|
||||||
|
|
||||||
|
# Attach session to current path
|
||||||
|
unbind 'C'
|
||||||
|
bind C attach-session -c "#{pane_current_path}"
|
||||||
|
|
||||||
|
# Window movement with Left/Right arrows
|
||||||
|
bind Left swap-window -t -1\; select-window -t -1
|
||||||
|
bind Right swap-window -t +1\; select-window -t +1
|
||||||
|
|
||||||
|
# Pane resize with hjkl
|
||||||
|
bind -r j resize-pane -D 5
|
||||||
|
bind -r k resize-pane -U 5
|
||||||
|
bind -r l resize-pane -R 5
|
||||||
|
bind -r h resize-pane -L 5
|
||||||
|
|
||||||
|
# Pane minimize/maximize with m
|
||||||
|
bind -r m resize-pane -Z
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
# Pane Navigation (vim-style without plugin)
|
||||||
|
# =============================================================================
|
||||||
|
|
||||||
|
# Smart pane switching with awareness of Vim splits
|
||||||
|
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
||||||
|
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?|fzf)(diff)?$'"
|
||||||
|
|
||||||
|
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
|
||||||
|
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
|
||||||
|
bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
|
||||||
|
bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
|
||||||
|
|
||||||
|
bind-key -T copy-mode-vi 'C-h' select-pane -L
|
||||||
|
bind-key -T copy-mode-vi 'C-j' select-pane -D
|
||||||
|
bind-key -T copy-mode-vi 'C-k' select-pane -U
|
||||||
|
bind-key -T copy-mode-vi 'C-l' select-pane -R
|
||||||
|
bind-key -T copy-mode-vi 'C-\' select-pane -l
|
||||||
44
README.md
44
README.md
@@ -125,6 +125,7 @@ Key features:
|
|||||||
### Development Tools
|
### Development Tools
|
||||||
|
|
||||||
- **tmux** (`.tmux.conf`): Terminal multiplexer with custom key bindings
|
- **tmux** (`.tmux.conf`): Terminal multiplexer with custom key bindings
|
||||||
|
- **tmux server** (`.tmux-server.conf`): Lightweight tmux config for remote servers
|
||||||
- **Git**: Global gitignore patterns (`.rgignore`, `.gitignore`)
|
- **Git**: Global gitignore patterns (`.rgignore`, `.gitignore`)
|
||||||
- **Starship** (`starship.toml`): Cross-shell prompt with Git integration
|
- **Starship** (`starship.toml`): Cross-shell prompt with Git integration
|
||||||
- **Oh My Posh** (`.config/ohmyposh/`): Alternative prompt theme (zen.toml)
|
- **Oh My Posh** (`.config/ohmyposh/`): Alternative prompt theme (zen.toml)
|
||||||
@@ -233,6 +234,49 @@ Key documentation files:
|
|||||||
- `.withcontextignore`: Patterns for documentation delegation
|
- `.withcontextignore`: Patterns for documentation delegation
|
||||||
- Component READMEs: Tool-specific documentation in respective directories
|
- Component READMEs: Tool-specific documentation in respective directories
|
||||||
|
|
||||||
|
## Server Configuration
|
||||||
|
|
||||||
|
A lightweight tmux configuration (`.tmux-server.conf`) is available for remote servers. It's plugin-free and optimized for server environments.
|
||||||
|
|
||||||
|
### Key Differences from Desktop Config
|
||||||
|
|
||||||
|
| Feature | Desktop | Server |
|
||||||
|
|---------|---------|--------|
|
||||||
|
| Status bar | Top | Bottom |
|
||||||
|
| Prefix key | `Ctrl+b` | `Ctrl+/` |
|
||||||
|
| Plugins | Full (TPM, catppuccin, etc.) | None |
|
||||||
|
| Theme | Catppuccin | Simple minimal |
|
||||||
|
|
||||||
|
### Quick Setup on Remote Server
|
||||||
|
|
||||||
|
**One-liner download and setup:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Using curl
|
||||||
|
curl -fsSL https://raw.githubusercontent.com/boxpositron/dotfiles/main/.tmux-server.conf -o ~/.tmux.conf
|
||||||
|
|
||||||
|
# Or using wget
|
||||||
|
wget -qO ~/.tmux.conf https://raw.githubusercontent.com/boxpositron/dotfiles/main/.tmux-server.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
**If tmux is already running**, reload the config:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
tmux source-file ~/.tmux.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
### Server Config Key Bindings
|
||||||
|
|
||||||
|
| Binding | Action |
|
||||||
|
|---------|--------|
|
||||||
|
| `Ctrl+/` | Prefix key |
|
||||||
|
| `Prefix + \|` | Vertical split |
|
||||||
|
| `Prefix + -` | Horizontal split |
|
||||||
|
| `Prefix + hjkl` | Resize panes |
|
||||||
|
| `Ctrl + hjkl` | Navigate panes (vim-aware) |
|
||||||
|
| `Prefix + m` | Toggle pane zoom |
|
||||||
|
| `Prefix + r` | Reload config |
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
### Common Issues
|
### Common Issues
|
||||||
|
|||||||
Reference in New Issue
Block a user