Giter Site home page Giter Site logo

mac-setup's Introduction

Setting up a new Mac

This repository contains personal dotfiles and scripts for setting up a new Mac, inspired by Nina Zakharenko. Aliases and macOS configuration heavily inspired by Mathias's dotfiles. This repo was originally forked from Sean Meling Murray's mac setup.

Useful resources:

Install from script

Note that Homebrew requires XCode. Depending on your operating system, you may or may not have XCode installed.

To download the CLT tools for XCode, run the following command:

xcode-select --install

To setup your new Mac, run the following command:

sh -c "`curl -L https://git.io/JU06o`"

Manual setup

The following steps are performed manually:

Alfred

1Password

Install Chrome extension.

iTerm2

  • iTerm2 → Profiles → General
    • Other Actions → Import JSON profiles
  • Change bright black to lighter colour for visibility when using zsh-autosuggestions.
  • Optional: iTerm2 → Preferences → General
    • Load preferences from custom folder (initialise empty folder)
    • Save changes to folder when iTerm2 quits
    • Save current settings

Powerlevel10k

  • Powerlevel10K should automatically prompt you to download the Meslo Nerd font. If it doesn't, download them and install manually. After installation, set your font to MesloLGS NF in iTerm.
  • Uncomment battery in typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS, move to appropriate place.

System Preferences

  • System Preferences → Keyboard
    • Adjust Key Repeat and Delay Until Repeat to desired sensitivity.
    • Press Fn key to: Show Control Strips
    • Remap ⌘ + Space to Alfred, change Spotlight to ⌥ + Space.
  • System Preferences → Keyboard → Customise Control Strip
    • Remove Siri from Touch Bar
  • System Preferences → Trackpad
    • Secondary click
    • Tap to click
  • Change where screenshots are saved: Screenshot → Options → Save to.

Visual Studio Code

  • Open Code → Preferences → Settings:
    • terminal.integrated.fontFamily, set the value to MesloLGS NF
    • files.trimTrailingWhitespace
    • editor.formatOnSave
  • Shell command: Install 'code' command in PATH
  • Install the following extensions:
    • Dracula Official
    • ESLint
    • GitLens
    • Prettier
    • Python
    • Python Docstring Generator
    • Rainbow Brackets
    • Svelte 3 Snippets
    • Svelte for VS Code
    • Svelte Intellisense
    • Todo Tree
    • vscode-icons

Oh My Zsh

  • plugins=(git alias-finder jsontools)
  • If you notice your shell is slow when pasting text into it, you might want to uncomment this line in your .zshrc: # DISABLE_MAGIC_FUNCTIONS=true.

zsh-history-substring-search

  • Key bindings:
# Add to .zshrc
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down

fzf

  • See Boost Your Command-Line Productivity With Fuzzy Finder for an excellent guide to fzf.

  • Fix problem with Alt + C by adding bindkey "ç" fzf-cd-widget to .zshrc.

  • fzf binds ** to fuzzy autocompletion, which conflicts with globbing. To change this, set export FZF_COMPLETION_TRIGGER='**' in .zshrc and change ** to whatever you like.

  • Optional: Options can be added to $FZF_DEFAULT_OPTS so that they are always applied, not only to fzf but also when using key bindings and fuzzy completion.

# Add to .zshrc
export FZF_DEFAULT_OPTS="
--layout=reverse
--info=inline
--height=80%
--multi
--preview-window=:hidden
--preview '([[ -f {} ]] && (bat --style=numbers --color=always {} || cat {})) || ([[ -d {} ]] && (tree -C {} | less)) || echo {} 2> /dev/null | head -200'
--color='hl:148,hl+:154,pointer:032,marker:010,bg+:237,gutter:008'
--prompt='∼ ' --pointer='▶' --marker='✓'
--bind '?:toggle-preview'
--bind 'ctrl-a:select-all'
--bind 'ctrl-y:execute-silent(echo {+} | pbcopy)'
--bind 'ctrl-v:execute(code {+})'
"
  • Note that the options above require bat, which can be install via brew install bat. WARNING: bat installation takes a long time on older versions of macOS.

Other apps

mac-setup's People

Contributors

smu095 avatar storesund avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.