This project contains all of the configuration files I use for all of my macOS
computers. When these files are linked to their appropriate places (using the
configure.sh
install script), my standard settings will be set up on that
computer. These settings include important environment variables, terminal
aliases, and scripts.
To install this project, run the following commands:
git clone https://github.com/garrettheath4/dotfiles-mac.git ~/dotfiles
cd ~/dotfiles
git submodule init && git submodule update
./configure.sh
./installApps.sh # optional
mvim
is a Bash script I created that launches a "mini Vim" window for quickly
taking notes or temporarily pasting and manipulating text from the clipboard.
To make it easy to run this script, use BetterTouchTool to create a global
keyboard shortcut (such as Control
+Option
+Command
+V
) that launches this
script when the shortcut is pressed.
Use the ArrangeDualScreenWindows.scpt
AppleScript script to resize the apps I like to put on the MacBook screen
desktops when I have an external monitor attached (Spotify, Airmail 2,
Calendar, and Todoist).
To use this script, make sure "When switching to an application, switch to a Space with open windows for the application" is checked in the Mission Control preference pane.
To make it easy to activate this script, use BetterTouchTool to create a global
keyboard shortcut (such as Control
+Shift
+2
) that runs this script when
the shortcut is pressed.
Repository Item | Description | Linking by configure.sh |
---|---|---|
configure.sh |
A Bash script that creates links from the user's profile to the corresponding item in this repository (run once after cloning this repo) | self (run configure.sh once to create the links below) |
installApps.sh |
A Bash script that detects installed Mac applications and suggests the user to install any suggested apps that are not already installed | none (run installApps.sh once to install suggested apps) |
Todoist-Tasks-macOS.csv |
CSV file of tasks to set up a new macOS computer that can be imported into Todoist (Must be new project.) | none (import into Todoist to create tasks for setting up macOS) |
Todoist-Tasks-Apps.csv |
CSV file of tasks to configure apps on a new computer that can be imported into Todoist (Must be new project.) | none (import into Todoist to create tasks for configuring apps) |
.bash_profile |
Contains user Bash settings (runs every time the user opens up a Terminal window) | ~/.bash_profile --> dotfiles-mac/.bash_profile |
.tmux.conf |
Contains Tmux configuration settings (Tmux is launched by .bash_profile every time the iTerm2 Hotkey window is opened) |
~/.tmux.conf --> dotfiles-mac/.tmux.conf |
.tmux-osx.conf |
Contains Tmux configuration settings that are specific to an OS X environment (mostly just UI configuration) | ~/.tmux-osx.conf --> dotfiles-mac/.tmux-osx.conf |
.git-completion.bash |
Allows tab-completion of Git commands in Bash | ~/.git-completion.bash --> dotfiles-mac/.git-completion.bash |
bin/ |
Contains Bash user scripts (mostly convenience scripts) | ~/bin --> dotfiles-mac/bin/ |
sbin/ |
Contains Bash administrative scripts (mostly scripts containing sudo ) |
~/sbin --> dotfiles-mac/sbin/ |
.vimrc |
Contains Vim startup settings | ~/.vimrc --> dotfiles-mac/.vimrc |
.vim/ |
Contains Vim plugins (mostly just the Vundle plugin manager for Vim stored as a Git submodule at .vim/bundle/Vundle.vim ) |
~/.vim --> dotfiles-mac/.vim/ |
.idlerc/ |
Contains Python IDLE settings | ~/.idlerc --> dotfiles-mac/.idlerc/ |
.ideavimrc |
Vim emulator configuration settings for IntelliJ IDEA when Vim-like edit mode is enabled | ~/.ideavimrc --> dotfiles-mac/.ideavimrc |
git-pre-commit-show-todos.sh |
Git pre-commit script that searches for and shows any TODO items in a repo's files before commits (must be manually installed per repo) | none |
Fractals-2560x1600/ |
HD wallpaper images from Beautiful Fractals | none |
BetterTouchTool/ |
Backup of the default profile settings from the BetterTouchTool app | none |
Moom/ |
Scripts that use the Moom app to rearrange windows to their desired locations on one or more screens | none |
xbar/Scripts/ |
Scripts used by the xbar app to display script results in the OS X menubar | none |
iTerm/ |
Backup location for iTerm2 preferences folder (Note: Set iTerm2 to load preferences from ~/dotfiles/iTerm ) |
none |
Sounds/ |
Contains user sound files | none |
README.md |
This README file | none |
.gitignore |
Tells Git which files to ignore in this repository if they're changed | none |
.gitmodules |
Tells Git that there is a Git submodule in this repo (at .vim/bundle/Vundle.vim ) that needs to be checked out with this repository |
git submodule init && git submodule update |
- System basic initialization (Zsh=
/etc/zprofile
and Bash=/etc/profile
)- Set PATH
- System interactive initialization (Zsh=
/etc/zshrc
and Bash=/etc/bashrc
)- Set PS1
- User basic entrypoint (Zsh=
~/.zshrc
and Bash=~/.bash_profile
)- Source
~/.ghk_profile
(see below)
- Source
- Source
~/.ghk_profile
(main shell-agnostic init for all shells)brew shellenv
- Ensure
<brew>/bin
in PATH - Set BROWSER=open VISUAL=vim EDITOR=vim
- Ensure Homebrew Ruby in PATH (silent)
- Ensure user Python packages in PATH
- Ensure
~/bin
and~/sbin
in PATH - Exit if non-interactive (if
i
not in$-
) - Source
~/.ghkrc
if exists (see below)
- Source
~/.ghkrc
(main shell-agnostic init for interactive shells)- Is
gdate
installed? - Start printing SSH key fingerprint
- Start Tmux if in iTerm Hotkey window
- Source
~/.ghkrc.local
if exists - Set user aliases
- Enable Tmux wrappers for
ssh
andcd
- Is
- Continue
~/.zshrc
(Zsh only)- Source
~/.zshrc.local
if exists (see below) - TODO: Initialize oh-my-zsh
- Source
- Source
~/.zshrc.local
(local-only initializations specific to the Z Shell)- Colorize
PS1
Z Shell prompt environment variable
- Colorize
- Continue
~/.bash_profile
(Bash only)- Source
~/.bash_profile.local
if exists - Initialize oh-my-git
- Enable read-alias (for
which
to identify aliases too) - Source
~/.git-completion.bash
if exists - Source Homebrew Bash Completion if installed
- Source Vagrant Bash Completion if installed
- Colorize
PS1
Bash prompt environment variable
- Source
# | File | Constraint | Notes |
---|---|---|---|
1 | /etc/zshenv |
||
2 | ~/.zshenv |
||
3 | /etc/zprofile |
login shell | Sets PATH |
4 | ~/.zprofile |
login shell | |
5 | /etc/zshrc |
interactive | Sets PS1 |
6 | ~/.zshrc |
interactive | |
7 | /etc/zlogin |
login shell | |
8 | ~/.zlogin |
login shell |
# | File | Constraint | Notes |
---|---|---|---|
1 | /etc/profile |
login shell | Sets PATH and calls /etc/bashrc |
2 | /etc/bashrc |
login shell | Sets PS1 |
3 | ~/.bash_profile |
login shell | |
4 | ~/.bash_login |
login shell | |
5 | ~/.profile |
login shell | |
6 | ~/.bashrc |
interactive non-login shell OR remote shell | |
7 | $BASH_ENV |
non-interactive |
- Merge dotfiles-linux repository into this repository.