Skip to content
pedropombeiroPublic

Latest commit

Β 

History

4,469 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Pedro's Dotfiles πŸ› οΈ

A comprehensive dotfiles configuration managed with YADM for macOS and Linux systems, featuring a carefully curated development environment with powerful CLI tools and integrations.

Overview

This repository contains my personal dotfiles configuration, providing a consistent and productive development environment across different machines. It uses YADM (Yet Another Dotfiles Manager) for seamless synchronization and supports both macOS and Linux platforms with platform-specific configurations.

Screenshots

Tool Preview
Zsh Zsh
Yazi Yazi
Neovim Neovim

Features

This dotfiles setup includes:

  • 🐚 Shell Configuration

    • zinit plugin manager with Oh-my-zsh plugins
    • Custom aliases and functions for productivity
    • fzf integration - fuzzy file finder (use **<TAB> for fuzzy completion, e.g., vim **<TAB>)
    • zoxide - smarter directory navigation
    • mise - polyglot runtime manager and environment switcher
  • πŸ“ Editor Configuration

    • Neovim with comprehensive plugin setup
    • Neovide - Neovim GUI client
    • Vim configuration with fzf integration
    • VS Code settings sync
  • πŸ€– Automation & Quality

    • hk git hooks for shell, Markdown, Ruby, Lua, and formatting checks
    • CI validations (hk, Neovim config load, luacheck, bootstrap lint, alternate rendering per machine class, gitleaks)
    • Update scripts for brew, mise, zinit, and Neovim plugin health
  • πŸ”§ Development Tools

  • 🎨 Terminal Enhancements

    • iTerm2 with shell integration
    • Custom color schemes
    • Yazi - blazing fast terminal file manager
    • bat - cat clone with syntax highlighting
    • eza - modern replacement for ls
    • btop - resource monitor
    • grc - generic colouriser
  • πŸ“¦ Package Management

    • Homebrew bundle configuration
    • mise - polyglot runtime manager (modern alternative to asdf)
    • Language-specific package managers
  • πŸ” Security & Privacy (see SECURITY.md)

    • 1Password with CLI integration
    • SSH configuration
    • SSH commit signing through the 1Password SSH agent
    • Secure credential management

Quick Start

macOS

Prerequisites:

  1. Log in to the App Store
  2. Install Xcode and accept the license agreement

Installation:

# Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
eval "$(/opt/homebrew/bin/brew shellenv)"

# Install YADM
brew install yadm

# Clone dotfiles repository
yadm clone --no-bootstrap https://github.com/pedropombeiro/dotfiles.git

# Set class configuration (Personal, Work, or NAS)
yadm config local.class Personal

# Run bootstrap script to set up environment
yadm bootstrap

# Reload shell configuration
source ~/.zshrc.shared

Linux (Debian/Ubuntu)

# Install YADM
sudo apt update && sudo apt install -y yadm

# Clone dotfiles and bootstrap
yadm clone --no-bootstrap https://github.com/pedropombeiro/dotfiles.git
yadm config local.class Personal
yadm bootstrap
source ~/.zshrc.shared

Machine classes and alternates

Every machine sets one class: Personal, Work, or NAS. Files that vary between machines use yadm alternates:

  • ##class.<NAME> for what the machine is for, such as NAS services and hosts
  • ##os.<NAME> for macOS and Linux differences
  • ##distro.qts for QNAP QTS platform limits

Shared content lives in a base file that includes a small per-machine file, or in a ##template. An hk pre-commit check rejects alternates that share more than 50 lines. See the layout rules for details.

Post-Installation

Bootstrap links restored files, such as shell histories, from ~/Sync/pedro/.dotfiles/Home/MBP.<class>. Personal machines receive that directory through Syncthing. Work machines don't run Syncthing, so copy it from the previous Work machine. To relink after restoring files:

~/.config/yadm/scripts/relink-dotfiles.zsh

On a factory-reset Mac, install any available OS upgrades before the quick start steps. On every platform, verify SSH connectivity to the Git services afterwards:

ssh -T git@github.com
ssh -T git@gitlab.com

Configuration

macOS Settings

Manual configuration steps:

  • Change the computer name in System Settings
  • Set default terminal font to 'MesloLGS NF'
  • Disable notifications when screen is off
  • Disable Location Services (if desired)
  • Configure keyboard shortcuts:
    • Set input source switching shortcuts

Package Sources

The definitive package lists live in the Homebrew bundle and mise configuration:

  • Homebrew brews and casks: .Brewfile
  • Mac App Store apps: .config/mise/conf.d/tools.personal.toml or .config/mise/conf.d/tools.work.toml (bootstrap.packages entries)

The README highlights key tooling, but those configuration files are the source of truth. Runtime versions and CLI tools are declared in .config/mise/.

Cheat sheets

Terminal cheat sheets cover the high-value bindings for tmux, sesh, Yazi, Neovim, LazyGit, Atuin, fzf, zoxide, and Zsh in this setup.

Maintenance

Profiling ZSH

To identify slow startup times, use zprof:

# Add at the beginning of your .zshrc
zmodload zsh/zprof

# ... your configuration ...

# Add at the end
zprof

Checklist Before Reinstall

  • Create Time Machine or SuperDuper! backup
  • Verify application-specific backups
  • Backup hidden files in repository
  • Push all Git branches
  • Search for "what folders to backup"
  • Verify iCloud sync is complete (check Finder status bar)
  • Confirm all critical data is backed up

Checklist After Install

  • Add Terminal, iTerm, VS Code, and IDEs to System Settings > Privacy & Security > Developer Tools to avoid Apple notarization slowdowns
  • Configure $HOME/.git-peek for repository peeking
  • Restore relevant folders from backup under ~/Library/Application Support and ~/Library/Preferences

Useful Commands

Use Vim in YADM Git context:

Running vim from inside YADM ensures proper fzf.vim integration and Git worktree configuration:

yadm enter vim

Update all packages:

brew update && brew upgrade && brew cleanup

Update dotfiles tooling:

~/.config/yadm/scripts/update.zsh

Check YADM status:

yadm status
yadm diff

Acknowledgments

This dotfiles configuration was inspired by and builds upon ideas from:


License: See LICENSE file for details

Used by

Contributors

Languages