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 <noreply@anthropic.com>
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
# ============================================================================
|
||||
# Tmuxinator Integration for Dotfiles
|
||||
# Tmuxinator Workspace Management
|
||||
# ============================================================================
|
||||
# Extends tmux-workspaces with tmuxinator support for more powerful
|
||||
# project configurations with per-pane commands, environment variables,
|
||||
# and complex layouts.
|
||||
# Tmux workspace management with per-pane commands, environment variables,
|
||||
# and complex layouts via tmuxinator.
|
||||
#
|
||||
# Features:
|
||||
# - Seamless integration with existing tw-* commands
|
||||
# - Auto-detection: uses tmuxinator if project exists, falls back to templates
|
||||
# - Project scaffolding with sensible defaults
|
||||
# - Import/export between tmuxinator and simple templates
|
||||
# - Multiple built-in templates (dev, ops, web, data, minimal)
|
||||
# - Fuzzy search for projects
|
||||
#
|
||||
# Requirements:
|
||||
# - tmuxinator (gem install tmuxinator or pacman -S tmuxinator)
|
||||
@@ -352,98 +350,6 @@ windows:
|
||||
EOF
|
||||
}
|
||||
|
||||
# ============================================================================
|
||||
# Integration with tw-* Commands
|
||||
# ============================================================================
|
||||
|
||||
# Enhanced tw function that checks tmuxinator first
|
||||
_txi_tw_enhanced() {
|
||||
local name="$1"
|
||||
local template="${2:-}"
|
||||
|
||||
[[ -z "$name" ]] && {
|
||||
# List both tw workspaces and tmuxinator projects
|
||||
tw-list 2>/dev/null
|
||||
echo ""
|
||||
txi-list 2>/dev/null
|
||||
return
|
||||
}
|
||||
|
||||
# Check if tmuxinator project exists
|
||||
if _txi_check 2>/dev/null && _txi_project_exists "$name"; then
|
||||
txi "$name"
|
||||
return
|
||||
fi
|
||||
|
||||
# Fall back to tw
|
||||
tw "$name" "$template"
|
||||
}
|
||||
|
||||
# ============================================================================
|
||||
# Import/Export
|
||||
# ============================================================================
|
||||
|
||||
# Import a simple .tmux template to tmuxinator format
|
||||
# Usage: txi-import <template-name> [new-project-name]
|
||||
txi-import() {
|
||||
local tmpl_name="$1"
|
||||
local project_name="${2:-$tmpl_name}"
|
||||
|
||||
[[ -z "$tmpl_name" ]] && { echo "Usage: txi-import <template-name> [project-name]"; return 1; }
|
||||
_txi_check || return 1
|
||||
|
||||
local tmpl_file="${TW_TEMPLATES:-$HOME/.dotfiles/.tmux-templates}/${tmpl_name}.tmux"
|
||||
|
||||
if [[ ! -f "$tmpl_file" ]]; then
|
||||
df_print_error "Template not found: $tmpl_name"
|
||||
return 1
|
||||
fi
|
||||
|
||||
df_print_func_name "Import Template: ${tmpl_name}"
|
||||
|
||||
_txi_init
|
||||
local project_file="$TMUXINATOR_CONFIG_DIR/${project_name}.yml"
|
||||
|
||||
if _txi_project_exists "$project_name"; then
|
||||
df_confirm "Overwrite existing project '$project_name'?" || return 1
|
||||
fi
|
||||
|
||||
# Parse the simple template and convert to tmuxinator format
|
||||
local pane_count=0
|
||||
local panes=""
|
||||
|
||||
while IFS= read -r line; do
|
||||
[[ "$line" =~ ^#.*$ ]] && continue
|
||||
[[ "$line" =~ ^[[:space:]]*$ ]] && continue
|
||||
|
||||
if [[ "$line" =~ split-window ]]; then
|
||||
((pane_count++))
|
||||
fi
|
||||
done < "$tmpl_file"
|
||||
|
||||
# Generate panes list
|
||||
panes=" - # Pane 1"
|
||||
for ((i=1; i<=pane_count; i++)); do
|
||||
panes+="\n - # Pane $((i+1))"
|
||||
done
|
||||
|
||||
# Create the project file
|
||||
cat > "$project_file" << EOF
|
||||
# Imported from template: ${tmpl_name}
|
||||
name: ${project_name}
|
||||
root: ~
|
||||
|
||||
windows:
|
||||
- main:
|
||||
layout: tiled
|
||||
panes:
|
||||
$(echo -e "$panes")
|
||||
EOF
|
||||
|
||||
df_print_success "Imported: $project_file"
|
||||
df_print_info "Edit to customize: txi-edit $project_name"
|
||||
}
|
||||
|
||||
# ============================================================================
|
||||
# Available Templates
|
||||
# ============================================================================
|
||||
@@ -479,15 +385,10 @@ txi-help() {
|
||||
|
||||
Templates:
|
||||
txi-templates Show available templates
|
||||
txi-import <t> [n] Import simple .tmux template to tmuxinator
|
||||
|
||||
Configuration:
|
||||
Projects stored in: ~/.config/tmuxinator/
|
||||
|
||||
Integration:
|
||||
Tmuxinator projects are automatically detected by tw commands.
|
||||
If a tmuxinator project exists with the same name, it takes precedence.
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user