Skip to content

woud420/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

73 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Dotfiles

Personal dotfiles for macOS and Linux with modular shell functions, git workflows, and kubectl shortcuts.

πŸš€ Quick Install

# Clone and install
git clone https://github.com/yourusername/dotfiles.git ~/workspace/projects/dotfiles
cd ~/workspace/projects/dotfiles
./install.sh

# Or use make
make install

Installation Options

./install.sh --minimal      # Minimal config for servers/containers
./install.sh --no-packages  # Skip package installation
./install.sh --dry-run      # Preview what will be installed

# Make targets
make install              # Full installation
make install-minimal      # Minimal config
make install-no-packages  # Config files only
make install-dry-run      # Preview changes

Remote Installation

# One-liner for remote servers
curl -fsSL https://raw.githubusercontent.com/yourusername/dotfiles/main/install.sh | bash -s -- --minimal

# SSH with dotfiles
ssh user@host 'bash -s' < install.sh --minimal

πŸ“ Directory Structure

dotfiles/
β”œβ”€β”€ common/                  # Cross-platform configurations
β”‚   β”œβ”€β”€ shell/              # Shell configs (.bashrc, .zshrc)
β”‚   β”œβ”€β”€ git/                # Git configuration
β”‚   β”œβ”€β”€ shell-functions/    # Modular functions & aliases
β”‚   └── themes/             # Color themes (Catppuccin)
β”œβ”€β”€ darwin/                 # macOS specific
β”‚   β”œβ”€β”€ Brewfile           # Homebrew packages
β”‚   └── kitty.conf         # macOS kitty config
β”œβ”€β”€ linux/                  # Linux specific
β”‚   β”œβ”€β”€ debian/            # Ubuntu/Debian packages
β”‚   β”œβ”€β”€ arch/              # Arch Linux packages
β”‚   β”œβ”€β”€ fedora/            # Fedora/RHEL packages
β”‚   └── alpine/            # Alpine Linux packages
└── install.sh             # Universal installer

πŸ”§ What Gets Installed

Configuration Files

File Installed Location Description
.bashrc ~/.bashrc Bash configuration with prompt, colors, functions
.zshrc ~/.zshrc Zsh configuration with Catppuccin theme
.bash_profile ~/.bash_profile Bash profile (sources .bashrc)
.bashrc.server ~/.bashrc Conservative bash config for servers (minimal mode)
.gitconfig ~/.gitconfig Git aliases and fuzzy commands
.gitignore_global ~/.config/git/ignore Global git ignores
.gnu_aliases ~/.gnu_aliases GNU coreutils aliases for macOS
.dircolors ~/.dircolors Directory colors
kitty.conf ~/.config/kitty/kitty.conf Kitty terminal config
htoprc ~/.config/htop/htoprc htop configuration

Shell Functions

All shell functions are installed to ~/.config/shell-functions/:

File Purpose Key Commands
kubectl-aliases.sh Kubernetes shortcuts k get p, kgpw, kdp, kshp
git-aliases.sh Git shortcuts g, gs, gaa, gcm, gp
git.sh Git workflow functions git-ch(), git-log(), git-add()
ssh.sh SSH helpers sshdot, sshconf, ssht
docker.sh Docker helpers dex, dlog, dclean
utils.sh Utilities mkcd, extract, backup
fuzzy-vim.sh Vim with fzf v (fuzzy file open)

Git Aliases (in .gitconfig)

git ch          # Fuzzy branch checkout with preview
git flog        # Interactive commit browser
git fadd        # Fuzzy file staging with diff preview
git llog        # Fuzzy search through commit history
git st          # status
git cm          # commit -m
git lg          # Pretty log with graph

Kubectl Aliases

# Quick shortcuts
k               # kubectl
kgp             # kubectl get pods
kgpw            # kubectl get pods -o wide
kdp             # kubectl describe pod
klf             # kubectl logs -f

# Functions
kshp <pattern>  # Shell into first pod matching pattern
klp <pattern>   # Logs from first pod matching pattern
kctx            # Switch context with fzf
kns             # Switch namespace with fzf

πŸ“¦ Packages

macOS (Homebrew)

Core tools: awscli, bash, coreutils, git, fzf, fd, ripgrep, htop, tree, wget Development: node, python, rust, poetry, virtualenv Kubernetes: kubernetes-cli, helm, k9s, eksctl, minikube Infrastructure: terraform, terraformer, tflint Apps: docker, docker-desktop, slack, spotify

Linux

Equivalent packages are automatically installed based on distribution:

  • Debian/Ubuntu: Via apt from linux/debian/packages.list
  • Arch/Manjaro: Via pacman from linux/arch/packages.list
  • Fedora/RHEL: Via dnf/yum from linux/fedora/packages.list
  • Alpine: Via apk from linux/alpine/packages.list

🎨 Features

Shell Prompt

  • Catppuccin Mocha color theme
  • Git branch and status indicators
  • Current directory with smart truncation
  • Kubernetes context awareness
  • Python virtual environment display

Example prompt:

⭐ [jm@~/projects/dotfiles] main βž”

Fuzzy Everything

  • File search: v to open files with vim
  • Git branches: git ch for interactive checkout
  • Git commits: git flog to browse history
  • Git staging: git fadd to stage files
  • Kubernetes: kctx/kns for context/namespace switching

GNU Tools on macOS

Automatically aliases GNU versions to replace BSD utilities:

  • ls β†’ gls with colors
  • grep β†’ ggrep
  • sed β†’ gsed
  • And more...

πŸ”’ Backup

The installer automatically backs up existing configs to:

~/.dotfiles-backup-YYYYMMDD_HHMMSS/

To clean old backups (30+ days):

make clean-backup

🐳 Container Usage

The installer auto-detects container environments and uses minimal mode:

# In a Docker container
./install.sh  # Automatically uses --minimal

βš™οΈ Environment Detection

The installer automatically detects:

  • OS: macOS, Linux (Ubuntu, Debian, Arch, Fedora, Alpine, etc.)
  • Environment: Local, SSH session, Docker container
  • Shell: Bash, Zsh
  • Available tools: Adjusts configs based on what's available

πŸ”§ Customization

Local Overrides

Create ~/.bashrc.local or ~/.zshrc.local for machine-specific configs.

Memory Management

The installer respects CLAUDE.md files for project-specific context.

πŸ“š Requirements

  • macOS: Homebrew (auto-installed if missing)
  • Linux: sudo access for package installation
  • All systems: Git, Bash 4+

πŸš‘ Troubleshooting

# Check what would be installed
./install.sh --dry-run

# Skip package installation
./install.sh --no-packages

# Force minimal mode
./install.sh --minimal

# View installer help
./install.sh --help

About

My dotfiles so I can carry them around ^^

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published