-
Notifications
You must be signed in to change notification settings - Fork 4
/
.zshrc
67 lines (58 loc) · 2.23 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
# 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
source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
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
# source /usr/share/nvm/init-nvm.sh
#
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
HIST_STAMPS="yyyy-mm-dd"
ENABLE_CORRECTION="true"
HISTFILE=~/.zsh_history
HISTSIZE=1000
SAVEHIST=2000
unsetopt beep
autoload -Uz compinit
compinit -d ~/.cache/zcompdump
zstyle ':completion:*:*:*:*:*' menu select
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # case insensitive tab completion
alias ls='exa --icons --color=auto --group-directories-first'
alias cat='bat'
alias open='xdg-open'
alias vim='nvim'
alias wttr='curl https://wttr.in\?0m'
alias rsync='rsync -v --progress -h --partial -t'
alias vpnc='nmcli c up homelab'
alias vpnd='nmcli c down homelab'
alias ga='git add'
alias gp='git pull'
alias gm='git commit'
alias gpsh='git push'
alias todo="grep -n -s TODO *"
alias ssh="TERM=xterm-256color ssh"
function disc() {
local file="file=@$1"
ffmpeg -i $1 -vf "scale=iw/2:ih/2" output.mp4
}
function upload() {
~/.webpass.sh
output=$(curl -X POST -u koala:$PASSWD -F "file=@$1" http://127.0.0.1:7333/)
echo "$output copied to clipboard."
wl-copy $output
}
bindkey "^[[H" beginning-of-line
bindkey "^[[F" end-of-line
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
bindkey '^R' history-incremental-search-backward
bindkey -v
zstyle ':bracketed-paste-magic' active-widgets '.self-*'
# # Created by `pipx` on 2023-07-27 00:35:13
# export PATH="$PATH:/home/theo/.local/bin"