Skip to content

My macOS config files for bootstrapping a new Mac

Notifications You must be signed in to change notification settings

DannySeidel/mac-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mac-Setup

Mac OS Shell Script Ruby

This repo contains my config files for setting up a new Mac.

Setup

To run all listed steps, download and execute the mac-setup.sh file with:

/bin/bash -c "$(curl -fsSL https://github.com/raw/DannySeidel/mac-setup/main/scripts/mac-setup.sh)"

Note that SSH is used to clone the repo. That means you should have set up a SSH key for github, otherwise it will not work.

If you haven't set up a SSH key yet, you can do so following the instructions under this link: Generating a SSH Key

If you don't want to use a SSH key, consider using HTTPS for cloning the repo.

Steps

1. Install Apple Command Line Tools:

xcode-select --install

2. Clone this git Repo:

git clone git@github.com:DannySeidel/mac-setup.git ~/.config-files

3. Run setup scripts:

The scripts do the following:

bash ~/.config-files/scripts/link-config.sh to create symlinks in the home directory to the files in the repo.

link-config.sh looks like this:

# Terminal config files
ln -s ~/.config-files/.vimrc ~/.vimrc
ln -s ~/.config-files/.p10k.zsh ~/.p10k.zsh
ln -s ~/.config-files/.zshrc ~/.zshrc
ln -s ~/.config-files/.hushlogin ~/.hushlogin

# vscode config files
ln -s ~/.config-files/vscode/settings.json ~/Library/Application\ Support/Code/User/settings.json
ln -s ~/.config-files/vscode/keybindings.json ~/Library/Application\ Support/Code/User/keybindings.json

# Path specific git config
ln -s ~/.config-files/git/.gitconfig ~/.gitconfig
ln -s ~/.config-files/git/.gitconfig-private ~/.gitconfig-private
ln -s ~/.config-files/git/.gitconfig-work ~/.gitconfig-work
ln -s ~/.config-files/git/.gitconfig-gitlab ~/.gitconfig-gitlab

bash ~/.config-files/scripts/configure-dock.sh to configure the Dock to my preferences:

configure-dock.sh looks like this:

# Set the scale effect for `Command + M`
defaults write com.apple.dock mineffect scale

# Set the Dock to hide automatically
defaults write com.apple.dock autohide -bool true

# Set the icon size to 48
defaults write com.apple.dock tilesize -integer 48

# Set the hover icon size to 64
defaults write com.apple.dock largesize -float 64

# Disable the Dock animation
defaults write com.apple.dock launchanim -bool false

# Delay the Dock appearance by 3 seconds
defaults write com.apple.dock autohide-delay -float 3

# Restart the Dock
killall Dock

bash ~/.config-files/scripts/install-software.sh to install Brew and all software listed in the Brewfile.

install-software.sh looks like this:

# Install brew
/bin/bash -c "$(curl -fsSL https://github.com/raw/Homebrew/install/HEAD/install.sh)"

# Install listed software via brew
brew bundle --file ~/.config-files/Brewfile

# Install p10k
brew install romkatv/powerlevel10k/powerlevel10k

# Clear brew cache
brew cleanup --prune=all

bash ~/.config-files/scripts/configure-menubar.sh to configure the Menu bar to my preferences:

configure-menubar.sh looks like this:

# Always show the Menu bar in full screen (may require logout or restart)
echo "Configuring Menu bar..."
defaults write NSGlobalDomain _HIHideMenuBar -bool false

# hide the Menu bar in the TV app and Arc
defaults write com.apple.TV AppleMenuBarVisibleInFullscreen -bool false
killall TV

defaults write company.thebrowser.Browser AppleMenuBarVisibleInFullscreen -bool false
killall Arc; open -a Arc

About

My macOS config files for bootstrapping a new Mac

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published