Skip to content

Instantly share code, notes, and snippets.

@alanzeino
Last active April 6, 2026 22:10
Show Gist options
  • Select an option

  • Save alanzeino/42b6d983c7aa2f29d64ea2749621f7cf to your computer and use it in GitHub Desktop.

Select an option

Save alanzeino/42b6d983c7aa2f29d64ea2749621f7cf to your computer and use it in GitHub Desktop.
New Mac Setup

All the stuff I do to set up a new Mac

Applications

  • 1Password (hijacks the Snippety window)
  • AirBuddy
  • Amphetamine
  • BlockBlock
  • Cork (much better than Brewer X)
  • CotEditor (fastest text editor with multi–line editing)
  • DaisyDisk
  • Fantastical
  • Fork (slower than Sublime Merge but better UI)
  • HextEdit
  • iA Writer
  • iStat Menus
  • Jayson
  • Kaleidoscope
  • KeyCastr
  • Little Snitch
  • Mimestream
  • Moom (hijacks the option–key window dragging in macOS Sequoia)
  • OK JSON
  • Parcel (many bugs, but works more reliably compared to Deliveries)
  • PopClip (no longer maintained in Mac App Store)
  • Reeder
  • San Fransymbols
  • Sensei
  • Speedtest
  • Spotify
  • Sublime Text
  • Sublime Merge
  • Suspicious Package
  • The Unarchiver (or Keka)
  • Unexpectedly
  • Wipr (simple, less dumb features than 1Blocker, which feels like PE bought it)
  • Xcode

Terminal

  • Install Homebrew
  • My dotfiles (follow fish steps below)
  • My terminal theme

Xcode Preferences

  • Navigation -> Navigation -> Uses Primary Editor
  • General -> Check Continue building after errors
  • Behaviors -> Build -> Generates new issues -> Uncheck Show navigator Issues
  • Text Editing -> Display -> Check Line numbers
  • Text Editing -> Display -> Check Show code folding ribbon
  • Text Editing -> Indentation -> Check Indent switch/case labels in: Swift
  • Source Control -> Uncheck Add and remove files automatically
  • Source Control -> Uncheck Select files to commit automatically

Xcode Defaults

Enable the Index step in Report Navigator to debug indexing issues: defaults write com.apple.dt.Xcode IDEIndexShowLog YES

macOS Defaults

Always minimize window when double clicking title:

defaults write AppleMiniaturizeOnDoubleClick -bool true

Slow animations when holding Shift (this breaks multiline editing in Sublime and Xcode when holding (shift + control + arrow key):

defaults write com.apple.dock slow-motion-allowed -bool YES
killall Dock

Hide the icons on my Desktop:

defaults write com.apple.finder CreateDesktop false
killall Finder

Set the Finder sidebar icon size to Small:

defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 2

'Jump to the spot that's clicked' in Scroll Bars:

defaults write NSGlobalDomain AppleScrollerPagingBehavior -int 1

Enable Text Selection in QuickLook previews:

defaults write com.apple.finder QLEnableTextSelection -bool TRUE

Disable auto–correction:

defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false

Default save location is Disk, not iCloud:

defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false

Always expand Save Panel by default:

defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true

Tap to click in the trackpad:

defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1

Finder Show Status Bar:

defaults write com.apple.finder ShowStatusBar -bool true

Finder Show Path Bar:

defaults write com.apple.finder ShowPathbar -bool true

Finder Show Tab Bar:

Finder Menu -> View -> Show Tab Bar

Finder Show Proxy Icon:

Settings > Accessibility > Display > Show window title icons

Finder Show Full Posix Path in Title:

defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
killall Finder

Finder Search always searches current folder by default:

defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"

Disable the warning when changing a file extension:

defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false

Default Finder view is Column:

defaults write com.apple.Finder FXPreferredViewStyle clmv

Put Dock on the left:

defaults write com.apple.dock orientation -string left

Disable Dock magnification:

defaults write com.apple.dock magnification -bool false

Don't open files in Safari after downloading:

defaults write com.apple.Safari AutoOpenSafeDownloads -bool false

Show favorites bar in Safari by default:

defaults write com.apple.Safari ShowFavoritesBar -bool true

Show Develop menu in Safari:

defaults write com.apple.Safari IncludeDevelopMenu -bool true

Show status bar in Safari:

defaults write com.apple.Safari ShowOverlayStatusBar -bool true

Xcode Show Line Numbers:

defaults write com.apple.dt.Xcode DVTTextShowLineNumbers -bool true

Xcode Show Code Folding Ribbons:

defaults write com.apple.dt.Xcode DVTTextShowFoldingSidebar -bool true

Xcode Show Build Times in Toolbar:

defaults write com.apple.dt.Xcode ShowBuildOperationDuration -bool true

Don't load remote content in Mail by default:

defaults write com.apple.mail-shared DisableURLLoading -bool true

Always show Menu bar even in Full Screen:

defaults write NSGlobalDomain AppleMenuBarVisibleInFullscreen -int 1

Manual Settings

Uncheck 'Play user interface sound effects' in Sound

Uncheck 'Play feedback when volume is changed' in Sound

Lower 'Alert volume' to zero in Sound

Set 'Turn display off after' to ten minutes in Battery

Enable 'Secondary click' in Mouse

Uncheck 'Bookmarks & History' in Spotlight's Search Results

Uncheck 'Fonts' in Spotlight's Search Results

Uncheck 'Mail & Messages' in Spotlight's Search Results

Uncheck 'Movies' in Spotlight's Search Results

Uncheck 'Music' in Spotlight's Search Results

Settings -> Accessibility -> Display -> 'Show window title Icons'

Set Launchpad Column Layout to 8x6 in TinkerTool

Command Line Tools

  • Atuin
  • delta git pager output replacement
  • fzf fuzzy search, for files or any list
  • ripgrep rg is a faster recursive grep search
  • bat a cat replacement with VCS knowledge
  • exa an ls replacement
  • hyperfine command line benchmarking
  • z a port of z for fish, z is a directory jumper
  • btop better top, as good as activity monitor
  • neofetch sys info
  • xcbeautify better xcodebuild formatting
  • yazi file browser

Fish

Why fish?

Shows you when executables don't exist before you call them in the terminal, abbreviations expand, functions, etc.

Fish Plugins

  • Fisher
  • fisher install decors/fish-colored-man
  • fisher install jethrokuan/z
  • fisher install jorgebucaran/hydro
  • joseluisq/gitnow (delete ~/config/fish/completions/branch.fish to fix option key jumping in terminal prompt)

config.fish:

set fish_greeting ''

if status is-interactive
    # Commands to run in interactive sessions can go here
end

abbr gs "git status"
abbr ad "arc diff HEAD^ --no-codegen"
abbr gdt "git difftool HEAD^ HEAD"
abbr gb "git branch"
abbr gl "git log"
abbr gca "git commit --amend --no-edit"
abbr gpr "git pull --rebase origin main"
abbr gch "git checkout HEAD~1"
abbr gcp "git cherry-pick"

alias ls 'eza --long --header --inode'
alias cat 'bat'
alias s '/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl'

set -x EDITOR vim
set -x VISUAL $EDITOR

Functions

~/config/fish/functions/fish_prompt.fish

function fish_prompt --description Hydro
    echo (set_color brmagenta)"────────────────────────────────────"(set_color normal)
    echo -e "$_hydro_color_start$hydro_symbol_start$hydro_color_normal$_hydro_color_pwd$_hydro_pwd$hydro_color_normal $_hydro_color_git$$_hydro_git$hydro_color_normal$_hydro_color_duration$_hydro_cmd_duration$hydro_color_normal$_hydro_status$hydro_color_normal "
end

~/config/fish/functions/gdbr.fish

function gdbr
    # Use a local variable to store the current branch name:
    set -l CURR_BRANCH (git rev-parse --abbrev-ref HEAD)
    
    git checkout main
    git branch -D $CURR_BRANCH
end

~/config/fish/functions/grb.fish

function grb
    # Use a local variable to store the current branch name:
    set -l CURR_BRANCH (git rev-parse --abbrev-ref HEAD)
    
    git checkout main
    git rebase origin main
    git checkout $CURR_BRANCH
    git rebase main
end

~/config/fish/functions/tree.fish

function tree
  eza --tree --level=2
end

~/config/fish/functions/man.fish

function man --wraps man --description 'Format and display manual pages'
    set -q man_blink; and set -l blink (set_color $man_blink); or set -l blink (set_color -o red)
    set -q man_bold; and set -l bold (set_color $man_bold); or set -l bold (set_color -o 5fafd7)
    set -q man_standout; and set -l standout (set_color $man_standout); or set -l standout (set_color 949494)
    set -q man_underline; and set -l underline (set_color $man_underline); or set -l underline (set_color -u afafd7)

    set -l end (printf "\e[0m")

    set -lx LESS_TERMCAP_mb $blink
    set -lx LESS_TERMCAP_md $bold
    set -lx LESS_TERMCAP_me $end
    set -lx LESS_TERMCAP_so $standout
    set -lx LESS_TERMCAP_se $end
    set -lx LESS_TERMCAP_us $underline
    set -lx LESS_TERMCAP_ue $end
    set -lx LESS '-R -s'

    set -lx GROFF_NO_SGR yes # fedora

    set -lx MANPATH (string join : $MANPATH)
    if test -z "$MANPATH"
        type -q manpath
        and set MANPATH (command manpath)
    end

    # Check data dir for Fish 2.x compatibility
    set -l fish_data_dir
    if set -q __fish_data_dir
        set fish_data_dir $__fish_data_dir
    else
        set fish_data_dir $__fish_datadir
    end

    set -l fish_manpath (dirname $fish_data_dir)/fish/man
    if test -d "$fish_manpath" -a -n "$MANPATH"
        set MANPATH "$fish_manpath":$MANPATH
        command man $argv
        return
    end
    command man $argv
end
@zheqd
Copy link
Copy Markdown

zheqd commented Nov 26, 2024

Response to 'Why oh-my-zsh' section. If autocompletion with up and down arrows from history is the only reason - try this solution. Add to your .zshrc:

autoload -U up-line-or-beginning-search
autoload -U down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
bindkey "^[[A" up-line-or-beginning-search # Up
bindkey "^[[B" down-line-or-beginning-search # Down

Or check related key bindings in ohmyzsh project https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/key-bindings.zsh#L48-L49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment