Skip to content

Latest commit

 

History

History
67 lines (34 loc) · 3.63 KB

readme.md

File metadata and controls

67 lines (34 loc) · 3.63 KB

Dotfiles for Tim Triemstra

To setup on Mac or Linux, type the following (assumes zsh):

    git clone https://github.com/timtr/Dotfiles.git
    cd Dotfiles
    ./setup.sh

Run ./setup.sh from within the local Dotfiles folder for first-run install, then re-launch your terminal. On Mac, first install Xcode or the command line tools.

Run dotfiles.sh from the PATH to reset your config. For instance, if you want to reset the ~/local.sh file to default config, simply delete it, then run dotfiles.sh. You can also run help.sh for additional help (once I build that feature).

Documentation is a work in progress. See a preview:

Overview

This is my personal collection of setup scripts for macOS and Linux (WIP). It includes settings for zsh, macOS Terminal, Xcode, and other tools and apps. This set will also install Homebrew and a recent version of Ruby.

The setup will assume your settings are configured directly within the Dotfiles folder where you cloned this repo, adding the /Dotfiles/Bin folder to the PATH (for instance.) It will also add /opt/homebrew/bin to the PATH for Homebrew support.

Features

local.sh - Installs a file called ~/local.sh (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, add a Swift toolchain, or to enable secret build settings.

dotfiles.sh - run this at any time reset all settings, and recreate ~/local.sh from the original template if you first delete that file.

ZSH settings - sets up the prompt, PATH, and other basic settings. Note that .zshenv sets up the PATH so it works even when there is no interactive terminal session, and .zshrc will source this file for a consistent PATH for terminal windows.

Dropbox - symlink in $HOME points to ~/Library/CloudStorage/Dropbox if Dropbox is installed on the computer.

Using a custom Swift toolchain

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.

Demos

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.

Useful reference links

Documentation (or the start of docs) can be found here. Note that the docs folder 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

Order of loading

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)