feat: AI-CLI workflow optimizations

- 200K scrollback, vi-mode copy, copy-on-select
- Ctrl-A S captures pane to ~/logs/, Ctrl-A L toggles live logging
- Status bar shows git branch + working directory
- Pre-built session: code/git/run/logs windows
- Aggressive resize + focus events for multi-device switching
- Toolbar: added Paste (clipboard), Zoom (pane fullscreen), Save (capture)
- All new windows inherit current working directory
- Toolbar split into 2 rows for more buttons without clutter
This commit is contained in:
Mortdecai
2026-03-26 19:13:02 -04:00
parent 2cca6f3900
commit 8d075f2b48
4 changed files with 119 additions and 36 deletions
+57 -27
View File
@@ -1,57 +1,87 @@
# Sethian tmux config
# sethmux — Sethian tmux config for AI CLI workflows
# Dvorak-optimized, mobile-friendly, built for long-running AI sessions
# Remap prefix to Ctrl-a (easier on mobile)
# --- Prefix ---
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Easy tab management
bind -n M-t new-window
# --- Tab/Window management ---
bind -n M-t new-window -c "#{pane_current_path}"
bind -n M-w kill-window
bind -n M-1 select-window -t 0
bind -n M-2 select-window -t 1
bind -n M-3 select-window -t 2
bind -n M-4 select-window -t 3
bind -n M-5 select-window -t 4
bind -n M-1 select-window -t 1
bind -n M-2 select-window -t 2
bind -n M-3 select-window -t 3
bind -n M-4 select-window -t 4
bind -n M-5 select-window -t 5
bind -n M-Left previous-window
bind -n M-Right next-window
bind c new-window -c "#{pane_current_path}"
# Mouse support (critical for mobile/touch)
# --- Dvorak-friendly splits ---
bind s split-window -v -c "#{pane_current_path}"
bind v split-window -h -c "#{pane_current_path}"
# --- Pane navigation ---
bind o select-pane -t :.+
bind z resize-pane -Z
# --- Mouse ---
set -g mouse on
# Scrollback
set -g history-limit 50000
# --- Scrollback (huge for AI output) ---
set -g history-limit 200000
# Start numbering at 1
# --- Copy mode (vi-style) ---
setw -g mode-keys vi
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-selection-and-cancel
bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel
# --- Capture & logging ---
# Ctrl-A S = save entire scrollback to file
bind S capture-pane -pS - \; save-buffer ~/logs/capture-#{session_name}-#{window_index}-#{pane_index}-#(date +%s).txt \; display "Pane captured to ~/logs/"
# Ctrl-A L = toggle pipe-pane logging
bind L pipe-pane -o "cat >> ~/logs/live-#{session_name}-#{window_index}-#(date +%s).log" \; display "Logging toggled"
# --- Clipboard ---
set -g set-clipboard on
# Copy on select (mouse)
bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "cat"
# --- Numbering ---
set -g base-index 1
setw -g pane-base-index 1
# Renumber windows on close
set -g renumber-windows on
# Status bar - Sethian dark + orange
# --- Adaptive resize ---
setw -g aggressive-resize on
set -g focus-events on
# --- Status bar: git branch + cwd ---
set -g status-style "bg=#1a1a1a,fg=#e0e0e0"
set -g status-left "#[bg=#D35400,fg=#0a0a0a,bold] #S #[bg=#1a1a1a] "
set -g status-right "#[fg=#D35400]%H:%M #[fg=#666666]| #[fg=#e0e0e0]%b %d"
set -g status-right "#[fg=#666666]#{pane_current_path} #[fg=#D35400]#{?#{==:#{pane_current_command},bash},#(cd #{pane_current_path} && git branch --show-current 2>/dev/null),} #[fg=#666666]| #[fg=#e0e0e0]%H:%M"
set -g status-right-length 80
set -g status-left-length 20
set -g status-right-length 30
set -g status-interval 5
# Window status
# --- Window status ---
setw -g window-status-format " #[fg=#888888]#I:#W "
setw -g window-status-current-format "#[bg=#D35400,fg=#0a0a0a,bold] #I:#W "
setw -g window-status-separator ""
# Pane borders
# --- Pane borders ---
set -g pane-border-style "fg=#333333"
set -g pane-active-border-style "fg=#D35400"
set -g pane-border-format " #{pane_current_command} "
set -g pane-border-status off
# Terminal settings
# --- Terminal ---
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
# Dvorak-friendly splits (s=horizontal, v=vertical)
bind s split-window -v
bind v split-window -h
# Reduce escape delay
set -sg escape-time 10
# --- Session startup layout ---
# Windows created by sethmux-start.sh: code, git, run, logs