-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
77 lines (59 loc) · 1.98 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
# Setting ZSH
export ZSH=~/.oh-my-zsh
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
# Set visual theme
ZSH_THEME="powerlevel10k/powerlevel10k"
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# 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
# Load some secrets
if [ -f ~/.tools/secrets.sh ]; then
source ~/.tools/secrets.sh;
fi
# Attach os detector, now OS var constains either "macos" or "linux"
source ~/.tools/os_detector.sh
# Depending on OS type set ZSH plugins
if [[ "$OS_TYPE" == "macos" ]]; then
plugins=(git docker iterm2 gpg-agent tmux kubectl)
elif [[ "$OS_TYPE" == "linux" ]]; then
plugins=(git gpg-agent docker tmux)
fi
# Loading Oh My Zsh settings
source $ZSH/oh-my-zsh.sh
# Theme init finish. Let's load OS dependednt code
# Editor
export EDITOR='nvim'
# ssh
export DEVPATH=$HOME/Developer
export PATH=$DEVPATH/bin:/usr/local/sbin:$PATH
# Aliases
alias t="eza --tree -a -L 1"
alias d="cd $DEVPATH"
alias l="eza -lhg --group-directories-first --icons"
alias la="l -a"
alias lt='eza --tree --level=2 --long --icons --git'
alias vim="nvim"
alias rmix="remixd -s $PWD -u https://remix.ethereum.org"
# Load all the zsh-completions
autoload -U compinit && compinit
# Beggining of OS dependednt sections
if [[ "$OS_TYPE" == "macos" ]]; then
source $HOME/.tools/macos.sh
elif [[ "$OS_TYPE" == "linux" ]]; then
source $HOME/.tools/linux.sh
fi
if [[ -f $HOME/.tools/projects.sh ]]; then
source $HOME/.tools/projects.sh
fi
if [[ -f $HOME/.tools/docker.sh ]]; then
source $HOME/.tools/docker.sh
fi
if [[ -f $HOME/.tools/hosts.sh ]]; then
source $HOME/.tools/hosts.sh
fi