blob: 8b84f2cb26c354235d629844615e5cf7f308eb9f (
plain)
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
|
# 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
### Added by Zinit's installer
if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then
print -P "%F{33}▓▒░ %F{220}Installing %F{33}DHARMA%F{220} Initiative Plugin Manager (%F{33}zdharma/zinit%F{220})…%f"
command mkdir -p "$HOME/.zinit" && command chmod g-rwX "$HOME/.zinit"
command git clone https://github.com/zdharma-continuum/zinit "$HOME/.zinit/bin" && \
print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
print -P "%F{160}▓▒░ The clone has failed.%f%b"
fi
source "$HOME/.zinit/bin/zinit.zsh"
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit
# Load a few important annexes, without Turbo
# (this is currently required for annexes)
zinit light-mode for \
zdharma-continuum/z-a-rust \
zdharma-continuum/z-a-as-monitor \
zdharma-continuum/z-a-patch-dl \
zdharma-continuum/z-a-bin-gem-node
### End of Zinit's installer chunk
# Highlighting
zinit ice lucid wait='0' atinit='zpcompinit'
zinit light zsh-users/zsh-syntax-highlighting
# Completions
zinit ice lucid wait='0'
zinit light zsh-users/zsh-completions
# Powerlevel10k
zinit ice depth=1
zinit light romkatv/powerlevel10k
# Zprof
zmodload zsh/zprof
# Load from oh-my-zsh
zinit wait="1" lucid for \
OMZL::clipboard.zsh \
OMZL::git.zsh \
OMZL::history.zsh \
OMZP::systemd/systemd.plugin.zsh \
OMZP::sudo/sudo.plugin.zsh \
OMZP::git/git.plugin.zsh
# Auto suggestions
zinit ice lucid wait='0' atload='_zsh_autosuggest_start'
zinit light zsh-users/zsh-autosuggestions
# zsh-proxy
zinit light SukkaW/zsh-proxy
# Easier navigation: .., ..., ...., ....., ~ and -
# Copied from https://github.com/mathiasbynens/dotfiles/blob/main/.aliases
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias ~="cd ~" # `cd` is probably faster to type though
alias -- -="cd -"
# From openSUSE /etc/zshrc
alias beep='echo -en "\007"'
alias dir='ls -l'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias grep='grep --color=auto'
alias ip='ip --color=auto'
alias l='ls -alF'
alias la='ls -la'
alias ll='ls -l'
alias ls-l='ls -l'
alias md='mkdir -p'
alias rd='rmdir'
alias unmount='echo "Error: Try the command: umount" 1>&2; false'
# Use exa instead
DISABLE_LS_COLORS=true
alias ls=exa
# Use batcat as cat
alias cat=batcat
# Goproxy
export GOPROXY=https://goproxy.io,direct
# Go bin
export PATH="$PATH:${HOME}/go/bin"
# GnuPG magic for commit signing
export GPG_TTY=${_P9K_TTY}
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# local PATH
export PATH="$PATH:${HOME}/.local/bin"
export PATH="$HOME/.poetry/bin:$PATH"
# Scaleway CLI autocomplete initialization.
eval "$(scw autocomplete script shell=zsh)"
|