Dotfiles update 2025-12-25 15:19
This commit is contained in:
675
README.md
675
README.md
@@ -1,6 +1,6 @@
|
||||
# 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**.
|
||||
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
[](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
|
||||
|
||||
```bash
|
||||
git clone https://github.com/adlee-was-taken/dotfiles.git ~/.dotfiles
|
||||
cd ~/.dotfiles
|
||||
./install.sh
|
||||
cd ~/.dotfiles && ./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 |
|
||||
|---------|-------|-------------|
|
||||
| `dotfiles-doctor.sh` | `dfd`, `doctor` | Health check |
|
||||
| `dotfiles-doctor.sh` | `dfd` | Health check |
|
||||
| `dotfiles-doctor.sh --fix` | `dffix` | Auto-fix issues |
|
||||
| `dotfiles-doctor.sh --quick` | - | Quick essential checks |
|
||||
| `dotfiles-sync.sh` | `dfs`, `dfsync` | Sync status |
|
||||
| `dotfiles-sync.sh push` | `dfpush` | Push changes to remote |
|
||||
| `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-sync.sh push` | `dfpush` | Push changes |
|
||||
| `dotfiles-sync.sh pull` | `dfpull` | Pull changes |
|
||||
| `dotfiles-update.sh` | `dfu` | Update dotfiles |
|
||||
| `dotfiles-vault.sh` | `vault` | Secrets manager |
|
||||
| `dotfiles-compile.sh` | `dfcompile` | Compile zsh for speed |
|
||||
| `source ~/.zshrc` | `reload`, `rl` | Reload shell config |
|
||||
| `source ~/.zshrc` | `reload` | Reload config |
|
||||
|
||||
### Quick Edit Aliases
|
||||
|
||||
| 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 |
|
||||
**Quick Edit:** `v.zshrc`, `v.conf`, `v.alias`, `v.motd`
|
||||
|
||||
---
|
||||
|
||||
## Systemd Helpers
|
||||
|
||||
Quick shortcuts for systemd service management.
|
||||
|
||||
### Core Commands
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `sc <args>` | `sudo systemctl <args>` |
|
||||
| `scu <args>` | `systemctl --user <args>` |
|
||||
| `scr <service>` | Restart service and show status |
|
||||
| `sce <service>` | Enable and start service |
|
||||
| `scd <service>` | Disable and stop service |
|
||||
| `sclog <service>` | Follow journal logs (`-f`) |
|
||||
| `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 |
|
||||
| `scr <service>` | Restart + show status |
|
||||
| `sce <service>` | Enable + start |
|
||||
| `scd <service>` | Disable + stop |
|
||||
| `sclog <service>` | Follow journal logs |
|
||||
| `sc-failed` | Show failed services |
|
||||
| `sc-boot` | Boot time analysis |
|
||||
| `sc-search <query>` | Search services by name |
|
||||
| `sc-info <service>` | Detailed service info |
|
||||
| `scf` | Interactive manager (fzf) |
|
||||
|
||||
### Interactive (requires fzf)
|
||||
|
||||
| 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` |
|
||||
**Aliases:** `scs` (status), `scstart`, `scstop`, `screload`, `jctl`, `jctlf`
|
||||
|
||||
---
|
||||
|
||||
## Btrfs Helpers
|
||||
## Btrfs & Snapper
|
||||
|
||||
Quick commands for btrfs filesystem management (CachyOS defaults to btrfs).
|
||||
|
||||
### Information
|
||||
### Btrfs Commands
|
||||
|
||||
| Command | Alias | Description |
|
||||
|---------|-------|-------------|
|
||||
| `btrfs-usage [mount]` | `btru` | Filesystem usage summary |
|
||||
| `btrfs-subs [mount]` | `btrs` | List all subvolumes |
|
||||
| `btrfs-info [mount]` | `btri` | Full filesystem information |
|
||||
| `btrfs-health [mount]` | `btrh` | Quick health check |
|
||||
| `btrfs-compress [path]` | `btrc` | Compression stats (requires `compsize`) |
|
||||
| `btrfs-usage` | `btru` | Filesystem usage |
|
||||
| `btrfs-health` | `btrh` | Quick health check |
|
||||
| `btrfs-scrub` | - | Start integrity check |
|
||||
| `btrfs-balance` | - | Balance operation |
|
||||
| `btrfs-compress` | `btrc` | Compression stats |
|
||||
|
||||
### Maintenance
|
||||
|
||||
| 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.
|
||||
### Snapper Snapshots
|
||||
|
||||
| Command | Alias | Description |
|
||||
|---------|-------|-------------|
|
||||
| `snap-create "description"` | `snap` | Create snapshot with validation |
|
||||
| `snap-list [count]` | `snapls` | List recent snapshots (default: 10) |
|
||||
| `snap-show <number>` | `snapshow` | Show snapshot details |
|
||||
| `snap-delete <number>` | `snaprm` | Delete 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
|
||||
```
|
||||
| `snap-create "desc"` | `snap` | Create snapshot |
|
||||
| `snap-list` | `snapls` | List snapshots |
|
||||
| `snap-check` | `snapcheck` | Verify limine sync |
|
||||
| `sys-update` | - | Update with pre/post snapshot |
|
||||
|
||||
---
|
||||
|
||||
## 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.
|
||||
|
||||
```
|
||||
╭──────────────────────────────────────────╮
|
||||
│ ❯ 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
|
||||
### Quick Commands
|
||||
|
||||
| Command | Alias | Description |
|
||||
|---------|-------|-------------|
|
||||
| `bookmark <name> [path]` | `bm` | Save bookmark (default: current dir) |
|
||||
| `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 <name> [template]` | - | Create/attach workspace |
|
||||
| `tw-list` | `twl` | List active workspaces |
|
||||
| `tw-delete <name>` | `twd` | Delete workspace |
|
||||
| `tw-save <name>` | `tws` | Save current layout as template |
|
||||
| `tw-templates` | `twt` | List available templates |
|
||||
| `tw-template-edit <name>` | `twe` | Edit template |
|
||||
| `tw-sync` | - | Toggle pane synchronization |
|
||||
| `tw-rename <old> <new>` | - | Rename workspace |
|
||||
| `tw-templates` | `twt` | Show available templates |
|
||||
| `tw-save <name>` | `tws` | Save current layout |
|
||||
| `twf` | - | Fuzzy search workspaces |
|
||||
|
||||
### Built-in Templates
|
||||
|
||||
| Template | Description |
|
||||
|----------|-------------|
|
||||
| `dev` | Vim (50%) + terminal (25%) + logs (25%) |
|
||||
| `dev` | Editor (50%) + terminal + logs |
|
||||
| `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%) |
|
||||
| `full` | Single full-screen pane |
|
||||
| `review` | Side-by-side code review |
|
||||
| `review` | Side-by-side comparison |
|
||||
|
||||
---
|
||||
### 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 |
|
||||
|---------|-------|-------------|
|
||||
| `ssh-save <name> <user@host> [port] [key] [opts] [desc]` | `sshs` | Save profile |
|
||||
| `ssh-list` | `sshl` | List all profiles |
|
||||
| `ssh-connect <name>` | `sshc` | Connect (auto tmux) |
|
||||
| `ssh-delete <name>` | `sshd` | Delete profile |
|
||||
| `ssh-reconnect [name]` | `sshr` | Reconnect (default: last) |
|
||||
| `ssh-sync-dotfiles <name>` | `sshsync` | Deploy dotfiles to remote |
|
||||
| `sshf` | - | Fuzzy search and connect |
|
||||
| `txi <name>` | - | Start/attach project |
|
||||
| `txi-new <n> [tmpl]` | `txin` | Create project |
|
||||
| `txi-edit <name>` | `txie` | Edit YAML config |
|
||||
| `txi-list` | `txil` | List projects |
|
||||
| `txif` | - | Fuzzy search projects |
|
||||
|
||||
### Configuration
|
||||
**Templates:** `dev`, `ops`, `web`, `data`, `minimal`
|
||||
|
||||
In `dotfiles.conf`:
|
||||
|
||||
```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
|
||||
```
|
||||
The `tw` command auto-detects: running session → tmuxinator project → simple template.
|
||||
|
||||
---
|
||||
|
||||
## 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 |
|
||||
|---------|-------|-------------|
|
||||
| `py-new <name>` | `pynew` | Basic Python project |
|
||||
| `py-django <name>` | `pydjango` | Django web app |
|
||||
| `py-flask <name>` | `pyflask` | Flask web app |
|
||||
| `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
|
||||
```
|
||||
| `bookmark <name> [path]` | `bm` | Save bookmark |
|
||||
| `bookmark list` | `bm list` | List bookmarks |
|
||||
| `jump <name>` | `j` | Go to bookmark |
|
||||
|
||||
---
|
||||
|
||||
## Shell Analytics
|
||||
## Secrets Vault
|
||||
|
||||
Track command usage and get insights.
|
||||
Encrypted storage for API keys using `age` or `gpg`.
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `dfstats` | Full dashboard |
|
||||
| `dfstats top [n]` | Top N commands |
|
||||
| `dfstats suggest` | Alias suggestions |
|
||||
| `dfstats breakdown` | Category breakdown |
|
||||
| `dfstats heatmap` | Activity by hour |
|
||||
| `dfstats dirs` | Most visited directories |
|
||||
| `dfstats git` | Git command breakdown |
|
||||
| `dfstats export` | Export as JSON |
|
||||
| `vault init` | Initialize |
|
||||
| `vault set <key>` | Store secret |
|
||||
| `vault get <key>` | Retrieve secret |
|
||||
| `vault list` | List keys |
|
||||
| `vault shell` | Export to environment |
|
||||
|
||||
---
|
||||
|
||||
## 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
|
||||
|
||||
### Navigation
|
||||
|
||||
| Alias | Command |
|
||||
|-------|---------|
|
||||
| `..` | `cd ..` |
|
||||
| `...` | `cd ../..` |
|
||||
| `....` | `cd ../../..` |
|
||||
| `~` | `cd ~` |
|
||||
| `c.` | `cd ~/.dotfiles` |
|
||||
`..`, `...`, `....`, `~`, `c.` (dotfiles dir)
|
||||
|
||||
### Git
|
||||
|
||||
| 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` |
|
||||
`g`, `gs` (status), `ga` (add), `gc` (commit), `gp` (push), `gl` (pull), `gd` (diff), `gco` (checkout), `glog`
|
||||
|
||||
### Docker
|
||||
|
||||
| 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` |
|
||||
`d`, `dc` (compose), `dps`, `dpa`, `di` (images), `dex` (exec -it)
|
||||
|
||||
### Tools (conditional)
|
||||
|
||||
| Alias | Command | Condition |
|
||||
|-------|---------|-----------|
|
||||
| `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 |
|
||||
- `ls`/`ll`/`la`/`lt` → `eza` (if installed)
|
||||
- `cat` → `bat` (if installed)
|
||||
|
||||
---
|
||||
|
||||
## Zsh Theme Features
|
||||
## Zsh Theme
|
||||
|
||||
The `adlee` theme provides:
|
||||
|
||||
- **Two-line prompt** for clarity
|
||||
- **Git integration** with branch name and dirty indicator (`*`)
|
||||
- **Command timer** for commands taking >10 seconds
|
||||
- **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 |
|
||||
- Two-line prompt with git branch + dirty indicator
|
||||
- Command timer for commands >10s (color-coded by duration)
|
||||
- Package update count indicator
|
||||
- Root detection (red `#` vs blue `%`)
|
||||
|
||||
---
|
||||
|
||||
@@ -589,67 +248,41 @@ See [REFERENCE.md](REFERENCE.md) for complete Espanso reference.
|
||||
Edit `~/.dotfiles/dotfiles.conf`:
|
||||
|
||||
```bash
|
||||
# Identity
|
||||
USER_FULLNAME="Your Name"
|
||||
USER_EMAIL="you@example.com"
|
||||
USER_GITHUB="yourusername"
|
||||
|
||||
# MOTD
|
||||
ENABLE_MOTD="true"
|
||||
MOTD_STYLE="compact"
|
||||
# Display
|
||||
DF_WIDTH="74"
|
||||
MOTD_STYLE="compact" # compact, mini, full, none
|
||||
|
||||
# Features
|
||||
ENABLE_SMART_SUGGESTIONS="true"
|
||||
ENABLE_COMMAND_PALETTE="true"
|
||||
ENABLE_VAULT="true"
|
||||
DOTFILES_AUTO_SYNC_CHECK="true"
|
||||
|
||||
# Btrfs
|
||||
BTRFS_DEFAULT_MOUNT="/"
|
||||
|
||||
# Package Manager
|
||||
AUR_HELPER="auto" # paru, yay, or auto
|
||||
# Tmuxinator
|
||||
TMUXINATOR_ENABLED="auto"
|
||||
TW_PREFER_TMUXINATOR="true"
|
||||
```
|
||||
|
||||
### Local Overrides
|
||||
|
||||
Create `~/.zshrc.local` for machine-specific settings.
|
||||
|
||||
---
|
||||
|
||||
## Repository Structure
|
||||
|
||||
```
|
||||
~/.dotfiles/
|
||||
├── install.sh # Main installer
|
||||
├── dotfiles.conf # Central configuration
|
||||
├── bin/ # Scripts (symlinked to ~/.local/bin)
|
||||
│ ├── dotfiles-doctor.sh
|
||||
│ ├── dotfiles-sync.sh
|
||||
│ ├── dotfiles-update.sh
|
||||
│ ├── dotfiles-vault.sh
|
||||
│ ├── dotfiles-stats.sh
|
||||
│ ├── dotfiles-version.sh
|
||||
│ └── dotfiles-compile.sh
|
||||
├── install.sh # Installer
|
||||
├── dotfiles.conf # Configuration
|
||||
├── bin/ # Scripts → ~/.local/bin
|
||||
├── zsh/
|
||||
│ ├── .zshrc
|
||||
│ ├── aliases.zsh
|
||||
│ ├── lib/
|
||||
│ │ └── colors.zsh # Shared color definitions
|
||||
│ ├── themes/
|
||||
│ │ └── 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
|
||||
│ ├── lib/ # colors, config, utils, bootstrap
|
||||
│ ├── themes/adlee.zsh-theme
|
||||
│ └── functions/ # Feature modules
|
||||
├── vim/.vimrc
|
||||
├── tmux/.tmux.conf
|
||||
├── git/.gitconfig.template
|
||||
├── espanso/ # Text expansion
|
||||
├── setup/ # Setup scripts
|
||||
└── .tmux-templates/ # Workspace layouts
|
||||
```
|
||||
|
||||
@@ -659,7 +292,5 @@ AUR_HELPER="auto" # paru, yay, or auto
|
||||
|
||||
MIT – See [LICENSE](LICENSE)
|
||||
|
||||
---
|
||||
|
||||
**Author:** Aaron D. Lee
|
||||
**Repository:** https://github.com/adlee-was-taken/dotfiles
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user