Skip to content

Instantly share code, notes, and snippets.

@zeraphie
Last active June 12, 2018 16:34
Show Gist options
  • Save zeraphie/099f23f8dce7cd72c0b53d3054ddf5db to your computer and use it in GitHub Desktop.
Save zeraphie/099f23f8dce7cd72c0b53d3054ddf5db to your computer and use it in GitHub Desktop.
Dotfiles

System Preferences

In my System Preferences I've set the following:

  • Background: #1D1F20
  • Text Colour: #EFEFEF
  • Selection: #9FB8D8
  • Cursor: Vertical Bar
  • Blink Cursor: Checked

Oh My Zsh

I've used https://github.com/robbyrussell/oh-my-zsh to edit the look of the shell and chosen the avit theme.

I've added a few things to the ~/.zshrc file which are as follows:

# Some commands were missing - Also ran `brew install nvm`
export PATH=$HOME/bin:/usr/local/sbin:/usr/lib/google-cloud-sdk/bin:$PATH

# Completion - Also ran `brew install bash-completion`
autoload bashcompinit
bashcompinit

# Bash config files
source ~/.bash_profile
source ~/.bashrc

Note: Because I'd done several installs before oh my zsh, I needed to also adjust the gcloud files in my ~/.bash_profile (renamed files to zsh files instead of bash ones)

# To use instead of cd!
c() {
# cd to the given directory
if [[ "$@" != "." ]]; then
# If "." don't do anything, so that "cd -" still works
# Don't output the path as I'm going to anyway (done by "cd -" and cdspell)
cd "$@" >/dev/null || return
fi
# Output the path
echo
echo -en "\033[4;1m"
echo $PWD
echo -en "\033[0m"
# List the directory contents
ls -hFG
}
# Go up in directories
alias u='c ..'
alias uu='c ../..'
alias uuu='c ../../..'
alias uuuu='c ../../../..'
alias uuuuu='c ../../../../..'
alias uuuuuu='c ../../../../../..'
# Go back easily
alias b='c -'
# List all files with hidden ones - -G for MAC
alias l='ls -laG'
# Set the editor
alias e='vim'
# Do the git
alias g='git'
# 'git' with no parameters loads interactive REPL
git() {
if [ $# -gt 0 ]; then
command git "$@"
else
command git status &&
command git repl
fi
}
[user]
name = <name>
email = <email>
[github]
user = <user>
[alias]
a = add -A
c = commit -m
co = checkout
l = log --decorate --name-status
p = push
pu = push --set-upstream origin HEAD
remotes = remote -v
s = status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment