-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzshrc
92 lines (84 loc) · 2.96 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
# 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
# Lines configured by zsh-newuser-install
export PATH="${PATH}:$HOME/.local/bin"
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/theodor/.zshrc'
#Prompt zsh
autoload -Uz promptinit
prompt fade
PROMPT='%F{green}%n%f%F{yellow}@%F{magenta}%m%f %F{blue}%B%~%b%f %F{green}%(!.#.$) '
autoload -Uz compinit
compinit
zstyle ':completion:*' rehash true
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/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
# aliases
#alias cp="cp -i" # confirm before overwriting something
alias df='df -h' # human-readable sizes
alias free='free -h' # show sizes in MB
alias plog='cat /var/log/pacman.log'
alias plasma-logout='qdbus org.kde.ksmserver /KSMServer logout 0 0 1'
alias x=startx
alias b=btop
alias n=neofetch
alias f=ranger
alias c=cmatrix
alias p='paru -Syu --removemake'
alias j='journalctl -p3 -b -0'
alias pogoda='curl wttr.in'
# archives
ex () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xvjf $1 ;;
*.tar.gz) tar xvzf $1 ;;
*.tar.xz) tar xvfJ $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xvf $1 ;;
*.tbz2) tar xvjf $1 ;;
*.tgz) tar xvzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*.tar.zst) tar -I zstd -xvf $1 ;;
*) echo "'$1' Не может быть распакован при помощи >ex<" ;;
esac
else
echo "'$1' не является допустимым файлом"
fi
}
pk () {
if [ $1 ] ; then
case $1 in
tbz) tar cjvf $2.tar.bz2 $2 ;;
tgz) tar czvf $2.tar.gz $2 ;;
tar) tar cpvf $2.tar $2 ;;
bz2) bzip $2 ;;
gz) gzip -c -9 -n $2 > $2.gz ;;
zip) zip -r $2.zip $2 ;;
7z) 7z a $2.7z $2 ;;
zst) tar -I zstd -cvf $2.tar.zst $2 ;;
*) echo "'$1' не может быть упакован с помощью pk()" ;;
esac
else
echo "'$1' не является допустимым файлом"
fi
}
# termcolors fix
source "$HOME/.vim/gruvbox_256palette.sh"
# End of lines added by compinstall
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh