Personal configuration files for macOS (Apple Silicon), optimized for DevOps and cloud engineering workflows.
.zshrc- Zsh shell configuration with Oh My Zsh framework.tmux.conf- Tmux terminal multiplexer configurationghostty/config- Ghostty terminal emulator configuration (tmux alternative).env.tpl- 1Password secret references (safe to commit, no actual secrets).gitignore- Git ignore rules
- Framework: Oh My Zsh with
robbyrusselltheme - Version Managers: rbenv, pyenv, direnv
- Node.js: Volta (primary), npm-global
- Python: pixi, micromamba (conda environments via
.conda_config) - Plugins: git, brew, gem, aws, docker, golang, tmux, kubectl, kubetail, kube-ps1, terraform
- Cloud Tools: Google Cloud SDK, AWS CLI
- Kubernetes: kubectl, stern, kube-ps1 for context display in prompt
- Developer Tools:
- GitHub CLI (gh) with interactive PR checkout via peco
- Peco for interactive filtering and selection
- GHQ for repository management
- Hub for GitHub operations
- Custom Aliases:
p: Navigate to projects using ghq + pecob: Browse GitHub repository using hub + pecov: Open project in VS Code using ghq + pecoc: Open project in Cursor using ghq + pecoge: Open Emacs in GhosttyC: Pipe output to clipboard (pbcopy)- Safety aliases:
rm -i,cp -i,mv -i,mkdir -p
- Enhanced Features:
- Syntax highlighting and autosuggestions
- 1M entry command history with deduplication and timestamp
- Case-insensitive completion matching
- Auto-cd by directory name
- Japanese file name support
- Emacs-style keybindings
- Docker CLI completions
- Prefix:
Ctrl-T(instead of default Ctrl-B) - Default Shell: Zsh
- Mouse Support: Enabled with scroll wheel
- Clipboard: macOS integration via
reattach-to-user-namespace - Key Bindings:
Ctrl-T: Next windowv: Vertical splith: Horizontal splitShift+Arrow: Navigate panesPrefix + r: Reload config
- History: 5000 lines
- Copy/Paste: Ctrl-C/Ctrl-V for clipboard operations
- Plugins (via TPM):
- tmux-resurrect (session save/restore)
- tmux-continuum (auto-save every 15 min)
Modern GPU-accelerated terminal emulator with native multiplexing (alternative to tmux):
- Default Shell: Zsh with native shell integration
- Mouse Support: Enabled with native clipboard integration
- Prefix Key:
Ctrl+T(matching tmux configuration) - Key Bindings (chord-based like tmux):
- Split Management:
Ctrl+T > H: Split leftCtrl+T > J: Split downCtrl+T > K: Split upCtrl+T > L: Split rightCtrl+T > F: Toggle split zoom (maximize/restore)Ctrl+T > O: Cycle through splitsCtrl+T > Space: Equalize split sizes
- Navigation:
Shift+Arrow Keys: Quick navigation between splitsCtrl+T > Arrow Keys: Navigate between splits (prefix style)
- Tab Management:
Ctrl+T > N: Next tabCtrl+T > P: Previous tabCtrl+T > C: Create new tab
- Clipboard:
Ctrl+T > Shift+C: Copy to clipboardCtrl+T > V: Paste from clipboard
- Scrollback Navigation (emacs-style, prefix-based):
Ctrl+T > Ctrl+N: Scroll down one lineCtrl+T > Ctrl+P: Scroll up one lineCtrl+T > Ctrl+V: Page downCtrl+T > Alt+V: Page upCtrl+T > Alt+<: Scroll to topCtrl+T > Alt+>: Scroll to bottom
- Other:
Ctrl+T > Alt+X: Command paletteCtrl+T > R: Reload configuration
- Split Management:
- Scrollback: 100,000 lines
- Terminal: 256 color support (xterm-256color)
- Font: Monaco, 12pt (ligatures disabled)
- Features: GPU-accelerated rendering, native split panes, auto-update checks
Secrets are managed via 1Password CLI (op) using a template-based approach with caching:
.env.tplcontainsop://references (no actual secrets) — safe to commit- At shell startup,
op injectresolves references and caches the result to~/.cache/op_env_cache - Cache auto-refreshes every 24 hours — Touch ID is only prompted once per day
- Cache is created with
umask 077(owner-only permissions) and cleaned up on shell exit viaEXITtrap - Run
op-reloadto manually refresh secrets at any time
- Store the secret in 1Password (vault:
Private, account:my.1password.com) - Add a line to
.env.tpl:export MY_SECRET={{ op://Private/item-name/password }} - Refresh secrets:
op-reload(orsource ~/.zshrcafter cache expires)
op item list --account=my.1password.com | grep -i <keyword>
op item get "<item-name>" --account=my.1password.com- gitleaks scans staged changes for accidental secret commits
- Install:
brew install gitleaks
# Terminal emulator and multiplexer
brew install ghostty # Modern GPU-accelerated terminal (tmux alternative)
brew install tmux # Traditional terminal multiplexer
brew install peco
brew install reattach-to-user-namespace
# Version managers
brew install rbenv
brew install pyenv
brew install direnv
brew install pixi
# Node.js (Volta)
curl https://get.volta.sh | bash
# Git and GitHub tools
brew install ghq
brew install hub
# Kubernetes tools
brew install stern
brew install kube-ps1
# Programming languages
brew install go
brew install openjdk
# Database clients
brew install postgresql@17
brew install mysql-client
# GNU utilities
brew install gnu-sed
brew install coreutils
# Secret management
brew install --cask 1password-cli
brew install gitleaks
# Google Cloud SDK (via Cask)
brew install --cask google-cloud-sdk# Zsh syntax highlighting
brew install zsh-syntax-highlighting
# Zsh autosuggestions
brew install zsh-autosuggestions- Clone this repository:
git clone https://github.com/nsega/dotfiles.git ~/dotfiles
cd ~/dotfiles- Backup existing configurations (if any):
mv ~/.zshrc ~/.zshrc.backup
mv ~/.tmux.conf ~/.tmux.conf.backup- Create symlinks:
ln -s ~/dotfiles/.zshrc ~/.zshrc
ln -s ~/dotfiles/.tmux.conf ~/.tmux.conf
# For Ghostty configuration
mkdir -p ~/.config/ghostty
ln -sf ~/dotfiles/ghostty/config ~/.config/ghostty/config- Install Oh My Zsh (if not already installed):
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"-
Install required dependencies (see Requirements section)
-
Reload your shell:
source ~/.zshrcInteractive PR Checkout:
- Press
Ctrl-G Ctrl-Pto interactively select and checkout a GitHub pull request using peco
Project Navigation:
- Use
palias to navigate to projects managed by ghq (uses peco for selection) - Use
balias to browse GitHub repositories in your browser - Use
valias to open projects in VS Code - Use
calias to open projects in Cursor
Kubernetes Context:
- Current kubectl context displayed in prompt via kube-ps1
Other Shortcuts:
Ctrl-R: History search with pattern matching| C: Pipe command output to clipboard- Tab completion works case-insensitively
Basic Operations:
- Start tmux:
tmux - New session:
tmux new -s <name> - Attach session:
tmux attach -t <name> - List sessions:
tmux ls
Window Management:
Ctrl-T c: Create new windowCtrl-T: Next windowCtrl-T n: Next windowCtrl-T p: Previous window
Pane Management:
Ctrl-T v: Vertical splitCtrl-T h: Horizontal splitShift+Arrow: Navigate between panes
Getting Started:
- Launch Ghostty from Applications or via
ghosttycommand - Configuration loads automatically from
~/.config/ghostty/config
Split Management:
Ctrl+T > H/J/K/L: Create splits left/down/up/right (vim-style)Shift+Arrow Keys: Quick navigation between splitsCtrl+T > Arrow Keys: Navigate between splits (prefix style)Ctrl+T > F: Toggle split zoom (maximize/restore current split)Ctrl+T > O: Cycle through splitsCtrl+T > Space: Equalize split sizes- Mouse click to focus a split
Tab Management:
Ctrl+T > N: Switch to next tabCtrl+T > P: Switch to previous tabCtrl+T > C: Create new tab- Mouse click on tab bar to switch tabs
Clipboard Operations:
Ctrl+T > Shift+C: Copy selected text to clipboardCtrl+T > V: Paste from clipboard- Native macOS clipboard integration (no reattach-to-user-namespace needed)
Scrollback Navigation (emacs-style):
Ctrl+T > Ctrl+N/P: Scroll down/up one lineCtrl+T > Ctrl+V: Page downCtrl+T > Alt+V: Page upCtrl+T > Alt+</Alt+>: Jump to top/bottom
Configuration:
Ctrl+T > R: Reload configuration without restartingCtrl+T > Alt+X: Open command palette- Edit
~/dotfiles/ghostty/configto customize settings - Changes take effect immediately after reload
Note: The > symbol indicates a chord sequence - press Ctrl+T, release, then press the next key (similar to tmux prefix behavior)
Benefits over tmux:
- GPU-accelerated rendering for better performance
- Native split panes without separate multiplexer process
- Direct clipboard integration without additional tools
- Modern UI with mouse support out of the box
The .zshrc configures the following environment variables:
- GOPATH: Set to
$HOME - GOROOT: Points to Homebrew Go installation
- GOMODCACHE: Set to
$GOPATH/pkg/mod - GOTOOLCHAIN: Set to
auto - VOLTA_HOME: Set to
$HOME/.volta - CLOUDSDK_PYTHON: Uses pyenv Python 3
- GPG_TTY: Configured for GPG signing
- EDITOR: Set to
/usr/bin/vi - LANG: Set to
en_US.UTF-8
- History: 1,000,000 entries with timestamp format
mm/dd/yyyy - Oh My Zsh Updates: Every 13 days
- Completion: Waiting dots enabled, case-insensitive matching
- Behavior: Auto-cd, auto-pushd, share history across sessions
The configuration adds the following to PATH:
/opt/homebrew/binand/opt/homebrew/sbin/opt/homebrew/opt/openjdk/bin(Java)/opt/homebrew/opt/openjdk@11/bin(Java 11)/opt/homebrew/opt/postgresql@17/bin(PostgreSQL)/opt/homebrew/opt/mysql-client/bin(MySQL)/opt/homebrew/opt/gnu-sed/libexec/gnubin(GNU sed)/opt/homebrew/opt/coreutils/libexec/gnubin(GNU coreutils)$HOME/.krew/bin(kubectl plugins)$HOME/.volta/bin(Volta / Node.js)$HOME/.pixi/bin(pixi)$HOME/.npm-global/bin(npm global packages)$HOME/.pyenv/shims/python(Python)
Feel free to fork and customize these configurations for your own needs:
- Modify the theme in
.zshrcby changingZSH_THEME - Add/remove Oh My Zsh plugins in the
pluginsarray - Adjust tmux prefix key in
.tmux.conf - Customize Ghostty appearance and behavior in
ghostty/config:- Change
font-familyandfont-sizefor different fonts - Modify
themefor different color schemes - Adjust keybindings to match your workflow
- Configure
background-opacityfor transparency effects
- Change
- Add your own aliases and functions to
.zshrc - Add secrets to
.env.tplusing 1Passwordop://references
Personal configuration files - use at your own discretion.
nsega