Skip to content

Instantly share code, notes, and snippets.

@superbob
Created October 28, 2017 12:33
Show Gist options
  • Save superbob/349776fdf5c8e082de4cd4b7c867835a to your computer and use it in GitHub Desktop.
Save superbob/349776fdf5c8e082de4cd4b7c867835a to your computer and use it in GitHub Desktop.
A .zshrc for use with oh-my-zsh on MacOS, fixes COLOR issues (ls colors, tab completion colors) and more.
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="powerlevel9k/powerlevel9k"
DEFAULT_USER="..."
export LS_COLORS="di=34;40:ln=36;40:so=35;40:pi=33;40:ex=32;40:bd=1;33;40:cd=1;33;40:su=0;41:sg=0;43:tw=0;42:ow=34;40:"
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon dir vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(background_jobs status time)
POWERLEVEL9K_MODE='awesome-patched'
POWERLEVEL9K_SHORTEN_DIR_LENGTH=2
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"
# Comment this out to disable weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"
# Uncomment following line if you want to disable colors in ls
# DISABLE_LS_COLORS="true"
# Uncomment following line if you want to disable autosetting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment following line if you want red dots to be displayed while waiting for completion
# COMPLETION_WAITING_DOTS="true"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(git mvn)
source $ZSH/oh-my-zsh.sh
export LSCOLORS="exgxfxdacxDaDaxbadacex"
# Customize to your needs...
# export display to XQuartz
export DISPLAY=":0"
export SCALA_HOME=/opt/scala/current
export SBT_HOME=/opt/sbt/current
export M2_HOME=/opt/apache-maven/current
export NODE_HOME=/opt/node/current
export GRADLE_HOME=/opt/gradle/current
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
export CMAKE_HOME=/Applications/CMake.app/Contents
export PATH=$PATH:$SCALA_HOME/bin:$SBT_HOME/bin:$M2_HOME/bin:$NODE_HOME/bin:$GRADLE_HOME/bin:$JAVA_HOME/bin:$CMAKE_HOME/bin
alias p4merge="/Applications/p4merge.app/Contents/Resources/launchp4merge"
# added by travis gem
[ -f /Users/.../.travis/travis.sh ] && source /Users/.../.travis/travis.sh
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
@GabeAtWork
Copy link

GabeAtWork commented Oct 30, 2017

I think I'm missing something to install the fonts, the instructions from that wiki didn't make them available to the terminal.

Any clue @superbob?

Update:

I uninstalled Inconsolata for Powerline and switched to Inconsolata Awesome (https://github.com/gabrielelana/awesome-terminal-fonts/tree/patching-strategy/patched) and it works like a charm!

@superbob
Copy link
Author

superbob commented Nov 8, 2017

Perfect !

@MartinJohannesNilsen
Copy link

Thank you for this!

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