-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
78 lines (70 loc) · 2.28 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
# Lines configured by zsh-newuser-install
PROMPT='%F{#cc6666}$THEME_VI_MODE_SYMBOL$THEME_PROMPT_PREFIX%f%B%F{#81a2be}%~> %f%b'
HISTFILE=~/.zsh_history
HISTSIZE=1000000000
SAVEHIST=1000000000
setopt autocd extendedglob
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '~/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
# cat /home/`$USER`/.cache/wal/sequences
# Using vim keys for easier navigation of commands in the terminal
set -o vi
export KEYTIMEOUT=1
## Init
setopt PROMPT_SUBST
## Options
THEME_PROMPT_PREFIX=${THEME_PROMPT_PREFIX:-''}
THEME_VI_INS_MODE_SYMBOL=${THEME_VI_INS_MODE_SYMBOL:-'>>'}
THEME_VI_CMD_MODE_SYMBOL=${THEME_VI_CMD_MODE_SYMBOL:-'__'}
## Set symbol for the initial mode
THEME_VI_MODE_SYMBOL="${THEME_VI_INS_MODE_SYMBOL}"
# on keymap change, define the mode and redraw prompt
zle-keymap-select() {
if [ "${KEYMAP}" = 'vicmd' ]; then
THEME_VI_MODE_SYMBOL="${THEME_VI_CMD_MODE_SYMBOL}"
else
THEME_VI_MODE_SYMBOL="${THEME_VI_INS_MODE_SYMBOL}"
fi
zle reset-prompt
}
zle -N zle-keymap-select
# reset to default mode at the end of line input reading
zle-line-finish() {
THEME_VI_MODE_SYMBOL="${THEME_VI_INS_MODE_SYMBOL}"
}
zle -N zle-line-finish
# Fix a bug when you C-c in CMD mode, you'd be prompted with CMD mode indicator
# while in fact you would be in INS mode.
# Fixed by catching SIGINT (C-c), set mode to INS and repropagate the SIGINT,
# so if anything else depends on it, we will not break it.
TRAPINT() {
THEME_VI_MODE_SYMBOL="${THEME_VI_INS_MODE_SYMBOL}"
return $(( 128 + $1 ))
}
#aliases
alias spnd='i3lock-fancy-rapid 9 30 && systemctl suspend -i'
alias weather='curl wttr.in'
alias gp='git push'
alias gm='git commit -m'
alias gs='git status'
alias gl='git log'
alias ga='git add'
alias install='paru -S'
alias n='neofetch'
alias search='paru -Ss'
alias python='python3'
alias p='python3'
alias upgrade='sudo pacman -Syyu'
alias bruh='clear'
alias mc='cd ~/Downloads && prime-run java -jar TLauncher-2.792_beta.jar && exit'
alias govperf='echo "performance" | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor'
alias gov='cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor'
alias cls='clear && ls'
alias ls='ls --color'
# Spawns
date