Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md
_ _ __ _ _ __
__/\__ _ __ (_) __ __ (_) / _| (_) ___ __| | _ \ \
\ / | '_ \| | \ \/ / | | | |_ | | / _ \ / _` | (_) | |
/_ _\ | | | || | > < | | | _| | | | __/ | (_| | _ | |
\/ |_| |_||_| /_/\_\|_| |_| |_| \___| \__,_| (_) | |
/_/
🐉 Personal shell environment that follows you everywhere
Prerequisites
Install these before running setup.sh:
zsh git curl vim tmux
⚡ Quickstart
git clone --recursive git@github.com:j4hangir/nix.git ~/nix cd ~/nix ./setup.sh
That's it. setup.sh handles everything in one run:
📦 What's Inside
🐚 Zsh
- 1M line history with aggressive dedup, cross-session sharing, and instant append
- Auto CD — type a directory name to
cdinto it - Smart completion — case-insensitive globbing, rehash on every completion
- Plugins — syntax highlighting, autosuggestions, git, npm, pip, ruby, and more
✏️ Vim
- Murphy colorscheme on 256 colors
- 2-space indentation, smart case search
j/kmove by visual lines- Restore cursor position on reopen
- Modelines disabled for security
🖥️ Tmux
- Prefix:
Ctrl-U - Dvorak-optimized pane navigation —
h/t/n/s - Vi copy mode via
cb(pbcopy / wl-copy / xclip / xsel / OSC 52) - Mouse support,
|and-to split, 30k line scrollback Shift-Hto toggle pane logging- Plugins: tmux-fingers (hint-based copy, prefix +
h) and tmux-jump (EasyMotion-style cursor jumps, prefix +i)
🛠️ Scripts
All live in scripts/ and are added to $PATH automatically.
| Script | Description |
|---|---|
dh | Delete history entries matching a pattern |
urlencode | RFC 1738 URL encoding |
mrtorrent | Convert magnet URIs to .torrent files |
on_wifi_change | Auto-toggle proxy based on WiFi SSID |
Smaller utilities (trim, ssh-fingerprint, mklink, adbscrshot) are inlined as functions in aliases.zsh.
🧰 Aliases & Functions
📂 Navigation
.. ... .... ..... — quick upward navigation
cdl <dir> — cd + ls
mkpu <dir> — mkdir -p + pushd
pu / po — pushd / popd
🔍 Search & Process
pf <query> — ps aux | grep
opf [filter] — open ports (netstat)
hick <query> — search history with rg
srch <name> — mdfind wrapper (macOS)
📁 Files & Compression
gz <file> — compress with pigz
ftar <name> <path> — create .tar.gz with pigz
dush [path] — human-readable disk usage
getchmod <file> — show numeric permissions
🌐 Network
getip [host] — show public IP or resolve hostname
proxytoggle [on|off] — toggle SOCKS proxy per interface
dl <url> — download with axel (10 threads)
✨ Misc
nalias [-d desc] <name> <cmd> — create persistent aliases
substitute <from> <to> — find-and-replace across files
takeover — detach all other tmux sessions
🏗️ Architecture
~/.zshrc
└── init.sh ← entrypoint
├── envs.sh ← exports ($NIXDIR, $EDITOR, $LESS)
├── aliases.zsh ← aliases & functions
├── iTerm2-ssh.zsh ← iTerm2 tab colors for SSH
├── vendor/antigen.zsh ← plugin manager (vendored)
├── antigen bundles ← 19 plugins loaded
└── configs/zshrc ← zsh options, completions, keybindings
configs/ → tool configs (zshrc, vimrc, tmux.conf, screenrc, ripgreprc, …)
scripts/ → added to $PATH (standalone executables)
utils/ → helper scripts sourced by other files
tmux/ → dvorak.tmux.conf (sourced by configs/tmux.conf)
vendor/ → third-party files (antigen)
OS detection happens in utils/os_detect.sh and is stored in $os. Many aliases and functions branch on it for platform-specific behavior.
🖥️ Platform Support
| macOS | Linux | FreeBSD | |
|---|---|---|---|
| Core shell | ✅ | ✅ | ✅ |
| Aliases | ✅ | ✅ | ✅ |
Spotlight search (srch) | ✅ | — | — |
| Proxy toggle | ✅ | — | — |
🔧 Environment Variables
| Variable | Purpose |
|---|---|
$NIXDIR | Absolute path to this repo at runtime |
$NOTIVE_AUTH | Auth token for the notive push service |
🙌 Credits
Built and maintained by j4hangir.
📜 License
Personal dotfiles — use whatever you find useful.