The flexibility of dotfiles meets the power of Oh My Zsh.
Inspired by and compatible with Zach Holman's dotfiles.
Install
- Clone this repository to
$HOME/.oh-your-zshrc
and symlinkoh-your.zshrc
to$HOME/.zshrc
. - ...
Features
...
See https://github.com/DanielThomas/dotfiles for an example of a dotfiles repository.
Built-in Functions
dotfiles
- list dotfiles locationsdotfiles_find
- find files within dotfiles locations, for exampledotfiles_find \*.gitrepo
dotfiles_install
- run dotfiles installersdotfiles_update
- update dotfiles installed files. Equivalent to runningdotfiles_install
and choosingS
to skip existing
How it works
Dotfiles sources are found using the pattern $HOME/.*dotfiles*
.
The files within are processed automatically by .zshrc
or the installation process depending on their extension. Scripts set the environment, manage files, perform installation or enable plugins depending on the file name or extension. Bootstrap can be safely run repeatedly, you'll be prompted for the action you want to take if a destination file or directory already exists.
Environment
These files set your shell's environment:
path.zsh
: Loaded first, and expected to setup$PATH
*.zsh
: Get loaded into your environmentcompletion.zsh
: Loaded last, and expected to setup autocomplete
Files
The following extensions will cause files to be created in your home directory:
*.symlink
: Automaticlly symlinked into your$HOME
as a dot file during bootstrap. For example,myfile.symlink
will be linked as$HOME/.myfile
*.gitrepo
: Contains a URL to a Git repository to be cloned as a dotfile. For examplemyrepo.gitrepo
will be cloned to$HOME/.myrepo
*.gitpatch
: Namerepo-<number>.gitpatch
to apply custom patches to agitrepo
repository*.otf
,*.ttf
,*.ttc
: Fonts are copied to~/Library/Fonts
during bootstrap*.plist
: Preference lists are copied to~/Library/Preferences
during bootstrap*.launchagent
: Files are copied to~/Library/LaunchAgents
during bootstrap
Installers
Installation steps during bootstrap can be handled in three ways:
install.sh
: An installation shellscriptinstall.homebrew
: A list of Homebrew formulas to installinstall.homebrew-cask
: A list of Homebrew casks to installinstall.homebrew-tap
: A list of Homebrew tapsinstall.mas
: A list of App Store apps to installinstall.open
: A list of files to be handled by the default application association using theopen
command
install.mas
files
Installing from the App Store with Applications from the App Store are referenced by a numeric id rather than a name.
In order to find out the id you can use the command mas search <term>
.
Entries in install.mas
should be in the format <id> <name>
(the same format as the results of mas search
).
Plugins
- All topic directory names are implicitly added to the plugin list, so you get
osx
andbrew
automatically - Plugins listed in
oh-my-zsh.plugins
files are read and added to this list
Profiling Startup Time
If your shell is taking an excessive amount of time to start, run zsh
with the PROFILE_STARTUP
environment variable:
PROFILE_STARTUP=true zsh
Then run tools/startlog.py
against the output in /tmp
to determine the contributors to startup time. For more details, see: