plaintext.brennan.day

Brennan's Comfy Dotfiles

| 502 words
ORIGINAL: https://brennan.day/dotfiles/

A collection of dotfiles for macOS that make your terminal experience comfortable, productive, and visually pleasing with a consistent Moonflower theme.

Features: Moonflower colours • Starship prompt • Productive shell • Sleep hang fix • Git config • Micro editor • Tmux setup • One-click install

Download dotfiles.zip

What's Included

Shell Environment

Git Configuration

Editor & Tools

System Optimization

Sleep Hang Fix

Quick Installation

# Extract the zip file
unzip dotfiles.zip
cd dotfiles

# Run the installer
./install.sh

# Restart your terminal
source ~/.zshrc

The installer will:

Essential Shortcuts

ll          # List files in detail (using eza)
la          # List all files including hidden
mkcd <dir>  # Create and enter directory
..          # Go up one directory
...         # Go up two directories

Git Workflow

gst         # Git status: short format
glog        # Git log with graph
ga          # Git add
gcmsg "msg" # Git commit with message
gp          # Git push
gl          # Git pull
gco <branch> # Checkout branch

Development

nr dev      # npm run dev
nrb         # npm run build
yarn start  # Start with yarn
serve       # Start HTTP server in current directory

Utilities

weather     # Show weather forecast
myip        # Show public IP address
localip     # Show local IP address
speedtest   # Test internet speed
extract file.zip # Extract any archive

Theme Preview

The dotfiles use the Moonflower color scheme from brennan.day throughout:

Terminal Welcome

Every new terminal session shows:

Starship Prompt

A clean prompt showing:

File Structure

dotfiles/
├── .zshrc                     # Zsh configuration
├── .gitconfig                 # Git configuration  
├── .tmux.conf                 # Tmux configuration
├── .micro/
│   └── settings.json          # Micro editor settings
├── .npmrc                     # NPM configuration
├── .nvmrc                     # Default Node.js version
├── starship.toml              # Starship prompt configuration
├── welcome.sh                 # Terminal welcome script
├── fix-sleep-hangs.sh         # Auto-fix for post-sleep hangs
├── com.user.fix-sleep-hangs.plist # LaunchAgent config
├── fix-sleep-hangs-sudoers    # Sudo permissions
├── Brewfile                   # Homebrew packages
├── macos-defaults.sh          # macOS system defaults
├── install.sh                 # Installation script
└── README.md                  # Documentation

Sleep Hang Fix Setup

The dotfiles include an automatic fix for terminal hangs after waking from sleep. To enable:

# Install the LaunchAgent
cp ~/dotfiles/com.user.fix-sleep-hangs.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/com.user.fix-sleep-hangs.plist

# Set up passwordless sudo for DNS flush
sudo cp ~/dotfiles/fix-sleep-hangs-sudoers /etc/sudoers.d/fix-sleep-hangs
sudo chmod 0440 /etc/sudoers.d/fix-sleep-hangs

Or run manually after waking: ~/dotfiles/fix-sleep-hangs.sh

Customization

Adding Personal Configs

Create a .zshrc.local file for personal customizations:

# ~/.zshrc.local
alias myproject="cd ~/Development/myproject"
export MY_VAR="value"

Starship Prompt

Edit ~/.config/starship.toml to customize the prompt appearance.

Micro Editor

Add plugins or modify settings in ~/.config/micro/settings.json.

Requirements

Manual Setup

If you prefer manual installation:

# Create symlinks
ln -s ~/dotfiles/.zshrc ~/.zshrc
ln -s ~/dotfiles/.gitconfig ~/.gitconfig
ln -s ~/dotfiles/.tmux.conf ~/.tmux.conf
ln -s ~/dotfiles/.micro ~/.micro
ln -s ~/dotfiles/.npmrc ~/.npmrc
ln -s ~/dotfiles/.nvmrc ~/.nvmrc
ln -s ~/dotfiles/starship.toml ~/.config/starship.toml

# Install Homebrew packages
brew bundle --file ~/dotfiles/Brewfile

# Apply macOS defaults
bash ~/dotfiles/macos-defaults.sh

Contributing

Found a bug or have a suggestion?

License

AGPL License. Feel free to use these dotfiles as a base for your own setup.

Pro Tip: After installation, set your terminal font to Fira Code, JetBrains Mono, or Hack Nerd Font for the best experience! The Starship prompt works with any font, but these look great.