Skip to content

ismailrohaga/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏠 Dotfiles

My personal macOS dotfiles and configuration setup.

πŸ“ Structure

β”œβ”€β”€ aerospace/          # AeroSpace window manager config
β”‚   └── .aerospace.toml
β”œβ”€β”€ config/             # XDG config directory contents
β”‚   β”œβ”€β”€ sketchybar/     # SketchyBar status bar
β”‚   β”œβ”€β”€ nvim/           # Neovim configuration
β”‚   β”œβ”€β”€ fish/           # Fish shell config
β”‚   β”œβ”€β”€ wezterm/        # WezTerm terminal config
β”‚   └── btop/           # Btop system monitor
β”œβ”€β”€ shell/              # Shell configuration files
β”‚   β”œβ”€β”€ .zshrc
β”‚   β”œβ”€β”€ .zprofile
β”‚   └── .profile
└── install.sh          # Installation script

⚑ Features

  • πŸͺŸ AeroSpace: Tiling window manager with workspace management
  • πŸ“Š SketchyBar: Highly customizable status bar with workspace indicators
  • 🐟 Fish Shell: Modern shell with autocompletion and syntax highlighting
  • πŸ“ Neovim: Extensive editor configuration
  • πŸ’» WezTerm: GPU-accelerated terminal emulator
  • πŸ“ˆ Btop: Beautiful system monitor

πŸš€ Installation

Prerequisites

Make sure you have the following installed:

Required Dependencies:

Optional Dependencies:

  • pyenv - Python version management
  • nvm - Node.js version management
  • fzf - Fuzzy finder
  • btop - System monitor

Quick Install All Dependencies:

# Install Homebrew first
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install main dependencies
brew install --cask aerospace sketchybar wezterm
brew install fish neovim fzf btop

# Install development tools
brew install pyenv nvm

# Install Oh My Zsh (for zsh configuration)
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

# Install zsh-autosuggestions plugin
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

Quick Setup

  1. Clone this repository:

    git clone https://github.com/ismailrohaga/dotfiles.git ~/.dotfiles
    cd ~/.dotfiles
  2. Run the install script:

    ./install.sh

Manual Installation

If you prefer to install manually:

# Backup existing configs
cp ~/.aerospace.toml ~/.aerospace.toml.backup 2>/dev/null || true
cp ~/.zshrc ~/.zshrc.backup 2>/dev/null || true

# Create symlinks
ln -sf ~/.dotfiles/aerospace/.aerospace.toml ~/.aerospace.toml
ln -sf ~/.dotfiles/shell/.zshrc ~/.zshrc
ln -sf ~/.dotfiles/shell/.zprofile ~/.zprofile
ln -sf ~/.dotfiles/shell/.profile ~/.profile

# Config directory symlinks
mkdir -p ~/.config
ln -sf ~/.dotfiles/config/sketchybar ~/.config/sketchybar
ln -sf ~/.dotfiles/config/nvim ~/.config/nvim
ln -sf ~/.dotfiles/config/fish ~/.config/fish
ln -sf ~/.dotfiles/config/wezterm ~/.config/wezterm
ln -sf ~/.dotfiles/config/btop ~/.config/btop

πŸ”— How Symlinks Work

This is the magic of dotfiles! Instead of copying files, we create symbolic links (symlinks) that point from your system's expected config locations to your dotfiles repository.

What happens when you run ./install.sh:

# Instead of copying files like this:
cp ~/.dotfiles/shell/.zshrc ~/.zshrc

# We create symlinks like this:
ln -sf ~/.dotfiles/shell/.zshrc ~/.zshrc

🎯 The Benefits:

  • βœ… Single source of truth: All configs live in ~/.dotfiles/
  • βœ… Automatic sync: Edit in ~/.dotfiles/, changes apply instantly
  • βœ… Version control: Track all changes with git
  • βœ… Easy backup: Push to GitHub, pull on any machine

πŸ” Example Workflow:

# Edit your shell config
nvim ~/.dotfiles/shell/.zshrc

# Changes are immediately active because ~/.zshrc β†’ ~/.dotfiles/shell/.zshrc
source ~/.zshrc

# Commit your changes
cd ~/.dotfiles
git add shell/.zshrc
git commit -m "Update shell aliases"
git push

πŸ“ Symlink Map:

~/.zshrc                    β†’ ~/.dotfiles/shell/.zshrc
~/.aerospace.toml           β†’ ~/.dotfiles/aerospace/.aerospace.toml
~/.config/sketchybar/       β†’ ~/.dotfiles/config/sketchybar/
~/.config/nvim/             β†’ ~/.dotfiles/config/nvim/
~/.config/fish/             β†’ ~/.dotfiles/config/fish/
~/.config/wezterm/          β†’ ~/.dotfiles/config/wezterm/
~/.config/btop/             β†’ ~/.dotfiles/config/btop/

πŸ” Secure API Key Management

Your API keys are now safely managed! Instead of hardcoding sensitive information in your dotfiles, we use a separate secrets file.

πŸ” How It Works:

# Your .zshrc loads secrets from a separate file
[ -f ~/.config/env/secrets.sh ] && source ~/.config/env/secrets.sh

πŸ“ Secrets File Location:

~/.config/env/secrets.sh  # Your private API keys (NOT in git)

πŸ› οΈ Managing Your API Keys:

# Edit your secrets file
nvim ~/.config/env/secrets.sh

# Example content:
#!/bin/bash
export ANTHROPIC_API_KEY="your-anthropic-key-here"
export OPENAI_API_KEY="your-openai-key-here"
export GITHUB_TOKEN="your-github-token-here"

πŸ”’ Security Features:

  • βœ… Secure permissions (600) - only you can read/write
  • βœ… Not tracked by git - added to .gitignore
  • βœ… Automatic loading - sourced by shell configuration
  • βœ… Separate from dotfiles - no accidental commits

⚠️ Important Notes:

  • Never commit secrets to version control
  • Backup your secrets file separately and securely
  • Use environment variables for all sensitive data
  • Regenerate keys if accidentally exposed

πŸ”§ Configuration Highlights

AeroSpace + SketchyBar Integration

The setup includes a seamless integration between AeroSpace and SketchyBar:

  • Workspace indicators automatically highlight the active workspace
  • Dynamic workspace creation based on AeroSpace configuration
  • Smooth transitions and visual feedback

Key Features:

  • Auto-highlighting: Current workspace is visually distinguished
  • Click to switch: Click workspace numbers to switch
  • Dynamic updates: Real-time updates when switching workspaces

πŸ”„ Keeping Up to Date

To update your dotfiles:

cd ~/.dotfiles
git pull origin main

πŸ› οΈ How to Configure/Update

1. Edit Configuration Files

# Edit AeroSpace configuration
nvim ~/.dotfiles/aerospace/.aerospace.toml

# Edit SketchyBar configuration
nvim ~/.dotfiles/config/sketchybar/sketchybarrc

# Edit Shell configuration
nvim ~/.dotfiles/shell/.zshrc

2. Test Your Changes

After making changes, test them:

# Reload AeroSpace
aerospace reload-config

# Reload SketchyBar
sketchybar --reload

# Reload Shell
source ~/.zshrc

3. Commit and Push Changes

cd ~/.dotfiles
git add .
git commit -m "Update configuration"
git push origin main

πŸ“ Customization

Feel free to customize the configurations to your needs:

Key Files to Customize:

  • aerospace/.aerospace.toml - Window manager behavior
  • config/sketchybar/colors.sh - Color scheme
  • config/sketchybar/sketchybarrc - Status bar layout
  • shell/.zshrc - Shell aliases and functions

🚨 Troubleshooting

Common Issues and Solutions:

"Command not found" errors:

# Install missing dependencies
brew install --cask aerospace sketchybar wezterm
brew install fish neovim fzf btop pyenv nvm

Permission denied errors:

# Run the install script to fix permissions
cd ~/.dotfiles && ./install.sh

SketchyBar not loading:

# Check if SketchyBar is running
brew services restart sketchybar

# Check permissions
chmod +x ~/.config/sketchybar/sketchybarrc
chmod +x ~/.config/sketchybar/plugins/*.sh

AeroSpace not working:

# Restart AeroSpace
aerospace reload-config

Fish shell not found:

# Install fish and add to shells
brew install fish
echo $(which fish) | sudo tee -a /etc/shells
chsh -s $(which fish)

API keys not loading:

# Check if secrets file exists and has proper permissions
ls -la ~/.config/env/secrets.sh
# Should show: -rw------- (600 permissions)

# If not, fix permissions:
chmod 600 ~/.config/env/secrets.sh

Getting Help:

🀝 Contributing

If you find bugs or have improvements, feel free to open an issue or PR!

πŸ“„ License

MIT License - feel free to use and modify as needed.


Note: These dotfiles are tailored for macOS. Some configurations may not work on other operating systems.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •