Skip to content

Latest commit

 

History

History
74 lines (49 loc) · 3.78 KB

README.md

File metadata and controls

74 lines (49 loc) · 3.78 KB

Windows Dotfiles

This repository contains the dotfiles that I use to set up a development environment on Windows using the following:

I manage these files using Git bare repositories. I got the idea from Flavio Antelo's blog post who got it from StreakyCobra on Hacker News.

Installation on a new system

  1. Install VSC and make code available in your PATH.

  2. Install Git for Windows and make git available in your PATH.

  3. Install Fira Code. (Instructions)

  4. Use Noto Emoji to support emojis on Git Bash.

    You can follow these instructions, but long story short, use this link from DownGit to download the contents of noto-emoji/png/128 and put them in any of the following directories:

    • %USERPROFILE%\.mintty\emojis\noto
    • %USERPROFILE%\.config\mintty\emojis\noto
    • %APPDATA%\mintty\emojis\noto
    • %PROGRAMFILES%\Git\usr\share\mintty\emojis\noto
  5. Using Git Bash, clone this repository into a .dotfiles directory in your home directory:

    git clone --bare https://github.com/mcecode/windows-dotfiles.git "$HOME/.dotfiles"
  6. Checkout the dotfiles from the bare repository:

    git --git-dir="$HOME/.dotfiles" --work-tree="$HOME" checkout
  7. Reload Git Bash to allow the settings to take into effect.

  8. %USERPROFILE%\.config\bash\.bashrc adds the dotfiles alias to easily work with the dotfiles bare repository. Using this command, set dotfiles status to hide untracked files:

    dotfiles config --local status.showUntrackedFiles no
  9. %USERPROFILE%\.config\bash\.bashrc also adds the uxt alias to easily update VSC extensions. Using this command, sync all VSC extensions in the new system:

    uxt sync
  10. Put any additional Bash settings like machine-specific variables and Git settings like user credentials in %USERPROFILE%\.config\local\.bashrc and %USERPROFILE%\.config\local\.gitconfig, respectively.

Syncing the dotfiles

  1. On the machine with the changes, run dotfiles add <changed_file> and dotfiles commit -m "<meaningful_message>".
  2. On other machines, run dotfiles pull.

Syncing Visual Studio Code extensions

  1. On the machine with the newly installed or uninstalled extensions, run uxt list to update %USERPROFILE%\.vscode\extensions.txt with the new set of extensions.
  2. Commit and push extensions.txt using the dotfiles command.
  3. Pull updates on other machines using the dotfiles command.
  4. On other machines, run uxt sync to sync the VSC extensions.

Contributing

Suggestions are welcome, either in improving the dotfiles themselves or on how to store, update, and sync them better.

License

Copyright 2021-present Matthew Espino

This project is licensed under the MIT license.