summaryrefslogtreecommitdiff
path: root/zshrc
blob: c02991435470222ec434bfd363992ee351a085ec (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
if [[ -z "$TMUX" ]]; then
  if command -v tmux >/dev/null 2>&1; then
    tmux attach -t main || tmux new -s main
  fi
fi

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
export PATH="$HOME/.config/emacs/bin:$PATH"
export DISCORDO_TOKEN=""
export ZSH="$HOME/.oh-my-zsh"
export EDITOR=nvim
export VISUAL=nvim
export FZF_DEFAULT_OPTS=" \
--color=bg+:#363A4F,bg:#24273A,spinner:#F4DBD6,hl:#ED8796 \
--color=fg:#CAD3F5,header:#ED8796,info:#C6A0F6,pointer:#F4DBD6 \
--color=marker:#B7BDF8,fg+:#CAD3F5,prompt:#C6A0F6,hl+:#ED8796 \
--color=selected-bg:#494D64 \
--color=border:#6E738D,label:#CAD3F5"

eval "$(zoxide init zsh)"

ZSH_THEME="powerlevel10k/powerlevel10k"

if type fzf &>/dev/null; then
  source /usr/share/fzf/key-bindings.zsh
  source /usr/share/fzf/completion.zsh
fi

HISTSIZE=100000
SAVEHIST=100000
HISTFILE=~/.zsh_history

setopt APPEND_HISTORY
setopt SHARE_HISTORY
setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_SAVE_NO_DUPS
setopt HIST_REDUCE_BLANKS
setopt INC_APPEND_HISTORY
setopt AUTO_CD
unsetopt CORRECT

plugins=(
  git
  zsh-autosuggestions
  zsh-syntax-highlighting
  history-substring-search
)
source $ZSH/oh-my-zsh.sh

alias grep='rg'
alias v='nvim'
alias i='yay -S'
alias pi='sudo pacman -S'
alias ls='exa --icons --color=auto'
alias ll='exa -lh --icons --color=auto'
alias la='exa -lha --icons --color=auto'
alias cat='bat'
alias clear="printf '\033[2J\033[3J\033[1;1H'"
alias python='python3'
alias py='python3'
alias ssha='ssh arkadii@192.168.0.171'
alias u='~/update.sh'
alias vim='nvim'
alias vi='nvim'
alias sn='sudoedit'
alias v='nvim'
alias cd='z'
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
. "$HOME/.cargo/env"

. "$HOME/.local/bin/env"

backend() {
  cd ~/projects/artberry/artberry_backend || return
  nvim
}

frontend() {
  cd ~/projects/artberry/artberry_frontend || return
  nvim
}

alias ba=backend
alias fr=frontend