Help and docs
Sign in

grindlemire/dotfiles code browser

main 0375daa
markdown · 103 lines · 3.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# dotfiles

Personal shell configuration and utility scripts

## Setup

Place this repository in `~/dotfiles` and symlink the main configuration:

```bash
ln -s ~/dotfiles/zshrc.sh ~/.zshrc
ln -s ~/dotfiles/ghostty/config ~/.config/ghostty/config
```

## Configuration Files

### Core Shell Configuration

- **`zshrc.sh`** - Main zsh configuration with aliases, functions, and shell settings
- **`zprofile.sh`** - Sources local zprofile configuration for startup scripts

### Platform-Specific

- **`macbook.sh`** - macOS-specific settings including key remapping (Caps Lock → Escape)

### Utility Modules

- **`docker.sh`** - Docker and docker-compose shortcuts and utilities
- **`virtualenv.sh`** - Python virtual environment management
- **`worktree.sh`** - Git worktree utilities for managing multiple branches

### Terminal

- **`ghostty/config`** - Ghostty terminal configuration (theme, palette, font size)

### Claude Code Skills

- **`skills/`** - Personal Claude Code skills. Run `./skills/install.sh` to symlink each skill into `~/.claude/skills/`.

## Key Features

### Aliases & Shortcuts

- `ll`, `la`, `lt`, `lla` - Enhanced ls variations
- `cap` & `check` - Capture and check exit codes
- `lc` - Count lines in Go/templ files
- `to_gif` - Convert videos to GIF format

### Git Utilities

- `gcommit [message]` - Add all and commit (auto-timestamps if no message)
- `gpush/gpull [branch]` - Push/pull current or specified branch
- `gprune` - Delete merged branches (use `--dry` for preview)
- `grevert` - Hard reset to previous commit
- `grollback` - Revert last commit
- `clone <user/repo>` - Clone from GitHub
- `git_sign_init <key>` - Setup SSH commit signing

### Docker Shortcuts

- `dssh <container>` - SSH into container
- `dexec <container> <cmd>` - Execute command in container
- `dls`, `dstart`, `dstop`, `drm` - Container management
- `dlog <container>` - Follow container logs
- `dcup`, `dcstop`, `dcrm`, `dclog` - Docker Compose equivalents

### Python Virtual Environments

- `venv` - Create/activate Python 2 virtualenv
- `venv3` - Create/activate Python 3 virtualenv
- `vend` - Deactivate and restore PYTHONPATH

### Git Worktree Management

- `wt` - Unified worktree command (or use individual commands below)
- `wtc <branch>` - Create/switch to worktree (symlinks gitignored files automatically)
- `wtd [-f] [branch|path]` - Delete worktree (defaults to current, `-f` to force unmerged)
- `wtl [-v|-vv]` - List worktrees (`-v` for details, `-vv` to show symlinks)
- `wtp [-n] [-d] [-f]` - Prune merged and safe detached worktrees
- `cc [branch]` - Create worktree and launch Claude Code in it

**Symlink sync**: When creating a worktree, gitignored files (e.g., `.env`) are symlinked from the main worktree. Build artifacts like `node_modules`, `vendor`, `dist`, etc. are excluded by default.

**Custom exclusions**: Create `.wtignore` in repo root with patterns to exclude from symlinking:
```
# One pattern per line, supports globs
*.log
my-large-cache/
```

### Shell Enhancement

- Vi mode with custom cursor indicators
- Enhanced history search with ↑/↓ arrows
- Colored prompts showing user, directory, and git branch
- Terminal window title updates with current directory

### Custom Navigation

- `myip` - Show local IP address

## Environment Integration

The configuration automatically sources available modules and handles missing files gracefully. Create `local-zshrc.sh` for machine-specific settings that shouldn't be tracked in git.