To install, run ./setup.sh from within the local dotfiles directory. Quit and re-launch the terminal. Re-run to reset at any time.
git clone https://github.com/timtr/dotfiles.git
cd dotfiles
./setup.shThis will install files into ~/Bin (or ~/bin on Linux) and add that directory to your PATH. Run help.sh to see additional functionality. On macOS, Xcode must first be installed. Linux is tested on recent Ubuntu releases. Re-run ./setup.sh from the dotfiles folder to reset to original files.
More documentation is available, but is a work in progress.
- Run
setup.shfromdotfilesdirectory, and copy files to/usr/local/bin/$USERin the PATH - Move common settings and scripts to the
docfiles/Commonfolder to ease maintenance - Add basic support for Linux
This is the personal collection of setup scripts for macOS and Linux (WIP). It includes settings for macOS including zsh shell, eza for ls replacement, Terminal, Xcode, Swift, Homebrew, and Ruby. The Linux install is based on bash and still uses mostly default tools.
The setup adds $HOME/Bin (or ~/bin on Linux) and /opt/homebrew/bin to the PATH for local scripts and Homebrew support.
The macOS install includes a dot-gitconfig-work file that is installed to control the Git behavior for respositories stored in the ~/Documents directory. It sets up code signing at commit time, and changes the username and email for those commits to work accounts. This general approach can work for any sub-directory custom configuration.
TODO:
local.sh - A file called ~/local.sh is installed (if doesn't exist) that you can customize with settings that do not belong checked into GitHub, for instance set certain keys, or environment variables. This is also the file to add things like feature flags during development, define a Swift toolchain, or to enable secret build settings. Re-running dotfiles.sh will never override this file, so if you want to restart from scratch, just delete the file and the re-install dotfiles to get a fresh setup.
dotfiles.sh - run this at any time to reset all settings (it is in $PATH).
ZSH dotfiles - set up the prompt, $PATH, and other basic settings. The .zshenv file sets up $PATH so it works even when there is no interactive terminal session, and .zshrc will source this file as well.
Dropbox - Optional symlink in $HOME points to ~/Library/CloudStorage/Dropbox if Dropbox is installed on the computer. This is often commented out.
You can download new Swift toolchains from Swift.org and set them to be used by default. The ~/local.sh file is perfect to place to configure these settings per-machine, rather than configure in the main Dotfiles repo.
Once installed, you can install Homebrew and run demos. For example, run demo-homebrew.sh from the Dotfiles/Demos to show a Terminal screen of software being downloaded, built, installed, and erased (in a repeating loop). Hit CONTROL-Z to quit that demo.
You can also open the Dotfiles/Demos/demo-safari-cycle.html file to launch Safari and begin cycling through many web pages, simulating an automated web test harness.
Documentation (or the start of docs) can be found here. Note that the docs directory must be in lower-case for GitHub Pages support. Capital Docs will fail.
Which zsh files contain which settings: CodeSpaces and Dotfiles
Docs on using setup.sh with GitHub CodeSpaces and Dotfiles
For reference, zsh config files are loaded in the following order:
.zshenv -- global (even non-interactive), useful for PATH and tooling variables
.zshrc -- loaded from the interactive shell (e.g. a Terminal window)
.zprofile -- if login (not using this file in current setup)// end of file.