-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
152 lines (114 loc) · 4.02 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# Tilix VTE fix
if [ $TILIX_ID ] || [ $VTE_VERSION ]; then
source /etc/profile.d/vte.sh
fi
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
source ~/.zsh/antigen.zsh
#######################
# #
# Antigen #
# #
#######################
# Load the oh-my-zsh's library.
antigen use oh-my-zsh
# Bundles from the default repo (robbyrussell's oh-my-zsh).
antigen bundle git
antigen bundle heroku
antigen bundle pip
antigen bundle lein
antigen bundle command-not-found
# Custom bundles/plugins
antigen bundle common-aliases
antigen bundle docker
antigen bundle git-extras
antigen bundle git-flow
antigen bundle github
antigen bundle python
antigen bundle repo
antigen bundle sudo
antigen bundle vagrant
antigen bundle web-search
command -v python3 > /dev/null && antigen bundle djui/alias-tips
antigen bundle zsh-users/zsh-autosuggestions
antigen bundle zsh-users/zsh-syntax-highlighting
# Set the used theme
antigen theme romkatv/powerlevel10k
antigen theme spaceship-prompt/spaceship-prompt # <-- this could be better for server than this v
#antigen theme juanghurtado # this is for servers
antigen apply
#######################
# #
# Aliases #
# #
#######################
unalias rm # adds -i flag
unalias duf # idk, wierd alias
unalias -s pdf # suffix alias ('$ readme.pdf' -> '$ acroread readme.pdf'
alias -s pdf=evince
alias dc=docker-compose
alias ip="ip -c"
#alias ls='colorls --gs --sd' # if colorls is installed
alias data-wine="WINEPREFIX=/mnt/data/programs/windows wine"
alias data-winetricks="WINEPREFIX=/mnt/data/programs/windows winetricks"
# Modern UNIX
command -v bat > /dev/null && alias cat=bat
command -v gping> /dev/null && alias ping=gping
command -v dog > /dev/null && alias dig="dog A AAAA MX TXT NS "
command -v exa > /dev/null && alias ls="exa --icons --classify --all --header --group --modified --changed --git --long --group-directories-first"
#alias git=hub # Uncomment if hub is installed
source ~/.zsh/aliases.local
#######################
# #
# ENV vars #
# #
#######################
export EDITOR="/usr/bin/vim"
export GOPATH="$HOME/go"
export PATH="$PATH:$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:${GOPATH//://bin:}/bin"
#export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
export ANSIBLE_NOCOWS=1
export LUTRIS_ENABLE_PROTON=1
#######################
# #
# Configs #
# #
#######################
# alias-tips
export ZSH_PLUGINS_ALIAS_TIPS_FORCE=0 # Force usage of aliases
export ZSH_PLUGINS_ALIAS_TIPS_EXPAND=1 # Expand aliases
export ZSH_PLUGINS_ALIAS_TIPS_TEXT="Alias tip: " # Alias tip text
export ZSH_PLUGINS_ALIAS_TIPS_EXCLUDES="_ ll vi" # Alias tip exclude list
export ZSH_PLUGINS_ALIAS_TIPS_REVEAL=0 # Show command behind alias
command -v bat > /dev/null && export MANPAGER="sh -c 'col -bx | bat -l man -p'"
#######################
# #
# Functions #
# #
#######################
function mcd() {
mkdir -p $1
cd $1
}
function cdtmp() {
temp=$(mktemp -d)
cd $temp
}
#######################
# #
# Misc #
# #
#######################
#######################
# #
# Final includes #
# #
#######################
# asdf-vm
([[ -f ~/.asdf/asdf.sh ]] && source ~/.asdf/asdf.sh) || ([[ -f /opt/asdf-vm/asdf.sh ]] && source /opt/asdf-vm/asdf.sh)
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ -f ~/.zsh/.p10k.zsh ]] && source ~/.zsh/.p10k.zsh