Skip to content

About

script to set up my mac

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

521 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gian's current macOS setup

as of Apr 2026, Sequoia 15

Initial setup

Dead simple script to setup my new Mac:

cd ~/Downloads
curl -sL https://raw.githubusercontent.com/gianpaj/mac-setup-script/master/defaults.sh | bash
curl -O https://raw.githubusercontent.com/gianpaj/mac-setup-script/master/install.sh
chmod +x install.sh
./install.sh
./install.sh >> install_log.txt

Taken from https://github.com/pathikrit/mac-setup-script

  1. Install brew

  2. Clone repo

    git clone git@github.com:gianpaj/mac-setup-script.git
  3. Set macOS settings

    cd mac-setup-script
    bash defaults.sh
  4. Exclude generated data from Spotlight

    bash spotlight-exclusions.sh
  5. Install apps

    bash install.sh
  6. Reboot

Spotlight exclusions

Run spotlight-exclusions.sh to stop Spotlight from indexing code, developer caches, and virtual machine data. The script creates a .metadata_never_index file in each directory that exists. It needs no administrator privileges and is safe to run more than once.

The script excludes these directories:

  • ~/github
  • ~/freelance
  • ~/tmp
  • ~/esp
  • ~/Library/Developer
  • ~/Library/Application Support/Zed
  • ~/Library/Application Support/Claude
  • ~/Library/Containers/com.docker.docker/Data
  • ~/Library/Group Containers/*.orbstack/data

Spotlight and Finder search omit files under these directories. This does not delete files, free disk space, or affect search inside development tools.

Applications

Hardware

  • Karabiner Elements

    • to fix the back tick character ` when pressing §
    • non_us_backslash to grave_accent_and_tilde
  • Alfred workflows

    • SwitchAudioSource (to switch between audio devices)

      Alfred Switch AudioSource wo

    • Switch Appearance – Change between Light and Dark Mode

      Alfred-Switch Appearance Workflow

Work desktop apps

  • Linear - Ruler app with web-development in mind

    My bug fix

    git clone git@github.com:gianpaj/linear.git
    git checkout -b upgrade-electron-package origin/upgrade-electron-package
    npm install
    npm run package

    Disable Gatekeeper:

    sudo spctl --master-disable

Productivity apps

  • Horo (timer/pomorodo menu app)

Software development apps

  • VSCode

  • Android Studio

    • Android SDK path
  • Xcode

    • Command-line tools
  • asdf (Manage multiple runtime versions - Node.js, Python, etc.)

  • iTerm2

    • Zsh (Guide)

    • oh-my-zsh

      sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
      • zsh-syntax-highlighting

        git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
      • zsh-autosuggestions

        git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
      • zsh-completions

        git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions
      • pure - Pretty, minimal and fast ZSH prompt

        (already installed in install.sh)

      • Update .zshrc

    • Load .zshrc from Dropbox

      cd ~
      ln -s ~/Dropbox/Mac/.zshrc .zshrc
      
      # results in
      $ l .zshrc
      lrwxr-xr-x - gianpaj 30 Aug  2022 .zshrc -> /Users/gianpaj/Dropbox/Mac/.zshrc
    • Load .aliases from Git repo

      cd ~
      ln -s ~/github/gianpaj/mac-setup-script/bash/.aliases .aliases
      
      # results in
      $ l .aliases
      lrwxr-xr-x - gianpaj 29 Nov 12:11 -M .aliases -> /Users/gianpaj/github/gianpaj/mac-setup-script/bash/.aliases
    • Load ~/.config/starship.toml

      cd ~
      ln -s ~/github/gianpaj/mac-setup-script/bash/starship.toml ~/.config/starship.toml
      
      # results in
      $ l ~/.config/starship.toml
      lrwxr-xr-x@ - gianpaj 13 Sep 18:49 -N /Users/gianpaj/.config/starship.toml -> /Users/gianpaj/github/gianpaj/mac-setup-script/bash/starship.toml
  • asdf

    asdf plugin-add python
    asdf install python latest
    ln -s ~/github/gianpaj/mac-setup-script/.default-npm-packages ~/.default-npm-packages
  • zed config

    ln -s ~/github/gianpaj/mac-setup-script/apps/zed/settings.json ~/.config/zed/settings.json
    ln -s ~/github/gianpaj/mac-setup-script/apps/zed/keymap.json ~/.config/zed/keymap.json
    ln -s ~/github/gianpaj/mac-setup-script/apps/zed/snippets.json ~/.config/zed/snippets.json

Clean merged branches

git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d

Ubuntu linux useful commands

Upgrade all security packages

sudo apt-get -s dist-upgrade | grep "^Inst" | grep -i securi | awk -F " " {'print $2'}
sudo apt-get -s dist-upgrade | grep "^Inst" | grep -i securi | awk -F " " {'print $2'} | xargs sudo apt-get install -y

General apps

Firefox Settings

about:config

Firefox Extensions

Chrome Extensions

Web development

uBlock filters

ublock-filters

Desktop apps

  • Giphy Capture

  • or kap

    brew install kap --cask

Resources

About

script to set up my mac

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Contributors

Languages