Skip to content

p-sun/my-mac-setup-with-themes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mac Themes and Setup for Developers

Show hidden Mac files

  • To show hidden files, type defaults write com.apple.finder AppleShowAllFiles YES, followed by killall Finder to restart the Finder.

Change the Mac's default screenshot folder

By default, screenshots are saved on your desktop. I prefer keeping a clean desktop.

  • Create a folder for your screenshots with mkdir Documents/Screenshots. Drag the Screenshots folder in to the left panel in Finder to bookmark it.
  • Change the default location of your screenshots with defaults write com.apple.screencapture location ~/Documents/Screenshots

Color Schemes for iTerm2

Felix Krause has a beautiful setup. We will be following his guide.

  • Install iTerm 2
    • Once installed, go to iTerm2 -> Make iTerm2 Default Term
  • Install oh-my-zsh
    • sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
    • Set zsh as your default shell with chsh -s /bin/zsh
  • Install Powerline-shell to get the cool bars that tell you which directory and git branch you're on.
git clone https://github.com/b-ryan/powerline-shell
cd powerline-shell
python setup.py install
  • Go to your root user directory, change the ZSH_THEME in your .zshrc to ZSH_THEME="agnostor"
  • Add the following to your .zshrc:
function powerline_precmd() {
  PS1="$(powerline-shell --shell zsh $?)"
}

function install_powerline_precmd() {
  for s in "${precmd_functions[@]}"; do
    if [ "$s" = "powerline_precmd" ]; then
      return
    fi
  done
  precmd_functions+=(powerline_precmd)
}

if [ "$TERM" != "linux" ]; then
    install_powerline_precmd
fi
  • Install Powerline fonts
    • Open install.sh with iTerm2.
    • In iTerm2, go to Preferences -> Profiles -> Text -> Change Font -> Pick Meslo LG M for Powerline
  • Customize the bars in Powerline-shell:
    • Powerline-shell is customizable through the use of a config file. You can generate the config file with
powerline-shell --generate-config > ~/.powerline-shell.json
  • Then you can edit .powerline-shell.json in your user directory to add or remove bars in iTerm2. I like these settings:
{
   "segments": [
   "cwd",
   "git"
  ],
  "cwd": {
    "max_depth": 3
  }
}
  • Quit iTerm2 and restart it to see the new Powerline Shell.
  • To set the scheme to SolarizedDark, chose the scheme from Preferences -> Profiles -> Colors -> Color presets.

Oh My ZSH Autocomplete

  • Download zsh-autosuggestions

git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions

  • Download zsh-syntax-highlighting by

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting

  • In ~/.zshrc, append zsh-autosuggestions & zsh-syntax-highlighting with
plugins=(
  git,
  zsh-autosuggestions,
  zsh-syntax-highlighting
)

Visual Studio Code

To setup the zsh shell inside the terminal inside Visual Studio Code:

brew tap homebrew/cask-fonts                # you only have to do this once!
brew cask install font-meslo-nerd-font
  • Code -> Preferences -> Settings -> click the curley braces icon on the top right to edit the settings.json. Assuming yours started off blank, add these lines to use the zsh shell inside the integrated terminal inside VSCode.
{
    "terminal.external.osxExec": "iTerm.app",
    "terminal.integrated.shell.osx": "/bin/zsh",
    "terminal.integrated.fontFamily": "MesloLGM Nerd Font"
}

Color Themes

Color Themes for Terminal

  • Though I prefer iTerm 2, if you prefer Terminal, feel free to copy .bash_profile & TermTheme.scpt into your home folder. Now you can switch to a random themes by typing the alias l.

Color Themes for Xcode

  • Add the themes to Applications -> Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/Resources/FontAndColorThemes

Color Themes for RubyMine & IntelliJ IDEA

  1. Go to File | Import Settings... and specify the theme directory or the settings.jar file. Click OK in the dialog that appears.

  2. Restart IntelliJ IDEA or RubyMine

  3. Go to Preferences | Editor | Colors & Fonts and select one of the new color themes.

Essential Software

Essential AppStore Apps

  • Xcode
  • Gifox
  • Notability

Essential Terminal

  • iTerm 2
  • Homebrew
  • CocoaPods
  • yarn
  • nodejs

Essential Development

  • Slack
  • RubyMine
  • Sourcetree
  • Sublime
  • IntelliJIdea
  • Atom
  • VSCode
  • Unity
  • Blender
  • Android Studio

Misc Productivity

  • Skype
  • VLC Player
  • Chrome
  • Chrome Adblock
  • Flux
  • Postman
  • ShiftIt

ZSH Shortcuts

After you've set up Oh My ZSH, in ~/.zshrc, add aliases to add some shortcuts you can use in terminal to replace commonly used commands.

  • alias gco="git checkout" so you can write gco -b feature/home_page instead of git checkout -b feature/home_page
  • alias gitmegaclean="git branch --merged | grep -v \"\*\" | grep -v master | grep -v develop | xargs -n 1 git branch -d && git remote update origin --prune" This will allow the command gitmegaclean to remove all local branches that have been merged to develop or master, and delete local branches that have been removed upstream.
  • `alias cdm="cd /Users/psun/Documents/My_Project_Folter" sets up an easy alias for jumping into the directory of your current project

Copying keychain (i.e. Safari passwords)

About

Setup a prettier, and more powerful terminal. Color theme your IDEs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published