-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot-zshrc
50 lines (39 loc) · 1.39 KB
/
dot-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
SRC="$HOME/dotfiles/ZSH"
source "$SRC/packages.zsh"
source "$SRC/pyautoenv.zsh"
source "$SRC/prompt.zsh"
source "$SRC/settings.zsh"
source "$SRC/macos.zsh"
source "$SRC/linux.zsh"
######## Remaps ###########
alias cat="bat"
alias ls="eza -h -l --icons --git --no-quotes --group-directories-first"
# Does more intuitive clearing the way CMD-K would
alias clear="clear && printf \"\e[H\e[2J\e[3J\""
alias tokei="tokei -n commas"
alias g++='g++ -ansi -pedantic-errors -Wall -Wconversion'
alias vim="nvim"
######## Helpers ########
alias localip="ipconfig getifaddr en0"
alias ins_vpn_connect="sudo $HOME/.config/openvpn/vpn_connect.sh"
alias ins_vpn_disconnect="sudo $HOME/.config/openvpn/vpn_disconnect.sh"
#### Touch and make executable ####
function touchx() { touch $@ && chmod +x $@ }
function t.() {
# I know that the way of getting the current
# file name is slow this way but idk tbh
tmux rename-session $(basename $PWD)
}
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. $NVM_DIR/nvm.sh --no-use # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# pnpm
export PNPM_HOME="$HOME/.local/share/pnpm"
case ":$PATH:" in
*":$PNPM_HOME:"*) ;;
*) export PATH="$PNPM_HOME:$PATH" ;;
esac
# pnpm end
export PYTHONBREAKPOINT="IPython.embed"
# As per https://github.com/keybase/keybase-issues/issues/2798
export GPG_TTY=$(tty)