Skip to content

Instantly share code, notes, and snippets.

@tuananhlai
Last active April 12, 2025 13:01
Show Gist options
  • Save tuananhlai/be5b96f79b5d8b1ecce4de8ab53603af to your computer and use it in GitHub Desktop.
Save tuananhlai/be5b96f79b5d8b1ecce4de8ab53603af to your computer and use it in GitHub Desktop.
#!/bin/zsh
echo "🖥️ Mac Setup Script"
echo "===================="
# Ask if this is a company machine
echo ""
echo "Is this a company-issued machine? (y/n)"
read is_company_machine
echo ""
xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Common applications for all setups
echo "Installing common applications and tools..."
brew install --formula mycli pgcli gh neovim nvm terraform awscli kubectl go
brew install --cask httpie plex discord anki docker visual-studio-code warp notion firefox@developer-edition google-chrome raycast spotify ticktick zed cursor scroll-reverser
# Install company-specific applications if selected
if [[ $is_company_machine =~ ^[Yy]$ ]]; then
echo "Installing company-specific applications..."
brew install --cask slack figma zoom
fi
# Setup Node.js environment
echo "Setting up Node.js environment..."
nvm install --lts
npm i -g pnpm yarn
# TODO: Pull neovim settings file from Gist.
echo "Would you like to set up neovim with default configurations? (y/n)"
read setup_neovim
if [[ $setup_neovim =~ ^[Yy]$ ]]; then
echo "Setting up neovim..."
# Uncomment and modify the line below with your actual Gist URL
# curl -fsSL https://gist.github.com/yourusername/your-neovim-config/raw/main/init.vim > ~/.config/nvim/init.vim
echo "Neovim configuration pulled from Gist."
fi
# System preferences
echo "Configuring system preferences..."
# Disable MacOS press and hold behavior for better Vim navigation.
defaults write -g ApplePressAndHoldEnabled -bool false
# Disable CapLock delay
# https://www.reddit.com/r/MacOS/comments/1dkklgs/how_to_remove_caps_lock_key_delay/
hidutil property --set '{"CapsLockDelayOverride":10}'
# Swap function key.
# Install omz: sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Setup Raycast: https://manual.raycast.com/the-basics
# Auto-hide the dock "Automatically show and hide the Dock"
# Disabled "Tiled windows have margins"
# Remove all global actions hotkey from TickTick.
# Disable "Add period with double-space"
# Disable "Displays > Advanced > Push through the edge of a display..." to prevent cursor freezing at the edge of the screen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment