-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_zshrc
86 lines (60 loc) · 1.91 KB
/
dot_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
# Activate Powerlevel10k Instant Prompt.
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
# Variables
ZSH_AUTOSUGGEST_MANUAL_REBIND=1
ZSH_CONFIG_HOME="$HOME/.config/zsh"
# Configuration
source $ZSH_CONFIG_HOME/general.zsh
source $ZSH_CONFIG_HOME/keymap.zsh
source $ZSH_CONFIG_HOME/completion.zsh
# Load plugins
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
source /usr/share/fzf/key-bindings.zsh
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# Environment variables
source $ZSH_CONFIG_HOME/env.zsh
# Aliases
alias ls="exa --icons --color=auto --group-directories-first"
alias ip="ip --color=auto"
alias cat="bat --theme base16"
alias grep='grep --color=auto'
alias df='df -h'
alias du='du -h'
[[ $TERM == "xterm-kitty" ]] && alias ssh="kitty +kitten ssh"
#export GPG_TTY=$TTY
#gpg-connect-agent updatestartuptty /bye >/dev/null
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
update() {
/usr/bin/paru $@ && systemctl --user start updates.service
}
#alias paru="update"
paru() {
case "$@" in
*"-Syu"*)
update $@
;;
*"-U"*)
update $@
;;
*)
/usr/bin/paru $@
;;
esac
}