Skip to content

Latest commit

 

History

492 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ymendel's dotfiles

For system personalization, easy set-up, &c &c.

Consideration

This repo is really just for me, and I'll be honest and say that right now. I also don't have a lot of different machines, so it tends to be more targetted and less robust for widespread use than other dotfiles repos you may find. With that said, I'm far from against other people using any of this. I just felt I should make that clear.

Also, if you want to use these dotfiles, I strongly suggest you first review the contents and see what works for you. Make your own copy. It's all about personalizing a system to you, not just blindly using someone else's settings. You could be in for a bad time if you do that.

Installation

Using git and the bootstrap script

This can be cloned wherever you like, but I like to keep it along with other projects in ~/dev/projects/mine. The bootstrap script will create the ~/.dotfiles symlink, among other things.

git clone https://github.com/ymendel/dotfiles.git
cd dotfiles
script/bootstrap

On a new machine

script/bootstrap does most of the work. These are the parts it can't do, along with the things worth knowing before you start.

  • Consider the username carefully If anything is copied over from another machine and expects a certain absolute path, using a different username is an easy way to mess that all up. Despite being ymendel in many places (including GitHub), I tend to use yossef as a username on my personal machine.
  • Install Xcode Command Line Tools Nicely, this will automatically happen the first time git is run, so the git clone will take care of this. Then Homebrew may well install them again.
  • Sign in to the App Store brew bundle runs mas, which needs to authenticate on the App Store. It's not necessary to do this step before bootstrapping, but it does save a prompt-and-wait later.
  • Terminal profiles install by being opened and this leaves four Terminal windows to be closed. This is expected.
  • Set the default Terminal profile by hand once those profiles are imported. macos/terminal/terminal.defaults tries to do this, but it doesn't work. Read the FIXME comment in that file if you care.
  • The first run takes a long time. Homebrew formulae and casks, App Store apps, and a Ruby that ruby-install builds from source all land in the same run.
  • Log out or restart at the end — which the macOS installer will tell you to do anyway. Several of the defaults won't take effect until a particular app is restarted, and some of those apps are things like Dock and Finder and SystemUIServer — pretty annoying to quit/restart. Some others really won't take effect until login, so the surest course of action is to just restart the computer.

Organization

Topics

This is separated into topic directories. Instead of a single large file (or a small set of large files) to handle everything, things are broken up into small directories and files (viz. git, ruby, system, shell, macos). I find it easier to understand and handle with this separation.

Locations

  • script/: This is the location for scripts and commands that handle the dotfiles project itself, like script/bootstrap. Note that script/bootstrap runs before Homebrew is installed, so anything in here — and anything it sources — has to work on the /bin/bash that macOS ships, which is still 3.2. That means no mapfile, no namerefs, and no associative arrays. Everything loaded later (viz. the topic/*.bash files) gets Homebrew's bash and can use all of it.
  • bin/: This gets added to the $PATH and anything in here is available to run everywhere. This is a sort of general, catch-all location for commands and utilities that don't fit elsewhere. Also, updot lives here. (see below)
  • topic/bin/: These directories also get added to the $PATH, for topic-related commands that will be made available to run everywhere.
  • topic/*.bash: Any files ending in .bash get loaded into the environment.
  • topic/install.sh: Any file named install.sh is executed by script/install (which is run by updot). These end in .sh instead of .bash to avoid being loaded automatically.
  • topic/*.symlink: Any file ending in .symlink gets symlinked into $HOME with a prepended . (e.g. git/gitconfig.symlink → ~/.gitconfig) This lets all of these files stay versioned in the dotfiles repository, but still be useful in their expected locations. These files are symlinked by both script/bootstrap and script/install (which is run by updot).
  • topic/config/: Anything under here gets symlinked into $XDG_CONFIG_HOME (~/.config when that isn't set), keeping whatever path it had below config/ (e.g. editing/config/zed/settings.json → ~/.config/zed/settings.json). Note that it's the files that are linked, and not the directory, because that directory might be used by something else. As with the *.symlink files, these are symlinked by both script/bootstrap and script/install (which is run by updot).
  • ~/.local/bashrc: This file will be sourced if it exists, allowing you to have special per-machine differences.
  • ~/bin, ~/scripts, ~/.local/bin: These get added to the $PATH as well — each one only if it exists.

Rejuvenation

updot

The updot command is provided to easily stay up-to-date. It installs dependencies, runs install scripts, sets defaults, &c. Run this script occasionally to keep your system and environment up-to-date.

Note: Running updot will not update the git repository, and this is by design. It only updates the system with the current contents of the repository. It also (by design) doesn't update already-installed Homebrew formulae. Those can be handled separately with brew.

updot brew does only the Homebrew part: install/update Homebrew, then brew bundle each Brewfile that applies to this machine.

(Note: That is some git-style subcommand handling, where it calls updot-brew. You can make your own subcommands by creating updot-* executables. Have fun!)

Appreciation

This organization was largely inspired by Zach Holman and his wonderful dotfiles repo. There were some things I wanted to do differently. Some of those I gave up on simply because his stuff was so good.

Along the way, I've gotten a good bit from other repos. Of particular note, and in no particular order:

About

No description, website, or topics provided.

Resources

Stars

23 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages