-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
78 lines (68 loc) · 1.97 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
# zsh key bindings
[ -f .zshbindings ] && source .zshbindings
# starship.rs
export STARSHIP_CONFIG=~/.config/starship/starship.toml
eval "$(starship init zsh)"
# quality of life aliases
#alias ls='ls --color=auto'
#alias la='ls -lah'
#alias ll='ls -lh'
#alias ldirs='ls -ldh .*/ */'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias mv='mv -i -v'
alias rm='rm -i -v'
alias cp='cp -i -v'
alias history='history 1'
# modern unix aliases
alias ls='lsd --group-directories-first'
alias la='lsd -lA --group-directories-first'
alias ll='lsd -l --group-directories-first'
alias cat='bat'
alias du='dust'
alias df='duf'
alias find='fd'
alias top='btm'
#alias ping='gping'
#alias ps='procs'
# custom aliases
alias fastfetch='fastfetch --logo-padding-top 2'
# environment variables
export EDITOR=nvim
export SUDO_EDITOR=nvim
# development
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
# custom functions
gpg-encrypt () {
keyid=0x14331F69AE5AB875
output=~/"${1}".$(date +%s).enc
gpg --encrypt --armor --output ${output} \
-r $keyid "${1}" && echo "${1} -> ${output}"
}
gpg-decrypt () {
output=$(echo "${1}" | rev | cut -c16- | rev)
gpg --decrypt --output ${output} "${1}" && \
echo "${1} -> ${output}"
}
switch-yubikeys () {
#read -p "Insert the Yubikey you want to use .... " ignore
#echo "Switching GPG to backup Yubikey ..."
gpg-connect-agent "scd serialno" "learn --force" /bye
}
# zsh stuff
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
unsetopt beep
bindkey -e
zstyle :compinstall filename '~/.zshrc'
autoload -Uz compinit
compinit
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
plugins=( git zsh-syntax-highlighting zsh-autosuggestions )