_ _ __ _ _ __
__/\__ _ __ (_) __ __ (_) / _| (_) ___ __| | _ \ \
\ / | '_ \| | \ \/ / | | | |_ | | / _ \ / _` | (_) | |
/_ _\ | | | || | > < | | | _| | | | __/ | (_| | _ | |
\/ |_| |_||_| /_/\_\|_| |_| |_| \___| \__,_| (_) | |
/_/
π Personal shell environment that follows you everywhere
Install these before running setup.sh:
zsh git curl vim tmux
git clone --recursive git@github.com:j4hangir/nix.git ~/nix
cd ~/nix
./setup.shThat's it. setup.sh handles everything in one run:
- 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
- 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
- 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)
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.
π 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
~/.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.
| macOS | Linux | FreeBSD | |
|---|---|---|---|
| Core shell | β | β | β |
| Aliases | β | β | β |
Spotlight search (srch) |
β | β | β |
| Proxy toggle | β | β | β |
| Variable | Purpose |
|---|---|
$NIXDIR |
Absolute path to this repo at runtime |
$NOTIVE_AUTH |
Auth token for the notive push service |
Built and maintained by j4hangir.
Personal dotfiles β use whatever you find useful.