/dotfiles

My personal dotfiles

Primary LanguageLuaMIT LicenseMIT

Label Screenshot
Oh-my-zsh image
Vifm image
Neovim image

Abstract

This dotfiles repo leverages YADM as the dotfiles manager.

Prerequisites

Mac OS X

Log in to the App Store.

Install the YADM and the Brew package manager:

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

Installation

Install dotfiles:

# Use HTTPS protocol for anonymous access
yadm clone --no-bootstrap https://github.com/pedropombeiro/dotfiles.git && \
yadm config local.class Personal && \
yadm bootstrap && \
source ~/.zshrc.shared

See the fresh install section below.

Linux Debian/Ubuntu

sudo apt update && sudo apt install -y yadm

Install dotfiles:

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

Post-install procedure

# Symlink the dotfiles in Syncthing
~/.config/yadm/scripts/relink-dotfiles.sh

On a fresh installation - Linux

# Verify you can connect to github and gitlab with the generated SSH keys:
ssh -T git@github.com
ssh -T git@gitlab.com

On a fresh installation - Mac OS X

After factory reset

  1. Install any OS upgrade
  2. Install XCode from the App Store. Open it and accept the T&C.
  3. Run the steps below
# Verify you can connect to github and gitlab with the generated SSH keys:
ssh -T git@github.com
ssh -T git@gitlab.com
  1. After doing the first sync with Syncthing, restore Mackup backup:
mackup restore

Mac OS X Settings

  • Change the computer name
  • Change the default terminal font to 'MesloLGS NF'
  • Disable notifications when screen is off
  • Disable Location Services
  • Set keyboard shortcuts
    • Set the change input source shortcuts

Apps to install

Setup the following apps:

  • Beyond Compare (import settings backup and install command line tools)
  • Password application
    • 1Password
    • MacPass
  • Syncthing
  • Time Machine
  • Microsoft Edge
  • Visual Studio Code
    • Enable settings sync
  • Printers
  • Time Out
    • Name: Pomodoro
    • Pomodoro time: 20m
    • Break time: 1m
    • Theme: Muscles
    • Show button to postpone: 1 minutes
    • Show button to postpone: 5 minutes
    • Show button to skip break

Features

  • fzf: fuzzy file finder. To use it on the command line, prefix with **, then press tab. For instance: vim **<TAB>.
  • autojump: a cd commands that learns about your favorite directories.

Misc

Profiling ZSH

Use zprof:

# At the beginning of your file, e.g. zshrc
zmodload zsh/zprof

...

# At the end:
zprof

Useful software (not installed by default)

Checklist before reinstall

  • Make Time Machine or SuperDuper! backup
  • Check each app for backup
  • Backup hidden files in repo
  • Make sure branches in repo are pushed
  • Search for "what folders to backup"
  • Search for "checklist before factory reset"
  • Make sure iCloud sync is finished (check status bar in Finder)
  • What's most important? Is it backed up?

Checklist after install

  • Add Terminal, iTerm, Visual Studio Code, RubyMine, and GoLand to System Preferences/Security & Privacy/Privacy/Developer Tools list, to avoid Apple notarisation checks that cause slowdowns.
  • Configure $HOME/.git-peek

Useful commands

Use vim in YADM Git context

Running vim from inside yadm ensures that integration with fzf.vim works correctly, and the Git worktree is correctly configured:

yadm enter vim

Acknowledgments