Auto-sync from catchthesethighs

This commit is contained in:
adlee-was-taken
2025-12-21 23:44:28 -05:00
parent 54e243feaa
commit f6b04bf47d
15 changed files with 4307 additions and 2305 deletions

362
README.md
View File

@@ -1,9 +1,10 @@
# ADLee's Dotfiles
# ADLee's Dotfiles (Arch/CachyOS)
Personal configuration files for a fast, consistent dev environment across Linux/macOS.
Personal configuration files for a fast, productive dev environment on **Arch Linux** and **CachyOS**.
[![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/)
[![OS](https://img.shields.io/badge/OS-Arch%2FCachyOS-blue.svg)](https://archlinux.org/)
```
┌[alee@battlestation]─[~/.dotfiles ⎇ main]
@@ -16,26 +17,25 @@ Personal configuration files for a fast, consistent dev environment across Linux
|---------|-------------|
| **Setup Wizard** | Beautiful TUI installer with feature selection |
| **Dynamic MOTD** | System info on shell start (uptime, CPU, memory, updates) |
| **Zsh Theme** | Git status, command timer, root detection |
| **Zsh Theme** | Two-line prompt with git status, command timer, root detection |
| **Command Palette** | Raycast-style fuzzy launcher (Ctrl+Space) |
| **Smart Suggestions** | Typo correction + alias recommendations |
| **Shell Analytics** | Track command usage, get insights |
| **Secrets Vault** | Encrypted storage for API keys |
| **Password Managers** | Unified CLI for 1Password, LastPass, Bitwarden |
| **Dotfiles Sync** | Auto-sync across machines |
| **Espanso** | 100+ text expansion snippets |
| **Snapper** | Btrfs snapshot helpers (Arch/CachyOS) |
| **Shell Analytics** | Track command usage and get insights |
| **Secrets Vault** | Encrypted storage for API keys and sensitive data |
| **LastPass CLI** | Unified password manager integration |
| **Dotfiles Sync** | Keep configuration in sync across machines |
| **Snapper Integration** | Btrfs snapshot management with limine-snapper-sync |
| **Tmux Workspaces** | Project templates with pre-configured layouts |
| **SSH Manager** | Save and manage SSH connections with tmux integration |
## 🚀 Quick Start
### One-liner Install
```bash
curl -fsSL https://raw.githubusercontent.com/adlee-was-taken/dotfiles/main/install.sh | bash
git clone https://github.com/adlee-was-taken/dotfiles.git ~/.dotfiles && cd ~/.dotfiles && ./install.sh
```
### Interactive Wizard (Recommended)
```bash
git clone https://github.com/adlee-was-taken/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
@@ -43,45 +43,50 @@ cd ~/.dotfiles
```
### Standard Install
```bash
git clone https://github.com/adlee-was-taken/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
./install.sh
```
## 📋 System Requirements
- **OS:** Arch Linux or CachyOS
- **Editors:** Vim (required), Neovim (optional)
- **Password Manager:** LastPass
- **Shell:** Zsh (installed by script)
- **Package Manager:** Pacman (built-in)
## 📁 Repository Layout
```
dotfiles/
├── install.sh # Main installer
├── install.sh # Main installer script
├── dotfiles.conf # Central configuration
├── zsh/
│ ├── .zshrc # Shell config
│ ├── aliases.zsh # Dotfiles command aliases
│ ├── themes/adlee.zsh-theme
│ ├── .zshrc # Shell configuration
│ ├── aliases.zsh # Command aliases
│ ├── themes/adlee.zsh-theme # Prompt theme
│ └── functions/
│ ├── snapper.zsh # Btrfs snapshots
│ ├── smart-suggest.zsh # Typo correction
│ ├── command-palette.zsh
│ ├── motd.zsh # Dynamic MOTD
── password-manager.zsh
├── espanso/ # Text expansion
└── match/base.yml # 100+ snippets
├── bin/ # Core scripts (linked to ~/.local/bin)
│ ├── dotfiles-doctor.sh # Health checker
│ ├── dotfiles-sync.sh # Multi-machine sync
│ ├── dotfiles-stats.sh # Shell analytics
│ ├── dotfiles-update.sh # Update dotfiles
│ ├── dotfiles-vault.sh # Secrets manager
── dotfiles-version.sh # Version info
├── setup/ # Setup scripts (not linked)
├── setup-wizard.sh # TUI installer
── setup-espanso.sh # Espanso personalization
├── git/.gitconfig.template
├── vim/.vimrc
├── tmux/.tmux.conf
└── docs/
│ ├── command-palette.zsh # Ctrl+Space launcher
│ ├── motd.zsh # System info display
│ ├── smart-suggest.zsh # Typo correction
│ ├── password-manager.zsh # LastPass integration
── snapper.zsh # Btrfs snapshots
│ ├── ssh-manager.zsh # SSH profiles
├── tmux-workspaces.zsh # Workspace templates
│ └── python-templates.zsh # Python project scaffolding
├── vim/.vimrc # Vim configuration
├── nvim/ # Neovim configuration
├── tmux/.tmux.conf # Tmux configuration
├── git/.gitconfig.template # Git configuration template
└── bin/ # Scripts (symlinked to ~/.local/bin)
── dotfiles-doctor.sh # Health checker
├── dotfiles-sync.sh # Multi-machine sync
├── dotfiles-stats.sh # Shell analytics
── dotfiles-update.sh # Update dotfiles
├── dotfiles-vault.sh # Encrypted secrets manager
└── dotfiles-version.sh # Version info
```
## 🎮 Command Palette
@@ -100,17 +105,17 @@ Press **Ctrl+Space** or **Ctrl+P** to open the fuzzy command launcher:
╰──────────────────────────────────────────╯
```
**Searches:** aliases, functions, history, bookmarks, git commands, docker commands, quick actions
**Searches:** aliases, functions, recent commands, bookmarks, git commands, quick actions
**Keybindings:**
- `Enter` - Execute
- `Enter` - Execute command
- `Ctrl+E` - Edit before running
- `Ctrl+Y` - Copy to clipboard
### Directory Bookmarks
```bash
bookmark projects ~/projects # Save
bookmark projects ~/projects # Save bookmark
bookmark list # List all
jump projects # Go to bookmark
j # Fuzzy select
@@ -118,7 +123,7 @@ j # Fuzzy select
## 🔧 Smart Suggestions
Automatic typo correction:
Automatic typo correction for 100+ common mistakes:
```bash
$ gti status
@@ -130,26 +135,17 @@ $ dokcer ps
→ Did you mean: docker?
```
Alias recommendations:
Alias recommendations for frequently typed commands:
```bash
💡 Tip: You've typed 'docker-compose up -d' 15 times
Consider adding: alias dcu='docker-compose up -d'
```
Quick fix with `fuck`:
```bash
$ gti status
✗ Command not found: gti
$ fuck
Running: git status
💡 Tip: You've typed 'git status' 50 times
Consider adding: alias gs='git status'
```
## 📊 Shell Analytics
```bash
dotfiles-stats.sh
dotfiles-stats.sh # Full dashboard
# or use aliases:
dfstats
stats
@@ -169,20 +165,13 @@ stats
╚═══════════════════════════════════════════════════════════════════╝
```
```bash
dotfiles-stats.sh --suggest # Alias suggestions
dotfiles-stats.sh --heatmap # Activity by hour
dotfiles-stats.sh --git # Git breakdown
dotfiles-stats.sh --dirs # Most visited directories
```
## 🔐 Secrets Vault
Encrypted storage for API keys and tokens:
```bash
vault set GITHUB_TOKEN ghp_xxxxxxxxxxxx
vault set AWS_SECRET_KEY # Prompts (hidden input)
vault set AWS_SECRET_KEY # Prompts for hidden input
vault get GITHUB_TOKEN
vault list # Shows keys only
vault delete OLD_KEY
@@ -199,7 +188,7 @@ Uses `age` or `gpg` encryption. Secrets auto-load on shell start.
## 🔑 Password Manager Integration
Unified CLI for 1Password, LastPass, and Bitwarden:
LastPass CLI for unified password management:
```bash
pw list # List all items
@@ -211,114 +200,176 @@ pw search mail # Search items
pwf # Fuzzy search + copy (requires fzf)
```
Supports:
- **1Password** (`op`) - `INSTALL_1PASSWORD="true"`
- **LastPass** (`lpass`) - `INSTALL_LASTPASS="true"`
- **Bitwarden** (`bw`) - `INSTALL_BITWARDEN="true"`
### Install LastPass CLI
```bash
# Via AUR with paru (recommended)
paru -S lastpass-cli
# Or with yay
yay -S lastpass-cli
```
## 🖥️ Dynamic MOTD
System info displayed on shell start:
System info displayed on shell startup:
```
┌──────────────────────────────────────────────────────────────┐
│ ✦ alee@battlestation Mon Dec 15 14:30│
│ ✦ alee@battlestation Mon Dec 15 14:30
├──────────────────────────────────────────────────────────────┤
│ ▲ up:4d 7h ◆ cpu:12% ◇ mem:8.2/32G ⊡ 234G free
├──────────────────────────────────────────────────────────────┤
│ ◉4 containers ⎇2 dirty ↑3 updates ●dotfiles:✓ │
│ ▲ up:4d 7h ◆ load:0.45 ◇ mem:8.2/32G ⊡ 234G free │
└──────────────────────────────────────────────────────────────┘
```
Configure in `dotfiles.conf`:
Shows: uptime, load average, memory usage, disk space
**Configuration:**
```bash
ENABLE_MOTD="true"
MOTD_STYLE="compact" # compact, mini, or off
ENABLE_MOTD="true" # Enable MOTD
MOTD_STYLE="compact" # compact (box), mini (single line), or off
```
## 🔄 Dotfiles Sync
Keep dotfiles synchronized across machines:
```bash
dotfiles-sync.sh # Interactive sync
dotfiles-sync.sh --status # Show status
dotfiles-sync.sh --push # Push changes
dotfiles-sync.sh --pull # Pull changes
dotfiles-sync.sh --watch 300 # Auto-sync every 5 min
```
On shell start, you'll see:
```
⚠ Dotfiles: 3 update(s) available
Run: dotfiles-sync.sh --pull
```
## ⌨️ Espanso Snippets
All triggers use `..` prefix:
| Category | Examples |
|----------|----------|
| **Date/Time** | `..date` → 2025-12-15, `..ts` → ISO timestamp |
| **Git** | `..gstat`, `..gcm`, `..branch` (current branch) |
| **Docker** | `..dps`, `..dcup`, `..dlog` |
| **Symbols** | `..shrug` → ¯\\\_(ツ)\_/¯, `..check` → ✓ |
| **Code** | `..bash` → script template, `..python` → main template |
Full list: [docs/ESPANSO.md](docs/ESPANSO.md)
## 🎨 Theme Features
## 🎨 Zsh Theme
```
┌[user@hostname]─[~/projects ⎇ main *]
└%
```
- **Git integration** Branch name with dirty indicator (`*`)
- **Command timer** Shows elapsed time for commands >10s
- **Smart paths** Truncates long directories
- **Root detection** Red prompt for root, blue for users
**Features:**
- Two-line prompt for clarity
- Git integration (branch name with dirty indicator `*`)
- Command timer (shows elapsed time for commands >10s)
- Smart path truncation
- Root detection (red for root, blue for users)
## 🔄 Dotfiles Sync
Keep configuration synchronized across machines:
```bash
dotfiles-sync.sh # Interactive sync
dotfiles-sync.sh --status # Show sync status
dotfiles-sync.sh --push # Push changes
dotfiles-sync.sh --pull # Pull changes
dotfiles-sync.sh --watch 300 # Auto-sync every 5 min
```
On shell start, you'll see notifications of available updates.
## 📸 Snapper Integration
Btrfs snapshot management for Arch with limine bootloader:
```bash
snap-create "Before system update" # Create snapshot
snap-list 20 # List recent snapshots
snap-check-limine # Verify boot menu sync
snap-delete 42 # Delete snapshot
snap-validate-service # Check service status
```
Auto-syncs with `limine-snapper-sync` for boot menu entries.
**Install on CachyOS/Arch:**
```bash
paru -S limine-snapper-sync
sudo systemctl enable limine-snapper-sync.service
```
## 🎯 Tmux Workspace Manager
Pre-configured layouts for different workflows:
```bash
tw-create myproject dev # Create dev workspace
tw myproject # Quick attach or create
tw-list # List active workspaces
tw-save my-custom-layout # Save current layout as template
tw-sync # Toggle pane sync for multi-server
twf # Fuzzy search workspaces
```
**Available Templates:**
- `dev` - Vim (50%) + terminal (25%) + logs (25%)
- `ops` - 4-pane monitoring grid
- `ssh-multi` - 4 panes for multi-server management
- `debug` - 2 panes: main (70%) + helper (30%)
- `full` - Single full-screen pane
- `review` - Side-by-side code review panes
## 🌐 SSH Session Manager
Save and manage SSH connections with automatic tmux integration:
```bash
ssh-save prod user@prod.example.com 22 ~/.ssh/prod_key
ssh-connect prod # Auto-creates/attaches tmux session
ssh-list # List all profiles
sshf # Fuzzy search and connect
ssh-sync-dotfiles prod # Deploy dotfiles to remote
```
## 🐍 Python Project Templates
Quick project scaffolding with virtual environments:
```bash
py-new myproject # Basic Python project
py-django myblog # Django web app
py-flask myapp # Flask web app
py-fastapi myapi # FastAPI REST API
py-data analysis # Data science project
py-cli mytool # CLI tool with Click
```
All include virtual environment setup, git initialization, and project structure.
## ⌨️ Command Aliases
All dotfiles commands have convenient aliases:
| Alias | Command | Description |
|-------|---------|-------------|
| `dfd` | `dotfiles-doctor.sh` | Health check |
| `dffix` | `dotfiles-doctor.sh --fix` | Auto-fix issues |
| `dfs` | `dotfiles-sync.sh` | Sync dotfiles |
| `dfpush` | `dotfiles-sync.sh --push` | Push changes |
| `dfpull` | `dotfiles-sync.sh --pull` | Pull changes |
| `dfu` | `dotfiles-update.sh` | Update dotfiles |
| `dfv` | `dotfiles-version.sh` | Version info |
| `dfstats` | `dotfiles-stats.sh` | Shell analytics |
| `vault` | `dotfiles-vault.sh` | Secrets manager |
| `pw` | LastPass password manager | Get/list passwords |
| `tw` | Tmux workspace manager | Quick workspace access |
| `reload` | `source ~/.zshrc` | Reload shell config |
## 🩺 Health Check
```bash
dotfiles-doctor.sh # Run diagnostics
dotfiles-doctor.sh --fix # Auto-fix issues
dotfiles-doctor.sh # Run diagnostics
dotfiles-doctor.sh --fix # Auto-fix issues
# Aliases: dfd, doctor, dffix
```
```
━━━ Symlinks ━━━
✓ Symlink valid: .zshrc
✓ Symlink valid: .gitconfig
✓ Symlink valid: adlee.zsh-theme
━━━ Zsh Plugins ━━━
✓ Plugin installed: zsh-autosuggestions
✓ Plugin installed: zsh-syntax-highlighting
━━━ Summary ━━━
Passed: 12
Warnings: 1
Failed: 0
```
Checks: symlinks, zsh plugins, git config, optional tools, and more
## ⚙️ Configuration
All settings in `dotfiles.conf`:
Edit `~/.dotfiles/dotfiles.conf` to customize:
```bash
# Identity
USER_FULLNAME="Your Name"
USER_EMAIL="you@example.com"
GIT_USER_NAME="" # Falls back to USER_FULLNAME
USER_GITHUB="yourusername"
# Features
INSTALL_ZSH_PLUGINS="true"
INSTALL_FZF="ask"
INSTALL_ESPANSO="ask"
INSTALL_NEOVIM="ask"
SET_ZSH_DEFAULT="ask"
# Advanced
ENABLE_SMART_SUGGESTIONS="true"
@@ -337,32 +388,11 @@ dfupdate
```
Check version:
```bash
dotfiles-version.sh
# or: dfv
```
## 🎯 Command Aliases
All dotfiles commands have convenient aliases:
| Alias | Command | Description |
|-------|---------|-------------|
| `dfd` | `dotfiles-doctor.sh` | Health check |
| `dffix` | `dotfiles-doctor.sh --fix` | Auto-fix issues |
| `dfs` | `dotfiles-sync.sh` | Sync dotfiles |
| `dfpush` | `dotfiles-sync.sh --push` | Push changes |
| `dfpull` | `dotfiles-sync.sh --pull` | Pull changes |
| `dfu` | `dotfiles-update.sh` | Update dotfiles |
| `dfv` | `dotfiles-version.sh` | Version info |
| `dfstats` | `dotfiles-stats.sh` | Shell analytics |
| `dfcompile` | `dotfiles-compile.sh` | Compile zsh for speed |
| `vault` | `dotfiles-vault.sh` | Secrets manager |
| `reload` | `source ~/.zshrc` | Reload shell |
| `dfc` | `dotfiles-cli` | CLI with subcommands |
| `dotfiles` | `cd ~/.dotfiles` | Go to dotfiles dir |
## 🗑️ Uninstalling
```bash
@@ -372,26 +402,21 @@ All dotfiles commands have convenient aliases:
## 📚 Documentation
- [Setup Guide](docs/SETUP_GUIDE.md) - Detailed installation instructions
- [Espanso Reference](docs/ESPANSO.md) - All text expansion snippets
- [Snapper Guide](docs/SNAPPER.md) - Btrfs snapshot management
- [SETUP_GUIDE.md](docs/SETUP_GUIDE.md) - Detailed installation and configuration
- [ESPANSO.md](docs/ESPANSO.md) - Text expansion snippets reference
- [SNAPPER.md](docs/SNAPPER.md) - Btrfs snapshot management guide
- [SSH_TMUX_INTEGRATION.md](docs/SSH_TMUX_INTEGRATION.md) - SSH + Tmux workflow
## 🛠️ Install Options
```bash
./install.sh # Standard install
./install.sh --wizard # Interactive TUI
./install.sh --skip-deps # Skip dependency check
./install.sh --wizard # Interactive TUI wizard
./install.sh --skip-deps # Re-run without checking deps
./install.sh --uninstall # Remove symlinks
./install.sh --help # All options
./install.sh --help # Show all options
```
## 📋 Requirements
- **OS:** Linux (Ubuntu, Arch, Fedora) or macOS
- **Shell:** Zsh (installed automatically)
- **Optional:** fzf (for command palette), age/gpg (for vault)
## 🤝 Forking
1. Fork the repo
@@ -406,4 +431,5 @@ MIT See [LICENSE](LICENSE)
---
**Author:** Aaron D. Lee
**Repo:** https://github.com/adlee-was-taken/dotfiles
**Repository:** https://github.com/adlee-was-taken/dotfiles
**Arch/CachyOS Only Edition**