From 48784c97fe768d075656f6f76142effb8adb7cbd Mon Sep 17 00:00:00 2001 From: "Aaron D. Lee" Date: Fri, 9 Jan 2026 20:32:01 -0500 Subject: [PATCH] Remove tmux-workspaces in favor of tmuxinator-only workflow - Delete tmux-workspaces.zsh and .tmux-templates directory - Remove TW_* config settings from dotfiles.conf - Clean up tmuxinator.zsh (remove import/integration code) - Update README, INSTALL, and REFERENCE docs - Fix editor config: .zshrc now uses DEFAULT_EDITOR from dotfiles.conf Co-Authored-By: Claude Opus 4.5 --- .tmux-templates/debug.tmux | 6 - .tmux-templates/dev.tmux | 19 - .tmux-templates/full.tmux | 2 - .tmux-templates/ops.tmux | 16 - .tmux-templates/review.tmux | 6 - .tmux-templates/ssh-multi.tmux | 13 - .tmux-templates/system_monitoring.tmux | 7 - INSTALL.md | 14 - README.md | 35 +- docs/REFERENCE.md | 8 - dotfiles.conf | 11 - dotfiles.conf.template | 13 +- zsh/.zshrc | 2 + zsh/functions/tmux-workspaces.zsh | 471 ------------------------- zsh/functions/tmuxinator.zsh | 109 +----- 15 files changed, 12 insertions(+), 720 deletions(-) delete mode 100644 .tmux-templates/debug.tmux delete mode 100644 .tmux-templates/dev.tmux delete mode 100644 .tmux-templates/full.tmux delete mode 100644 .tmux-templates/ops.tmux delete mode 100644 .tmux-templates/review.tmux delete mode 100644 .tmux-templates/ssh-multi.tmux delete mode 100644 .tmux-templates/system_monitoring.tmux delete mode 100644 zsh/functions/tmux-workspaces.zsh diff --git a/.tmux-templates/debug.tmux b/.tmux-templates/debug.tmux deleted file mode 100644 index 5fec2f0..0000000 --- a/.tmux-templates/debug.tmux +++ /dev/null @@ -1,6 +0,0 @@ -# Debug workspace -# Main pane (70%) + helper pane (30%) - -split-window -h -p 30 - -select-pane -t 0 diff --git a/.tmux-templates/dev.tmux b/.tmux-templates/dev.tmux deleted file mode 100644 index 3ba10d2..0000000 --- a/.tmux-templates/dev.tmux +++ /dev/null @@ -1,19 +0,0 @@ -# Development workspace -# Usage: tw-create myproject dev - -# Split vertically (vim on left 50%, rest on right) -split-window -h -p 50 - -# Split right pane horizontally (terminal top, logs bottom) -split-window -v -p 50 - -# Select the first pane (vim) -select-pane -t 0 - -# Optional: Start vim in first pane -# send-keys -t 0 'vim' C-m - -# Optional: Set pane titles -# select-pane -t 0 -T "Editor" -# select-pane -t 1 -T "Terminal" -# select-pane -t 2 -T "Logs" diff --git a/.tmux-templates/full.tmux b/.tmux-templates/full.tmux deleted file mode 100644 index 35c313c..0000000 --- a/.tmux-templates/full.tmux +++ /dev/null @@ -1,2 +0,0 @@ -# Full workspace -# Single full-screen pane (default tmux behavior) diff --git a/.tmux-templates/ops.tmux b/.tmux-templates/ops.tmux deleted file mode 100644 index 04402b9..0000000 --- a/.tmux-templates/ops.tmux +++ /dev/null @@ -1,16 +0,0 @@ -# Operations workspace -# 4-pane layout for system monitoring - -# Create 2x2 grid -split-window -h -p 50 -split-window -v -p 50 -select-pane -t 0 -split-window -v -p 50 - -# Optional: Auto-start monitoring tools -# send-keys -t 0 'htop' C-m -# send-keys -t 1 'docker ps' C-m -# send-keys -t 2 '' C-m -# send-keys -t 3 'tail -f /var/log/syslog' C-m - -select-pane -t 0 diff --git a/.tmux-templates/review.tmux b/.tmux-templates/review.tmux deleted file mode 100644 index cbd1529..0000000 --- a/.tmux-templates/review.tmux +++ /dev/null @@ -1,6 +0,0 @@ -# Code Review workspace -# Two equal panes side-by-side for comparison - -split-window -h -p 50 - -select-pane -t 0 diff --git a/.tmux-templates/ssh-multi.tmux b/.tmux-templates/ssh-multi.tmux deleted file mode 100644 index bda45bb..0000000 --- a/.tmux-templates/ssh-multi.tmux +++ /dev/null @@ -1,13 +0,0 @@ -# Multi-server SSH workspace -# 4 panes for managing multiple servers - -# Create 2x2 grid -split-window -h -p 50 -split-window -v -p 50 -select-pane -t 0 -split-window -v -p 50 - -# Enable pane synchronization (optional - uncomment to enable) -# set-window-option synchronize-panes on - -select-pane -t 0 diff --git a/.tmux-templates/system_monitoring.tmux b/.tmux-templates/system_monitoring.tmux deleted file mode 100644 index d8ef0d6..0000000 --- a/.tmux-templates/system_monitoring.tmux +++ /dev/null @@ -1,7 +0,0 @@ -# Custom template: system_monitoring -# Saved: Wed Dec 24 11:55:37 PM EST 2025 -# Panes: 3 -split-window -h -p 50 -split-window -v -p 50 - -select-pane -t 0 diff --git a/INSTALL.md b/INSTALL.md index 90c08e7..841e27d 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -259,20 +259,6 @@ MOTD_STYLE="mini" Add `.zsh` files to `~/.dotfiles/zsh/functions/` – they're auto-loaded. -### Custom Tmux Templates - -Add templates to `~/.dotfiles/.tmux-templates/`: - -```bash -# ~/.dotfiles/.tmux-templates/mytemplate.tmux -# My custom layout -split-window -h -p 40 -split-window -v -p 30 -select-pane -t 0 -``` - -Use with: `tw-create myproject mytemplate` - ### Custom Bookmarks ```bash diff --git a/README.md b/README.md index 26a40c6..c9233d1 100644 --- a/README.md +++ b/README.md @@ -115,33 +115,9 @@ See [INSTALL.md](INSTALL.md) for detailed instructions. ## Tmux Workspaces -Dual-mode system: simple templates for quick layouts OR tmuxinator for complex projects. +Tmuxinator-based workspace management for complex projects with per-pane commands, environment variables, and startup scripts. -### Quick Commands - -| Command | Alias | Description | -|---------|-------|-------------| -| `tw [template]` | - | Create/attach workspace (auto-detects mode) | -| `tw-list` | `twl` | List active workspaces | -| `tw-templates` | `twt` | Show available templates | -| `tw-save ` | `tws` | Save current layout as template | -| `twf` | - | Fuzzy search workspaces | -| `tw-sync` | - | Toggle synchronized panes | - -### Simple Templates (.tmux files) - -| Template | Layout Description | -|----------|-------------------| -| `dev` | Editor (50%) + terminal (25%) + logs (25%) | -| `ops` | 4-pane monitoring grid | -| `ssh-multi` | 4 panes for multi-server management | -| `debug` | Main workspace (70%) + helper (30%) | -| `review` | Side-by-side comparison | -| `full` | Single full-screen pane | - -### Tmuxinator Integration - -For projects requiring per-pane commands, environment variables, and startup scripts: +### Commands | Command | Alias | Description | |---------|-------|-------------| @@ -149,11 +125,10 @@ For projects requiring per-pane commands, environment variables, and startup scr | `txi-new [tmpl]` | `txin` | Create project (dev, ops, web, data, minimal) | | `txi-edit ` | `txie` | Edit project YAML | | `txi-list` | `txil` | List projects | +| `txi-delete ` | `txid` | Delete project | | `txif` | - | Fuzzy search projects | | `txi-templates` | `txit` | Show available templates | -**Smart Detection:** `tw` automatically uses tmuxinator if a project exists, otherwise creates simple workspace. - --- ## Machine-Specific Configuration @@ -473,7 +448,6 @@ DF_PLUGIN_DIR="$HOME/.dotfiles/zsh/plugins" │ └── functions/ # Feature modules │ ├── motd.zsh │ ├── command-palette.zsh -│ ├── tmux-workspaces.zsh │ ├── tmuxinator.zsh │ ├── project-env.zsh │ ├── notifications.zsh @@ -495,8 +469,7 @@ DF_PLUGIN_DIR="$HOME/.dotfiles/zsh/plugins" ├── vim/.vimrc ├── tmux/.tmux.conf ├── espanso/ # Text expansion -├── setup/ # Setup wizards -└── .tmux-templates/ # Workspace layouts +└── setup/ # Setup wizards ``` --- diff --git a/docs/REFERENCE.md b/docs/REFERENCE.md index de365c4..b4ffd6f 100644 --- a/docs/REFERENCE.md +++ b/docs/REFERENCE.md @@ -499,14 +499,6 @@ Systemd service management. **Aliases:** `scs`, `scstart`, `scstop`, `screload`, `scmask`, `scunmask`, `jctl`, `jctlf`, `jctlb`, `jctlerr` -### tmux-workspaces.zsh - -Tmux workspace management. - -**Exported functions:** `tw`, `tw-create`, `tw-attach`, `tw-list`, `tw-delete`, `tw-save`, `tw-templates`, `tw-template-edit`, `tw-sync`, `tw-rename`, `twf` - -**Aliases:** `twl`, `twc`, `twa`, `twd`, `tws`, `twt`, `twe` - --- ## Color Reference diff --git a/dotfiles.conf b/dotfiles.conf index 1a0294a..fa85a65 100644 --- a/dotfiles.conf +++ b/dotfiles.conf @@ -110,13 +110,6 @@ BTRFS_DEFAULT_MOUNT="/" SNAPPER_CONFIG="root" LIMINE_CONF="/boot/limine.conf" -# ============================================================================ -# Tmux Workspace Settings -# ============================================================================ - -TW_SESSION_PREFIX="work" -TW_DEFAULT_TEMPLATE="dev" - # ============================================================================ # Tmuxinator Settings # ============================================================================ @@ -124,10 +117,6 @@ TW_DEFAULT_TEMPLATE="dev" TMUXINATOR_ENABLED="auto" # auto, true, false TMUXINATOR_CONFIG_DIR="$HOME/.config/tmuxinator" -# When both a simple template and tmuxinator project exist with the same name, -# tmuxinator takes precedence. Set to "false" to prefer simple templates. -TW_PREFER_TMUXINATOR="true" - # ============================================================================ # Python Template Settings # ============================================================================ diff --git a/dotfiles.conf.template b/dotfiles.conf.template index a3fdc31..9fad54b 100644 --- a/dotfiles.conf.template +++ b/dotfiles.conf.template @@ -108,23 +108,12 @@ SNAPPER_CONFIG="root" LIMINE_CONF="/boot/limine.conf" # ============================================================================ -# Tmux Workspace Settings -# ============================================================================ - -TW_SESSION_PREFIX="work" -TW_DEFAULT_TEMPLATE="dev" - -# ============================================================================ -# Tmuxinator Settings +# Tmuxinator Settings # ============================================================================ TMUXINATOR_ENABLED="auto" # auto, true, false TMUXINATOR_CONFIG_DIR="$HOME/.config/tmuxinator" -# When both a simple template and tmuxinator project exist with the same name, -# tmuxinator takes precedence. Set to "false" to prefer simple templates. -TW_PREFER_TMUXINATOR="true" - # ============================================================================ # Python Template Settings # ============================================================================ diff --git a/zsh/.zshrc b/zsh/.zshrc index c29ba7b..3fbbd17 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -254,6 +254,8 @@ _dotfiles_dir="$HOME/.dotfiles" # Load dotfiles.conf first (sets DOTFILES_DIR and other vars) if [[ -f "$_dotfiles_dir/dotfiles.conf" ]]; then source "$_dotfiles_dir/dotfiles.conf" + # Apply DEFAULT_EDITOR from config if set + [[ -n "$DEFAULT_EDITOR" ]] && export EDITOR="$DEFAULT_EDITOR" VISUAL="$DEFAULT_EDITOR" else DOTFILES_DIR="$HOME/.dotfiles" DOTFILES_BRANCH="main" diff --git a/zsh/functions/tmux-workspaces.zsh b/zsh/functions/tmux-workspaces.zsh deleted file mode 100644 index 8b1898f..0000000 --- a/zsh/functions/tmux-workspaces.zsh +++ /dev/null @@ -1,471 +0,0 @@ -# ============================================================================ -# Tmux Workspace Manager - Project Templates & Layouts -# ============================================================================ -# Enhanced with optional tmuxinator integration for complex projects. -# -# Simple templates (.tmux files) for quick layouts -# Tmuxinator (optional) for full project configurations with commands -# -# Priority: tmuxinator project > simple template > create new -# ============================================================================ - -source "${0:A:h}/../lib/bootstrap.zsh" 2>/dev/null || \ -source "$HOME/.dotfiles/zsh/lib/bootstrap.zsh" 2>/dev/null - -# ============================================================================ -# Configuration -# ============================================================================ - -typeset -g TW_TEMPLATES="${TW_TEMPLATES:-$HOME/.dotfiles/.tmux-templates}" -typeset -g TW_PREFIX="${TW_PREFIX:-work}" -typeset -g TW_DEFAULT="${TW_DEFAULT:-dev}" - -# Tmuxinator integration (auto-detect if available) -typeset -g TW_USE_TMUXINATOR="${TW_USE_TMUXINATOR:-auto}" -typeset -g TMUXINATOR_CONFIG_DIR="${TMUXINATOR_CONFIG_DIR:-$HOME/.config/tmuxinator}" - -# ============================================================================ -# Internal Functions -# ============================================================================ - -_tw_check() { df_require_cmd tmux || return 1; } - -_tw_has_tmuxinator() { - [[ "$TW_USE_TMUXINATOR" == "false" ]] && return 1 - command -v tmuxinator &>/dev/null -} - -_tw_tmuxinator_project_exists() { - [[ -f "$TMUXINATOR_CONFIG_DIR/${1}.yml" ]] -} - -_tw_init() { - df_ensure_dir "$TW_TEMPLATES" - - # Create default templates if they don't exist - [[ ! -f "$TW_TEMPLATES/dev.tmux" ]] && { - cat > "$TW_TEMPLATES/dev.tmux" << 'EOF' -# Development workspace -# Layout: Editor (50%) | Terminal (25%) / Logs (25%) -split-window -h -p 50 -split-window -v -p 50 -select-pane -t 0 -EOF - - cat > "$TW_TEMPLATES/ops.tmux" << 'EOF' -# Operations workspace - 2x2 grid -split-window -h -p 50 -split-window -v -p 50 -select-pane -t 0 -split-window -v -p 50 -select-pane -t 0 -EOF - - cat > "$TW_TEMPLATES/full.tmux" << 'EOF' -# Full screen - single pane (default) -EOF - - cat > "$TW_TEMPLATES/review.tmux" << 'EOF' -# Code review - side by side -split-window -h -p 50 -select-pane -t 0 -EOF - - cat > "$TW_TEMPLATES/debug.tmux" << 'EOF' -# Debug workspace - main (70%) + helper (30%) -split-window -h -p 30 -select-pane -t 0 -EOF - - cat > "$TW_TEMPLATES/ssh-multi.tmux" << 'EOF' -# Multi-server SSH - 4 panes with sync option -split-window -h -p 50 -split-window -v -p 50 -select-pane -t 0 -split-window -v -p 50 -# Uncomment to enable synchronized input: -# set-window-option synchronize-panes on -select-pane -t 0 -EOF - - df_print_success "Created default templates in $TW_TEMPLATES" - } -} - -# ============================================================================ -# Template Functions -# ============================================================================ - -tw-templates() { - _tw_init - df_print_func_name "Workspace Templates" - - echo "" - df_print_section "Simple Templates (.tmux)" - for t in "$TW_TEMPLATES"/*.tmux(N); do - [[ -f "$t" ]] || continue - local name=$(basename "$t" .tmux) - local desc=$(head -1 "$t" | sed 's/^#[[:space:]]*//') - df_print_indent "● $name" - [[ -n "$desc" ]] && df_print_indent " └─ $desc" - done - - if _tw_has_tmuxinator; then - echo "" - df_print_section "Tmuxinator Projects" - local found=false - for p in "$TMUXINATOR_CONFIG_DIR"/*.yml(N); do - [[ -f "$p" ]] || continue - found=true - local name=$(basename "$p" .yml) - df_print_indent "● $name (tmuxinator)" - done - [[ "$found" != true ]] && df_print_indent "(none - create with txi-new)" - fi - - echo "" - df_print_info "Create workspace: tw-create