Skip to content

antosubash/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

50 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Dotfiles

A comprehensive cross-platform development environment setup with automated installation, themes, and update management.

πŸš€ Quick Start

1. Clone Repository

git clone https://github.com/antosubash/dotfiles ~/dotfiles

2. Run Installation

cd ~/dotfiles
./install.sh

On Windows, the equivalent symlink installer is:

pwsh -ExecutionPolicy Bypass -File .\install.ps1

3. Set Up Development Environment

macOS

./scripts/setup-macos.sh

Ubuntu/Linux

./scripts/setup-ubuntu.sh

Ubuntu Server (headless)

./scripts/setup-server.sh

Windows

# From an elevated PowerShell 7+ session:
pwsh -ExecutionPolicy Bypass -File .\scripts\setup-windows.ps1

Uses winget for GUI apps (browsers, IDEs, Docker Desktop, communication apps) and scoop for CLI dev tools (gh, jq, fzf, ripgrep, fd, lazygit, kubectl, helm, neovim, etc.). Installs language runtimes (Node LTS, Python 3.12, Go, Rust, Temurin JDK 21, .NET SDK 7/8/9 + preview 10), enables WSL2 + Ubuntu so setup-ubuntu.sh can run inside WSL, and configures the terminal (Windows Terminal with Catppuccin Mocha + MesloLGS NF, oh-my-posh prompt, PSReadLine predictions, Alacritty linked to config/alacritty.toml). Flags: -SkipWSL, -SkipFonts, -SkipGUI, -SkipTerminal, -BootstrapWSL.

Pass -BootstrapWSL once your Ubuntu distro is initialized with a user account β€” it'll clone the dotfiles inside Ubuntu and run install.sh for you.

To re-run terminal config only:

pwsh -ExecutionPolicy Bypass -File .\scripts\setup-windows-terminal.ps1

To update everything later:

pwsh -File .\scripts\update-windows.ps1          # full pass
pwsh -File .\scripts\update-windows.ps1 -Quick   # winget + scoop + rustup only

Headless variant: same dev toolchain as setup-ubuntu.sh (Java, .NET 7/8/9/10, Go, Rust, Node, Python/uv, Docker, k8s, GDAL/PROJ/GEOS, etc.) but drops GUI items (Wireshark, VLC, Thunderbird, snap chat apps, terminal fonts) and adds server essentials: openssh-server, unattended-upgrades, fail2ban, sysstat, ncdu, iotop, plus a UFW default config that allows SSH.

4. Install Update Commands

./scripts/setup-update.sh

πŸ“ Structure

dotfiles/
β”œβ”€β”€ install.sh              # Main dotfiles installation (macOS / Linux)
β”œβ”€β”€ install.ps1             # Main dotfiles installation (Windows)
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ setup-macos.sh      # macOS full development setup
β”‚   β”œβ”€β”€ setup-ubuntu.sh     # Ubuntu desktop development setup
β”‚   β”œβ”€β”€ setup-server.sh     # Ubuntu Server (headless) setup
β”‚   β”œβ”€β”€ setup-windows.ps1   # Windows development setup (winget + scoop)
β”‚   β”œβ”€β”€ setup-windows-terminal.ps1 # Windows Terminal + oh-my-posh + Alacritty
β”‚   β”œβ”€β”€ update-windows.ps1  # Update winget + scoop + modules + WSL distros
β”‚   β”œβ”€β”€ setup-agnoster.sh   # Agnoster theme installer
β”‚   β”œβ”€β”€ setup-terminal.sh    # Terminal theme configuration
β”‚   β”œβ”€β”€ setup-update.sh     # Update command installer
β”‚   β”œβ”€β”€ update-all.sh       # Full system updater
β”‚   └── update-quick.sh     # Quick daily updater
β”œβ”€β”€ shell/
β”‚   β”œβ”€β”€ .zshrc             # Enhanced Zsh configuration
β”‚   β”œβ”€β”€ .bashrc            # Bash configuration (Ubuntu)
β”‚   β”œβ”€β”€ .profile           # Shell profile
β”‚   └── agnoster.zsh-theme # Agnoster theme
β”œβ”€β”€ git/
β”‚   └── .gitconfig         # Git configuration
β”œβ”€β”€ vim/
β”‚   └── .vimrc             # Vim configuration
└── config/
    └── terminal-colors.md  # Terminal color schemes

πŸ› οΈ Installation Guide

1. Basic Dotfiles Setup

# Clone repository
git clone https://github.com/antosubash/dotfiles ~/dotfiles

# Install dotfiles (creates symlinks)
cd ~/dotfiles
./install.sh

# Restart your terminal or run:
source ~/.zshrc  # or ~/.bashrc on Ubuntu

2. Development Environment Setup

Choose your platform:

macOS

./scripts/setup-macos.sh

Ubuntu/Linux

./scripts/setup-ubuntu.sh

What gets installed:

  • πŸ“¦ Package managers (Homebrew / apt / winget + scoop)
  • πŸ’» Languages (Node.js, Python, Java, Go, Rust, .NET)
  • 🐳 Container tools (Docker, Kubernetes, Helm)
  • πŸ”§ Productivity tools (tmux, fzf, ripgrep, fd)
  • 🌐 API tools (HTTPie, jq, yq, curlie)
  • πŸ” Security tools (GPG, pass, nmap, Wireshark)
  • πŸ“± Communication apps (Slack, Discord, Zoom)
  • πŸ—ΊοΈ Geospatial tools (GDAL, PROJ, GEOS)
  • πŸ”€ Nerd Fonts (JetBrainsMono, FiraCode, MesloLGS NF)
  • πŸͺŸ Windows extras: Windows Terminal w/ Catppuccin Mocha, oh-my-posh, PSReadLine, Alacritty, WSL2 + Ubuntu (optional auto-bootstrap)

3. Shell Theme Setup

Agnoster Theme (Recommended)

# Install Agnoster theme with fonts
./scripts/setup-agnoster.sh

# Set terminal font to "Meslo LG Nerd Font"
# Restart terminal

Custom Terminal Themes

# Configure terminal colors
./scripts/setup-terminal.sh

4. Update System Setup

# Install update commands
./scripts/setup-update.sh

# Available commands after installation:
update          # Full system update
update-quick    # Fast daily update
update-manager  # Interactive manager

🎯 Available Commands

Update Commands

update              # Full update of all tools
update-quick        # Fast daily updates (package managers only)
update-manager      # Interactive update interface
update --cleanup    # Clean caches and old files

# Aliases
upd                 # Quick update alias
upf                 # Full update alias
upc                 # Cleanup alias

Development Shortcuts

# Git
gs, ga, gc, gp, gl  # Git status, add, commit, push, log
gd, gco             # Git diff, checkout

# Docker
d, dc, dps, di       # Docker, docker-compose, ps, images

# Node.js
ns, nr, ni, nb       # npm start, run, install, build

# Navigation & Files
ll, la, lt           # Enhanced ls commands
mkcd                 # Make and enter directory
extract              # Universal archive extractor

Utility Functions

backup <file>        # Create timestamped backup
server [port]        # Start quick web server
checkport <port>     # Check what's using a port
replace <search> <replace> <dir>  # Find and replace

🎨 Shell Customization

Agnoster Theme Features

  • Smart Context: Shows user@host only for SSH
  • Git Integration: Branch status, dirty/clean indicators
  • Development Tools: Node.js, Rust, Go detection
  • Cloud Tools: Kubernetes, Docker, AWS profiles
  • Execution Time: Command duration tracking
  • Status Indicators: Error codes, background jobs

Customizing Theme

The Agnoster theme uses default Oh My Zsh settings. You can customize it by editing your .zshrc file or creating a custom theme file in ~/.oh-my-zsh/custom/themes/.

Terminal Colors

Use Nordic color scheme in config/terminal-colors.md for consistency.

πŸ”„ Maintenance

Daily Usage

# Quick daily update
update-quick

# Check what's outdated
update-manager status

Weekly Maintenance

# Full system update
update

# Clean up system
update --cleanup

Manual Updates

# Package managers only
brew update && brew upgrade    # macOS
sudo apt update && sudo apt upgrade  # Ubuntu

# Language-specific
npm update -g                 # Node.js
pip3 list --outdated          # Python
rustup update                 # Rust

🌍 Cross-Platform Support

This dotfiles setup works seamlessly on:

macOS

  • 🍎 Homebrew package management
  • πŸ–₯️ Terminal.app and iTerm2 support
  • πŸ’Ό Cocoa application installation
  • πŸ”€ Native font management

Ubuntu/Linux

  • 🐧 APT package management
  • πŸ“¦ Snap and Flatpak support
  • πŸ”§ System service management
  • 🎯 Desktop environment integration

Automatic Detection:

  • OS type (macOS/Linux)
  • Shell type (Zsh/Bash)
  • Package manager availability
  • Installed applications

πŸ› οΈ Troubleshooting

Common Issues

Font Issues with Agnoster

# Install required fonts
./scripts/setup-agnoster.sh
# Set terminal font to "Meslo LG Nerd Font"

Command Not Found

# Reinstall update commands
./scripts/setup-update.sh
# Restart terminal or source shell config
source ~/.zshrc

Permission Denied

# Make scripts executable
chmod +x ~/dotfiles/scripts/*.sh

Oh My Zsh Issues

# Reinstall Oh My Zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Getting Help

Update Manager

update-manager help  # Show all update options

Script Help

./scripts/setup-macos.sh --help
./scripts/update-all.sh --help

Check Versions

update-manager status  # Check all tool versions

πŸ“š Advanced Usage

Custom Aliases

Add to ~/.zshrc.local:

# Your custom aliases
alias myproject="cd ~/projects/myapp"
alias test="./scripts/test.sh"

Environment Variables

Add to ~/.local/bin/env:

# Custom environment variables
export API_KEY="your-key-here"
export DATABASE_URL="postgresql://..."

Project Templates

Create project templates in ~/dotfiles/templates/ for quick scaffolding.

🀝 Contributing

  1. Fork the repository
  2. Create feature branch
  3. Make your changes
  4. Test on both platforms if possible
  5. Submit pull request

πŸ“„ License

This repository follows the MIT License - feel free to use and modify for your own needs.


πŸŽ‰ Enjoy Your New Development Environment!

You now have a powerful, cross-platform development setup with:

  • ⚑ Automated updates
  • 🎨 Beautiful themes
  • πŸ› οΈ Rich tooling
  • πŸ”„ Cross-platform compatibility
  • πŸ“¦ Intelligent package management

Happy coding! πŸš€

About

Cross-platform dotfiles for macOS and Ubuntu

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors