-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
54 lines (42 loc) · 1.3 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
if [[ -n "$IN_NIX_SHELL" ]]; then
nixlabel='%F{cyan}*%f '
fi
source ~/zsh-nix-shell/nix-shell.plugin.zsh
autoload -Uz add-zsh-hook vcs_info
setopt prompt_subst
add-zsh-hook precmd vcs_info
export PROMPT='%1~ %F{blue}${vcs_info_msg_0_}%f$nixlabel%(?.%F{green}.%F{red})>%f '
# export RPROMPT='%m'
# unset nixlabel
# https://salferrarello.com/zsh-git-status-prompt/
zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:*' unstagedstr ' *'
zstyle ':vcs_info:*' stagedstr ' +'
zstyle ':vcs_info:git:*' formats '(%b%u%c)'
zstyle ':vcs_info:git:*' actionformats '(%b|%a%u%c)'
# Blessed zsh completion
autoload -U compinit && compinit
export TERMINAL="alacritty"
export BROWSER="firefox"
export EDITOR="nvim"
alias dotfiles="git --git-dir=$HOME/.dotfiles/.git --work-tree=$HOME"
alias lazydots="lazygit --git-dir=$HOME/.dotfiles/.git --work-tree=$HOME"
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias py="python3"
alias pdb="py -m pdb"
alias pypy="pypy3"
alias vim="nvim"
alias emacs="emacs -nw"
alias ns="nix-shell"
alias se="sudoedit"
alias du="du -sh"
alias df="df -h"
alias ls="exa --group-directories-first"
alias diff="delta"
alias make="make -j $(nproc)"
# Makes ssh play nice with alacritty
export TERM="xterm-256color"
export HISTFILE=/dev/null
# powerprofilesctl set power-saver