-
Notifications
You must be signed in to change notification settings - Fork 9
/
zshrc
85 lines (66 loc) · 2.03 KB
/
zshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# ENV VARS
export EDITOR='vim'
export GPG_TTY=$(tty)
# Work stuff
export VAGRANT_INSTALLER_ENV=1
export GOPATH=$HOME/go
export GOBIN=$GOPATH/bin
# ENV VARS
# Vagrant alias
# vmware vagrant plugin helper functions
function startvmware () {
sudo --background $HOME/go/src/github.com/hashicorp/vagrant-vmware-desktop/go_src/vagrant-vmware-utility/vagrant-vmware-utility api
}
function killvmware () {
sudo pkill -f -u root "vagrant-vmware-utility api"
}
# end
# Docker aliases
function docker-system-cleanup() {
docker stop $(docker ps -a -q);docker rm $(docker ps -a -q);docker system prune -f;docker volume prune -f
}
function docker-cleanup() {
docker stop $(docker ps -a -q);docker rm $(docker ps -a -q);docker volume prune -f
}
# Crusty workaround for fixing trackpad when waking up from sleep
# Lenovo laptop with Ubuntu
function restartmouse() {
sudo modprobe -r psmouse;sudo modprobe psmouse
}
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# My custom theme
ZSH_THEME="brian"
# PATH
export PATH="$HOME/go/bin:/usr/lib/go-1.17/bin:$HOME/bin:$HOME/.bin:/usr/local/homebrew/bin:/usr/local/bin:/usr/local/sbin:/usr/local/git/bin:$PATH"
# Aliases
# Ubuntu specific
if [ "$(uname 2> /dev/null)" = "Linux" ]; then
# pbcopy but for ubuntu
alias pbcopy="xclip -selection clipboard"
alias open="xdg-open"
fi
# neovim
alias vim="nvim"
alias oldvim="/usr/bin/vim"
# ruby stuff
alias be='bundle exec'
# rake [] fix for zsh
alias rake='noglob rake'
# Reload ZSH Config
alias reload='. ~/.zshrc'
# ls
alias ls="ls -GF"
alias l="ls -Glah"
alias la='ls -GA'
# tree with color and hidden files
alias tree="tree -C -a"
# commands starting with % for pasting from web
alias %=' '
# Uncomment to change how often before auto-updates occur? (in days)
# export UPDATE_ZSH_DAYS=13
# 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 brew)
source $ZSH/oh-my-zsh.sh