summaryrefslogtreecommitdiff
path: root/shell/zshrc
blob: 4bac285c53d90144209c5078c2562e3163e821cd (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
# The following lines were added by compinstall

fpath=(~/.zsh/completion/ $fpath)

autoload -Uz compinit; compinit
source /home/anand/github/fzf-tab/fzf-tab.plugin.zsh
# For zsh completion
export PATH=/usr/bin/aws_completer:$PATH
autoload bashcompinit && bashcompinit
complete -C "$(which aws_completer)" aws

autoload -Uz edit-command-line
zle -N edit-command-line
zstyle ':completion:*' completer _expand _complete _ignored
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
zstyle :compinstall filename '/home/anand/.zshrc'

autoload -Uz tetriscurses
autoload -Uz colors && colors

alias cls="clear"
alias battery='upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep percentage;upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep "time"'
alias start_venv='source ~/Documents/prog/python/.venv/bin/activate'
alias ls='[ $[$RANDOM % 1000] = 0 ] && sl || eza --icons="always"'
alias hms='home-manager switch -f ~/dots/home.nix'
alias feh='feh --info "echo %n"'
please() {
  sudo $(fc -ln -1)
}
alias cat='bat'
alias ..='cd ..'
alias cp='cp -i'
alias rm='rm -i'
alias mv='mv -i'
alias df='df -h'
alias ll='eza -lF --icons="always"'
alias lla='eza -AlF --icons="always"'
alias la='eza -AF --icons="always"'

alias feh='feh --info "echo %n"'
alias updateserver='rsync -avz --delete -e "ssh -i ~/.ssh/mailaws.pem" --rsync-path="sudo rsync" ~/Documents/prog/website/ admin@heresanandp.in:/var/www/website/'

export EDITOR='/home/anand/.nix-profile/bin/nvim'
export VISUAL='/home/anand/.nix-profile/bin/nvim'
export HISTCONTROL=ignoreboth

# Temporary fix
alias man='batman'

# End of lines added by compinstall
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
setopt notify
unsetopt nomatch autocd beep extendedglob
bindkey -v

# Plugins
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
fpath=(/home/anand/github/zsh-completions/src $fpath)

# fzf
source <(fzf --zsh)
source <(jj util completion zsh)

# Binds for history search
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down

eval "$(zoxide init zsh)"

## [Completion]
## Completion scripts setup. Remove the following line to uninstall
[[ -f /home/anand/.dart-cli-completion/zsh-config.zsh ]] && . /home/anand/.dart-cli-completion/zsh-config.zsh || true
## [/Completion]

eval "$(starship init zsh)"
bindkey "^X^E" edit-command-line