Dotfiles update 2025-12-25 15:19

This commit is contained in:
Aaron D. Lee
2025-12-25 15:19:03 -05:00
parent 9c3a535297
commit c4ccb4150d
2 changed files with 153 additions and 684 deletions

675
README.md
View File

@@ -1,6 +1,6 @@
# ADLee's Dotfiles # ADLee's Dotfiles
Personal configuration files for a fast, productive development environment on **Arch Linux** and **CachyOS**. Personal configuration for a productive development environment on **Arch Linux** and **CachyOS**.
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Shell](https://img.shields.io/badge/Shell-Zsh-green.svg)](https://www.zsh.org/) [![Shell](https://img.shields.io/badge/Shell-Zsh-green.svg)](https://www.zsh.org/)
@@ -11,576 +11,235 @@ Personal configuration files for a fast, productive development environment on *
└% └%
``` ```
## Features at a Glance
| Feature | Description |
|---------|-------------|
| **Dynamic MOTD** | System info on shell start (uptime, load, memory, updates) |
| **Two-Line Prompt** | Git status, command timer, update indicator, root detection |
| **Command Palette** | Raycast-style fuzzy launcher (`Ctrl+Space`) |
| **Smart Suggestions** | Typo correction + alias recommendations |
| **Systemd Helpers** | Quick service management shortcuts |
| **Btrfs Helpers** | Filesystem health, scrub, balance commands |
| **Snapper Integration** | Btrfs snapshots with limine boot menu sync |
| **Secrets Vault** | Encrypted storage for API keys (age/gpg) |
| **Password Manager** | LastPass CLI integration |
| **Tmux Workspaces** | Project templates with pre-configured layouts |
| **SSH Manager** | Save and manage SSH connections with tmux |
| **Python Templates** | Quick project scaffolding (Django, Flask, FastAPI, etc.) |
| **Dotfiles Sync** | Keep configuration in sync across machines |
| **Shell Analytics** | Track command usage and get insights |
---
## Quick Start ## Quick Start
```bash ```bash
git clone https://github.com/adlee-was-taken/dotfiles.git ~/.dotfiles git clone https://github.com/adlee-was-taken/dotfiles.git ~/.dotfiles
cd ~/.dotfiles cd ~/.dotfiles && ./install.sh
./install.sh
``` ```
See `INSTALL.md` for detailed installation instructions. See [INSTALL.md](INSTALL.md) for detailed instructions.
--- ---
## Command Reference ## Features
### Dotfiles Management | Feature | Description |
|---------|-------------|
| **Dynamic MOTD** | System info on shell start |
| **Two-Line Prompt** | Git status, command timer, update indicator |
| **Command Palette** | Fuzzy launcher (`Ctrl+Space`) |
| **Tmux Workspaces** | Simple templates + tmuxinator integration |
| **Systemd Helpers** | Quick service management |
| **Btrfs/Snapper** | Filesystem health + snapshot management |
| **Secrets Vault** | Encrypted storage (age/gpg) |
| **Password Manager** | LastPass CLI integration |
| **Python Templates** | Project scaffolding (Flask, FastAPI, CLI, etc.) |
---
## Dotfiles Management
| Command | Alias | Description | | Command | Alias | Description |
|---------|-------|-------------| |---------|-------|-------------|
| `dotfiles-doctor.sh` | `dfd`, `doctor` | Health check | | `dotfiles-doctor.sh` | `dfd` | Health check |
| `dotfiles-doctor.sh --fix` | `dffix` | Auto-fix issues | | `dotfiles-doctor.sh --fix` | `dffix` | Auto-fix issues |
| `dotfiles-doctor.sh --quick` | - | Quick essential checks | | `dotfiles-sync.sh push` | `dfpush` | Push changes |
| `dotfiles-sync.sh` | `dfs`, `dfsync` | Sync status | | `dotfiles-sync.sh pull` | `dfpull` | Pull changes |
| `dotfiles-sync.sh push` | `dfpush` | Push changes to remote | | `dotfiles-update.sh` | `dfu` | Update dotfiles |
| `dotfiles-sync.sh pull` | `dfpull` | Pull remote changes |
| `dotfiles-update.sh` | `dfu`, `dfupdate` | Update dotfiles |
| `dotfiles-version.sh` | `dfv`, `dfversion` | Version info |
| `dotfiles-stats.sh` | `dfstats` | Shell analytics |
| `dotfiles-vault.sh` | `vault` | Secrets manager | | `dotfiles-vault.sh` | `vault` | Secrets manager |
| `dotfiles-compile.sh` | `dfcompile` | Compile zsh for speed | | `source ~/.zshrc` | `reload` | Reload config |
| `source ~/.zshrc` | `reload`, `rl` | Reload shell config |
### Quick Edit Aliases **Quick Edit:** `v.zshrc`, `v.conf`, `v.alias`, `v.motd`
| Alias | Opens |
|-------|-------|
| `v.zshrc` | `~/.zshrc` |
| `v.conf` | `~/.dotfiles/dotfiles.conf` |
| `v.alias` | `~/.dotfiles/zsh/aliases.zsh` |
| `v.motd` | `~/.dotfiles/zsh/functions/motd.zsh` |
| `v.edit` | `~/.dotfiles` directory in editor |
--- ---
## Systemd Helpers ## Systemd Helpers
Quick shortcuts for systemd service management.
### Core Commands
| Command | Description | | Command | Description |
|---------|-------------| |---------|-------------|
| `sc <args>` | `sudo systemctl <args>` | | `sc <args>` | `sudo systemctl <args>` |
| `scu <args>` | `systemctl --user <args>` | | `scr <service>` | Restart + show status |
| `scr <service>` | Restart service and show status | | `sce <service>` | Enable + start |
| `sce <service>` | Enable and start service | | `scd <service>` | Disable + stop |
| `scd <service>` | Disable and stop service | | `sclog <service>` | Follow journal logs |
| `sclog <service>` | Follow journal logs (`-f`) | | `sc-failed` | Show failed services |
| `sclogs <service>` | Show recent logs (no follow) |
### Status Commands
| Command | Description |
|---------|-------------|
| `sc-failed` | Show failed services (system + user) |
| `sc-timers` | Show active timers |
| `sc-recent` | Recently started services |
| `sc-boot` | Boot time analysis | | `sc-boot` | Boot time analysis |
| `sc-search <query>` | Search services by name | | `scf` | Interactive manager (fzf) |
| `sc-info <service>` | Detailed service info |
### Interactive (requires fzf) **Aliases:** `scs` (status), `scstart`, `scstop`, `screload`, `jctl`, `jctlf`
| Command | Description |
|---------|-------------|
| `scf` | Interactive service manager with preview |
| `sclogf` | Interactive log viewer |
### Aliases
| Alias | Command |
|-------|---------|
| `scs` | `sc status` |
| `scstart` | `sc start` |
| `scstop` | `sc stop` |
| `screload` | `sc daemon-reload` |
| `jctl` | `journalctl` |
| `jctlf` | `journalctl -f` |
| `jctlb` | `journalctl -b` |
| `jctlerr` | `journalctl -p err -b` |
--- ---
## Btrfs Helpers ## Btrfs & Snapper
Quick commands for btrfs filesystem management (CachyOS defaults to btrfs). ### Btrfs Commands
### Information
| Command | Alias | Description | | Command | Alias | Description |
|---------|-------|-------------| |---------|-------|-------------|
| `btrfs-usage [mount]` | `btru` | Filesystem usage summary | | `btrfs-usage` | `btru` | Filesystem usage |
| `btrfs-subs [mount]` | `btrs` | List all subvolumes | | `btrfs-health` | `btrh` | Quick health check |
| `btrfs-info [mount]` | `btri` | Full filesystem information | | `btrfs-scrub` | - | Start integrity check |
| `btrfs-health [mount]` | `btrh` | Quick health check | | `btrfs-balance` | - | Balance operation |
| `btrfs-compress [path]` | `btrc` | Compression stats (requires `compsize`) | | `btrfs-compress` | `btrc` | Compression stats |
### Maintenance ### Snapper Snapshots
| Command | Description |
|---------|-------------|
| `btrfs-balance [mount]` | Start balance operation |
| `btrfs-balance-status` | Check balance progress |
| `btrfs-balance-cancel` | Cancel running balance |
| `btrfs-scrub [mount]` | Start scrub (integrity check) |
| `btrfs-scrub-status` | Check scrub progress |
| `btrfs-scrub-cancel` | Cancel running scrub |
| `btrfs-defrag <path>` | Defragment file/directory |
| `btrfs-maintain [mount]` | Full maintenance routine |
### Snapshots
| Command | Description |
|---------|-------------|
| `btrfs-snap-usage` | Show snapshot space usage |
> **Note:** Most commands default to `/` if no mount point is specified. See also `snapper.zsh` for snapshot management.
---
## Snapper Integration
Btrfs snapshot management with limine bootloader sync.
| Command | Alias | Description | | Command | Alias | Description |
|---------|-------|-------------| |---------|-------|-------------|
| `snap-create "description"` | `snap` | Create snapshot with validation | | `snap-create "desc"` | `snap` | Create snapshot |
| `snap-list [count]` | `snapls` | List recent snapshots (default: 10) | | `snap-list` | `snapls` | List snapshots |
| `snap-show <number>` | `snapshow` | Show snapshot details | | `snap-check` | `snapcheck` | Verify limine sync |
| `snap-delete <number>` | `snaprm` | Delete snapshot | | `sys-update` | - | Update with pre/post snapshot |
| `snap-check-limine` | `snapcheck` | Verify boot menu sync |
| `snap-sync` | `snapsync` | Manually trigger limine sync |
| `snap-validate-service` | - | Check service status |
### System Update with Snapshot
```bash
sys-update # Creates pre/post snapshot around pacman -Syu
```
--- ---
## Command Palette ## Tmux Workspaces
Press **`Ctrl+Space`** or **`Ctrl+P`** to open the fuzzy command launcher. Manage tmux sessions with simple templates or full tmuxinator projects.
``` ### Quick Commands
╭──────────────────────────────────────────╮
git │
├──────────────────────────────────────────┤
│ ⎇ git status │
│ ⎇ git pull main │
│ ⚡ gs (alias → git status) │
│ ↺ git commit -m "..." │
│ ★ Edit .zshrc │
╰──────────────────────────────────────────╯
```
### Searches
- Aliases and functions
- Recent commands
- Git commands (when in repo)
- Docker commands
- Bookmarked directories
- Dotfiles scripts
- Quick actions
### Keybindings
| Key | Action |
|-----|--------|
| `Enter` | Execute command |
| `Ctrl+E` | Edit before running |
| `Ctrl+Y` | Copy to clipboard |
| `Ctrl+R` | Reload entries |
### Directory Bookmarks
| Command | Alias | Description | | Command | Alias | Description |
|---------|-------|-------------| |---------|-------|-------------|
| `bookmark <name> [path]` | `bm` | Save bookmark (default: current dir) | | `tw <name> [template]` | - | Create/attach workspace |
| `bookmark list` | `bm list` | List all bookmarks |
| `bookmark delete <name>` | `bm rm` | Delete bookmark |
| `jump <name>` | `j` | Go to bookmark (fuzzy select if no name) |
---
## Smart Suggestions
Automatic typo correction for 100+ common mistakes:
```bash
$ gti status
✗ Command not found: gti
→ Did you mean: git?
```
Alias recommendations for frequently typed commands:
```bash
💡 Tip: You've typed 'git status' 50 times
Consider adding: alias gs='git status'
```
### Supported Typos
Git, Docker, common commands (ls, cat, grep, mkdir, etc.), Python, Node, sudo, ssh, vim, and more.
### Quick Fix
```bash
fuck # Re-run last command with typo correction
```
---
## MOTD (Message of the Day)
System info displayed on shell startup.
### Display Styles
| Style | Command | Description |
|-------|---------|-------------|
| Compact | `show_motd` | Box format with stats |
| Mini | `show_motd_mini` | Single line |
| Full | `show_motd_full` | Extended info with kernel, scheduler |
### Configuration
In `dotfiles.conf`:
```bash
ENABLE_MOTD="true"
MOTD_STYLE="compact" # compact, mini, full, or none
```
### Force Refresh
```bash
motd # Compact
motd-mini # Mini
motd-full # Full
sysbrief # Quick system overview (callable anytime)
```
---
## Secrets Vault
Encrypted storage for API keys and tokens using `age` or `gpg`.
| Command | Description |
|---------|-------------|
| `vault init` | Initialize vault |
| `vault set <key> [value]` | Store secret (prompts if value omitted) |
| `vault get <key>` | Retrieve secret |
| `vault list` | List all keys |
| `vault delete <key>` | Delete secret |
| `vault shell` | Print as export statements |
| `vault export <file>` | Backup vault (encrypted) |
| `vault import <file>` | Restore from backup |
| `vault status` | Show vault info |
### Aliases
| Alias | Command |
|-------|---------|
| `vls` | `vault list` |
| `vget` | `vault get` |
| `vset` | `vault set` |
### Auto-load on Shell Start
Secrets can be auto-exported to environment. Enable in `.zshrc`:
```bash
eval $(vault shell)
```
---
## Password Manager (LastPass)
Unified interface for LastPass CLI.
| Command | Description |
|---------|-------------|
| `pw list` | List all items |
| `pw get <item> [field]` | Get field (default: password) |
| `pw otp <item>` | Get TOTP code |
| `pw search <query>` | Search items |
| `pw copy <item> [field]` | Copy to clipboard |
| `pw lock` | Logout/lock session |
### Fields
`password`, `username`, `url`, `notes`, or any custom field name.
### Aliases
| Alias | Command |
|-------|---------|
| `pwl` | `pw list` |
| `pwg` | `pw get` |
| `pwc` | `pw copy` |
| `pws` | `pw search` |
### FZF Integration
| Command | Description |
|---------|-------------|
| `pwf` | Fuzzy search and copy password |
| `pwof` | Fuzzy search and copy OTP |
---
## Tmux Workspace Manager
Pre-configured layouts for different workflows.
### Workspace Commands
| Command | Alias | Description |
|---------|-------|-------------|
| `tw <name> [template]` | - | Attach or create workspace |
| `tw-create <name> [template]` | `twc` | Create workspace |
| `tw-attach <name>` | `twa` | Attach to workspace |
| `tw-list` | `twl` | List active workspaces | | `tw-list` | `twl` | List active workspaces |
| `tw-delete <name>` | `twd` | Delete workspace | | `tw-templates` | `twt` | Show available templates |
| `tw-save <name>` | `tws` | Save current layout as template | | `tw-save <name>` | `tws` | Save current layout |
| `tw-templates` | `twt` | List available templates |
| `tw-template-edit <name>` | `twe` | Edit template |
| `tw-sync` | - | Toggle pane synchronization |
| `tw-rename <old> <new>` | - | Rename workspace |
| `twf` | - | Fuzzy search workspaces | | `twf` | - | Fuzzy search workspaces |
### Built-in Templates ### Built-in Templates
| Template | Description | | Template | Description |
|----------|-------------| |----------|-------------|
| `dev` | Vim (50%) + terminal (25%) + logs (25%) | | `dev` | Editor (50%) + terminal + logs |
| `ops` | 4-pane monitoring grid | | `ops` | 4-pane monitoring grid |
| `ssh-multi` | 4 panes for multi-server management | | `ssh-multi` | 4 panes for multi-server |
| `debug` | Main (70%) + helper (30%) | | `debug` | Main (70%) + helper (30%) |
| `full` | Single full-screen pane | | `review` | Side-by-side comparison |
| `review` | Side-by-side code review |
--- ### Tmuxinator Integration
## SSH Session Manager For complex projects with per-pane commands and startup scripts:
Save and manage SSH connections with automatic tmux integration. ```bash
# Install
sudo pacman -S tmuxinator
# Create project from template
txi-new myproject dev
# Edit configuration
txi-edit myproject
# Start project
txi myproject
```
| Command | Alias | Description | | Command | Alias | Description |
|---------|-------|-------------| |---------|-------|-------------|
| `ssh-save <name> <user@host> [port] [key] [opts] [desc]` | `sshs` | Save profile | | `txi <name>` | - | Start/attach project |
| `ssh-list` | `sshl` | List all profiles | | `txi-new <n> [tmpl]` | `txin` | Create project |
| `ssh-connect <name>` | `sshc` | Connect (auto tmux) | | `txi-edit <name>` | `txie` | Edit YAML config |
| `ssh-delete <name>` | `sshd` | Delete profile | | `txi-list` | `txil` | List projects |
| `ssh-reconnect [name]` | `sshr` | Reconnect (default: last) | | `txif` | - | Fuzzy search projects |
| `ssh-sync-dotfiles <name>` | `sshsync` | Deploy dotfiles to remote |
| `sshf` | - | Fuzzy search and connect |
### Configuration **Templates:** `dev`, `ops`, `web`, `data`, `minimal`
In `dotfiles.conf`: The `tw` command auto-detects: running session → tmuxinator project → simple template.
```bash
SSH_AUTO_TMUX="true" # Auto-create tmux session
SSH_TMUX_SESSION_PREFIX="ssh" # Session naming prefix
SSH_SYNC_DOTFILES="ask" # Sync dotfiles on connect
```
--- ---
## Python Project Templates ## Command Palette
Quick project scaffolding with virtual environments. Press **`Ctrl+Space`** for the fuzzy command launcher.
Searches aliases, functions, history, git commands, bookmarks, and quick actions.
### Directory Bookmarks
| Command | Alias | Description | | Command | Alias | Description |
|---------|-------|-------------| |---------|-------|-------------|
| `py-new <name>` | `pynew` | Basic Python project | | `bookmark <name> [path]` | `bm` | Save bookmark |
| `py-django <name>` | `pydjango` | Django web app | | `bookmark list` | `bm list` | List bookmarks |
| `py-flask <name>` | `pyflask` | Flask web app | | `jump <name>` | `j` | Go to bookmark |
| `py-fastapi <name>` | `pyfast` | FastAPI REST API |
| `py-data <name>` | `pydata` | Data science project |
| `py-cli <name>` | `pycli` | CLI tool with Click |
### Quick Venv Activation
```bash
venv # Activates venv, .venv, or env if found
```
--- ---
## Shell Analytics ## Secrets Vault
Track command usage and get insights. Encrypted storage for API keys using `age` or `gpg`.
| Command | Description | | Command | Description |
|---------|-------------| |---------|-------------|
| `dfstats` | Full dashboard | | `vault init` | Initialize |
| `dfstats top [n]` | Top N commands | | `vault set <key>` | Store secret |
| `dfstats suggest` | Alias suggestions | | `vault get <key>` | Retrieve secret |
| `dfstats breakdown` | Category breakdown | | `vault list` | List keys |
| `dfstats heatmap` | Activity by hour | | `vault shell` | Export to environment |
| `dfstats dirs` | Most visited directories |
| `dfstats git` | Git command breakdown | ---
| `dfstats export` | Export as JSON |
## Password Manager (LastPass)
| Command | Description |
|---------|-------------|
| `pw <query>` | Search and copy password |
| `pw show <item>` | Show entry details |
| `pw list` | List all entries |
| `pw gen [len]` | Generate password |
| `pwf` | Fuzzy search (fzf) |
---
## Python Templates
| Command | Alias | Description |
|---------|-------|-------------|
| `py-new <name>` | `pynew` | Basic project |
| `py-flask <name>` | `pyflask` | Flask web app |
| `py-fastapi <name>` | `pyfast` | FastAPI REST API |
| `py-cli <name>` | `pycli` | CLI with Click |
| `py-data <name>` | `pydata` | Data science |
| `venv` | - | Activate virtualenv |
---
## SSH Manager
| Command | Alias | Description |
|---------|-------|-------------|
| `ssh-save <n> <user@host>` | `sshs` | Save profile |
| `ssh-connect <name>` | `sshc` | Connect (auto tmux) |
| `ssh-list` | `sshl` | List profiles |
| `sshf` | - | Fuzzy search |
--- ---
## Common Aliases ## Common Aliases
### Navigation ### Navigation
`..`, `...`, `....`, `~`, `c.` (dotfiles dir)
| Alias | Command |
|-------|---------|
| `..` | `cd ..` |
| `...` | `cd ../..` |
| `....` | `cd ../../..` |
| `~` | `cd ~` |
| `c.` | `cd ~/.dotfiles` |
### Git ### Git
`g`, `gs` (status), `ga` (add), `gc` (commit), `gp` (push), `gl` (pull), `gd` (diff), `gco` (checkout), `glog`
| Alias | Command |
|-------|---------|
| `g` | `git` |
| `gs` | `git status` |
| `ga` | `git add` |
| `gc` | `git commit` |
| `gp` | `git push` |
| `gl` | `git pull` |
| `gd` | `git diff` |
| `gco` | `git checkout` |
| `gb` | `git branch` |
| `glog` | `git log --oneline --graph --decorate --all` |
### Docker ### Docker
`d`, `dc` (compose), `dps`, `dpa`, `di` (images), `dex` (exec -it)
| Alias | Command |
|-------|---------|
| `d` | `docker` |
| `dc` | `docker-compose` |
| `dps` | `docker ps` |
| `dpa` | `docker ps -a` |
| `di` | `docker images` |
| `dex` | `docker exec -it` |
### System
| Alias | Command |
|-------|---------|
| `h` | `history` |
| `c` | `clear` |
| `myip` | `curl -s ifconfig.me` |
| `ports` | `netstat -tulanp` |
### Tools (conditional) ### Tools (conditional)
- `ls`/`ll`/`la`/`lt``eza` (if installed)
| Alias | Command | Condition | - `cat``bat` (if installed)
|-------|---------|-----------|
| `ls` | `eza --icons` | if eza installed |
| `ll` | `eza -lah --icons` | if eza installed |
| `la` | `eza -a --icons` | if eza installed |
| `lt` | `eza --tree --level=2 --icons` | if eza installed |
| `cat` | `bat --paging=never` | if bat installed |
--- ---
## Zsh Theme Features ## Zsh Theme
The `adlee` theme provides: The `adlee` theme provides:
- Two-line prompt with git branch + dirty indicator
- **Two-line prompt** for clarity - Command timer for commands >10s (color-coded by duration)
- **Git integration** with branch name and dirty indicator (`*`) - Package update count indicator
- **Command timer** for commands taking >10 seconds - Root detection (red `#` vs blue `%`)
- **Update indicator** showing available package updates
- **Root detection** (red `#` for root, blue `%` for users)
- **Smart path display**
### Timer Display
| Duration | Color |
|----------|-------|
| >1 hour | Red |
| >1 minute | Orange |
| >10 seconds | Green |
---
## Espanso Text Expansion
Text expansion snippets for quick typing.
### Date/Time
| Trigger | Output |
|---------|--------|
| `..date` | `2025-12-24` |
| `..time` | `14:30:45` |
| `..dt` | `2025-12-24 14:30:45 EST` |
| `..ts` | ISO 8601 timestamp |
| `..epoch` | Unix timestamp |
### Quick Text
| Trigger | Output |
|---------|--------|
| `..shrug` | `¯\_(ツ)_/¯` |
| `..flip` | `(╯°□°)╯︵ ┻━┻` |
| `..lgtm` | `Looks good to me` |
### Code
| Trigger | Output |
|---------|--------|
| `..bash` | Bash shebang + set -euo pipefail |
| `..python` | Python main boilerplate |
| `..mdcode` | Markdown code block |
See [REFERENCE.md](REFERENCE.md) for complete Espanso reference.
---
## Key Bindings
| Binding | Action |
|---------|--------|
| `Ctrl+Space` | Command palette |
| `Ctrl+P` | Command palette (alternative) |
| `Alt+R` | Reload zsh config |
| `Ctrl+→` | Forward word |
| `Ctrl+←` | Backward word |
| `Home` | Beginning of line |
| `End` | End of line |
--- ---
@@ -589,67 +248,41 @@ See [REFERENCE.md](REFERENCE.md) for complete Espanso reference.
Edit `~/.dotfiles/dotfiles.conf`: Edit `~/.dotfiles/dotfiles.conf`:
```bash ```bash
# Identity # Display
USER_FULLNAME="Your Name" DF_WIDTH="74"
USER_EMAIL="you@example.com" MOTD_STYLE="compact" # compact, mini, full, none
USER_GITHUB="yourusername"
# MOTD
ENABLE_MOTD="true"
MOTD_STYLE="compact"
# Features # Features
ENABLE_SMART_SUGGESTIONS="true" ENABLE_SMART_SUGGESTIONS="true"
ENABLE_COMMAND_PALETTE="true" ENABLE_COMMAND_PALETTE="true"
ENABLE_VAULT="true"
DOTFILES_AUTO_SYNC_CHECK="true"
# Btrfs # Tmuxinator
BTRFS_DEFAULT_MOUNT="/" TMUXINATOR_ENABLED="auto"
TW_PREFER_TMUXINATOR="true"
# Package Manager
AUR_HELPER="auto" # paru, yay, or auto
``` ```
### Local Overrides
Create `~/.zshrc.local` for machine-specific settings.
--- ---
## Repository Structure ## Repository Structure
``` ```
~/.dotfiles/ ~/.dotfiles/
├── install.sh # Main installer ├── install.sh # Installer
├── dotfiles.conf # Central configuration ├── dotfiles.conf # Configuration
├── bin/ # Scripts (symlinked to ~/.local/bin) ├── bin/ # Scripts ~/.local/bin
│ ├── dotfiles-doctor.sh
│ ├── dotfiles-sync.sh
│ ├── dotfiles-update.sh
│ ├── dotfiles-vault.sh
│ ├── dotfiles-stats.sh
│ ├── dotfiles-version.sh
│ └── dotfiles-compile.sh
├── zsh/ ├── zsh/
│ ├── .zshrc │ ├── .zshrc
│ ├── aliases.zsh │ ├── aliases.zsh
│ ├── lib/ │ ├── lib/ # colors, config, utils, bootstrap
│ └── colors.zsh # Shared color definitions ├── themes/adlee.zsh-theme
── themes/ ── functions/ # Feature modules
│ │ └── adlee.zsh-theme
│ └── functions/
│ ├── btrfs-helpers.zsh
│ ├── command-palette.zsh
│ ├── motd.zsh
│ ├── password-manager.zsh
│ ├── python-templates.zsh
│ ├── smart-suggest.zsh
│ ├── snapper.zsh
│ ├── ssh-manager.zsh
│ ├── systemd-helpers.zsh
│ └── tmux-workspaces.zsh
├── vim/.vimrc ├── vim/.vimrc
├── tmux/.tmux.conf ├── tmux/.tmux.conf
├── git/.gitconfig.template
├── espanso/ # Text expansion ├── espanso/ # Text expansion
├── setup/ # Setup scripts
└── .tmux-templates/ # Workspace layouts └── .tmux-templates/ # Workspace layouts
``` ```
@@ -659,7 +292,5 @@ AUR_HELPER="auto" # paru, yay, or auto
MIT See [LICENSE](LICENSE) MIT See [LICENSE](LICENSE)
---
**Author:** Aaron D. Lee **Author:** Aaron D. Lee
**Repository:** https://github.com/adlee-was-taken/dotfiles **Repository:** https://github.com/adlee-was-taken/dotfiles

View File

@@ -1,162 +0,0 @@
# Tmuxinator Integration
The dotfiles now include seamless integration with [tmuxinator](https://github.com/tmuxinator/tmuxinator) for complex project configurations, while maintaining backward compatibility with simple `.tmux` templates.
## Installation
```bash
# Arch/CachyOS
sudo pacman -S tmuxinator
# Or via Ruby gems
gem install tmuxinator
```
## Quick Start
```bash
# Create a new tmuxinator project
txi-new myproject dev
# Edit the configuration
txi-edit myproject
# Start the project
txi myproject
# Or use the unified tw command (auto-detects tmuxinator)
tw myproject
```
## Command Reference
### Tmuxinator Commands (txi-*)
| Command | Alias | Description |
|---------|-------|-------------|
| `txi <name>` | - | Start/attach to tmuxinator project |
| `txi-new <name> [template]` | `txin` | Create new project |
| `txi-edit <name>` | `txie` | Edit project YAML file |
| `txi-list` | `txil` | List all tmuxinator projects |
| `txi-delete <name>` | `txid` | Delete project |
| `txi-stop <name>` | `txis` | Stop running session |
| `txi-templates` | `txit` | Show available templates |
| `txi-import <template> [name]` | - | Convert .tmux to tmuxinator |
| `txif` | - | Fuzzy search and start |
| `txi-help` | `txih` | Show help |
### Available Templates
| Template | Description |
|----------|-------------|
| `dev` | Development: editor + terminal + server + logs |
| `ops` | Operations: monitoring grid + services + SSH |
| `web` | Web development: editor + server + frontend + db |
| `data` | Data science: jupyter + code + data + terminal |
| `minimal` | Single window, single pane |
### Integration with tw-* Commands
The existing `tw` commands automatically detect tmuxinator:
```bash
# If "myproject.yml" exists in ~/.config/tmuxinator/, uses tmuxinator
# Otherwise, uses simple .tmux template
tw myproject
```
**Priority order:**
1. Running tmux session with matching name
2. Tmuxinator project (if exists)
3. Simple `.tmux` template
### Example Tmuxinator Project
```yaml
# ~/.config/tmuxinator/webapp.yml
name: webapp
root: ~/projects/webapp
# Activate virtualenv before all windows
pre_window: source venv/bin/activate
windows:
- editor:
layout: main-vertical
panes:
- vim .
- # terminal
- server:
panes:
- python manage.py runserver
- frontend:
layout: even-horizontal
panes:
- npm run watch
- npm run tailwind
- database:
panes:
- pgcli mydb
```
### Configuration
Add to `dotfiles.conf`:
```bash
# ============================================================================
# Tmuxinator Settings
# ============================================================================
TMUXINATOR_ENABLED="auto" # auto, true, false
TMUXINATOR_CONFIG_DIR="$HOME/.config/tmuxinator"
TW_PREFER_TMUXINATOR="true" # Prefer tmuxinator over simple templates
```
### Simple Templates vs Tmuxinator
| Feature | Simple (.tmux) | Tmuxinator (.yml) |
|---------|---------------|-------------------|
| Learning curve | Minimal | Moderate |
| Per-pane commands | No | Yes |
| Environment variables | No | Yes |
| Pre/post hooks | No | Yes |
| Window names | No | Yes |
| Complex layouts | Limited | Full support |
| Startup speed | Fast | Slightly slower |
**Use simple templates for:**
- Quick, ad-hoc layouts
- Simple split configurations
- Layouts you'll customize each time
**Use tmuxinator for:**
- Persistent project configurations
- Projects with specific startup commands
- Complex multi-window setups
- Team-shared configurations
### Import Existing Templates
Convert your simple `.tmux` templates to tmuxinator format:
```bash
# Import the 'dev' template as a tmuxinator project
txi-import dev myproject
# Then customize it
txi-edit myproject
```
### Tips
1. **Project Discovery**: The `tw` and `twf` commands show both active sessions and available tmuxinator projects
2. **Git Integration**: When starting a workspace in a git repo, the first pane automatically `cd`s to the repo root
3. **Synchronized Input**: Toggle with `tw-sync` to type in all panes simultaneously
4. **Fuzzy Finding**: Use `twf` or `txif` for quick project selection with fzf