-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
110 lines (99 loc) · 4.29 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#==============================================================================
#
# ███████╗███████╗██╗ ██╗
# ╚══███╔╝██╔════╝██║ ██║
# ███╔╝ ███████╗███████║
# ███╔╝ ╚════██║██╔══██║
# ███████╗███████║██║ ██║
# ╚══════╝╚══════╝╚═╝ ╚═╝
#
# Description: ZSH configuration file
# Author: Alexandre Bouthinon
#==============================================================================
#==============================================================================
# Environment variables
#==============================================================================
# Common variables
#------------------------------------------------------------------------------
export PATH=$HOME/.local/bin:$HOME/.tfenv/bin:/usr/local/bin:$PATH
export ZSH="$HOME/.oh-my-zsh"
export EDITOR=vim
# Node.js Version Manager setup
#------------------------------------------------------------------------------
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
# Golang setup
#------------------------------------------------------------------------------
export GOPATH=$HOME/.go
export GOBIN=$GOPATH/bin
#==============================================================================
# Aliases
#==============================================================================
# Common aliases
#------------------------------------------------------------------------------
alias zshconfig="vim $HOME/.zshrc"
alias ncmpcpp="ncmpcpp -b $HOME/.config/ncmpcpp/bindings"
alias ssh="TERM=xterm ssh"
alias vim="nvim"
alias vi="nvim"
# Dotfiles management aliases
#------------------------------------------------------------------------------
alias dotfiles="/usr/bin/git --git-dir=$HOME/.dotfiles.git/ --work-tree=$HOME"
alias dotstatus="dotfiles status"
alias dotdiff="dotfiles diff"
alias dotadd="dotfiles add"
alias dotcommit="dotfiles commit"
alias dotpush="dotfiles push"
#==============================================================================
# Oh My ZSH
#==============================================================================
# Theme
#------------------------------------------------------------------------------
ZSH_THEME="spaceship"
SPACESHIP_PROMPT_ORDER=(
user # Username section
dir # Current directory section
host # Hostname section
git # Git section (git_branch + git_status)
package # Package version
node # Node.js section
golang # Go section
php # PHP section
rust # Rust section
docker # Docker section
aws # Amazon Web Services section
terraform # Terraform workspace section
line_sep # Line break
char # Prompt character
)
SPACESHIP_RPROMPT_ORDER=(
exec_time # Execution time
battery # Battery level and status
jobs # Background jobs indicator
exit_code # Exit code section
time # Time stamps section
)
SPACESHIP_RUST_SYMBOL="🦀 "
SPACESHIP_RUST_COLOR=yellow
SPACESHIP_DIR_TRUNC=0
SPACESHIP_TIME_SHOW=true
SPACESHIP_PROMPT_ADD_NEWLINE=false
SPACESHIP_PROMPT_SEPARATE_LINE=false
SPACESHIP_EXIT_CODE_SHOW=true
# Plugins
#------------------------------------------------------------------------------
plugins=(
git # Git prompt info
docker # Docker and Docker Compose autocomplete
zsh-syntax-highlighting # Fish-like syntax highlight
kubectl helm # Kubernetes tools completion and aliases
)
source $ZSH/oh-my-zsh.sh
#==============================================================================
# Start X session on login
#==============================================================================
if systemctl -q is-active graphical.target && [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
exec startx
fi
# vim:fileencoding=utf-8:ft=sh