-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
151 lines (119 loc) Β· 3.98 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
###################### ALIASES
# just
alias j=just
# autocompletion for just
alias jac='source <(just --completions zsh)'
# add nvim 0.10!
export PATH="$PATH:/opt/nvim-linux64/bin"
alias vim=nvim
alias vi=nvim
## exa
alias l='exa'
alias la='exa -a'
alias ll='exa -lah'
alias ls='exa --color=auto'
# webcam aliasese
alias wcd='sudo rmmod v4l2loopback'
alias wce='sudo modprobe v4l2loopback exclusive_caps=1 max_buffers=2'
alias wclc='gphoto2 --list-config'
alias wcr='gphoto2 --stdout --capture-movie | ffmpeg -hwaccel nvdec -c:v mjpeg_cuvid -i - -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video4'
alias wcr-cpu='gphoto2 --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video4'
alias wc-obs='sudo modprobe v4l2loopback exclusive_caps=1 card_label="OBS Virtual Camera"'
# keyboard
alias kb-int='setxkbmap -layout us -variant intl'
alias kb-en='setxkbmap -layout us'
############################ third party installs
# Google Cloud SDK.
if [ -f '/opt/gcloud/google-cloud-sdk/path.zsh.inc' ]; then . '/opt/gcloud/google-cloud-sdk/path.zsh.inc'; fi
# shell command completion for gcloud.
if [ -f '/opt/gcloud/google-cloud-sdk/completion.zsh.inc' ]; then . '/opt/gcloud/google-cloud-sdk/completion.zsh.inc'; fi
# add go
export PATH=/usr/local/go/bin:$PATH
export PATH=$PATH:$HOME/go/bin
# direnv
eval "$(direnv hook zsh)"
# add NVM to manage NPM
export NVM_DIR="$HOME/.config/nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# add structurizr
export PATH="/opt/structurizr:$PATH"
# Make terminal compatible
export TERM=xterm-256color
# Add pyenv
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
# Add local bins to path
export PATH="/home/gcgbarbosa/.local/bin:$PATH"
## make pytorch RNN's replicable
# explanation here: https://pytorch.org/docs/stable/generated/torch.nn.RNN.html#torch.nn.RNN
export CUBLAS_WORKSPACE_CONFIG=:16:8
# enable starship
eval "$(starship init zsh)"
# pnpm
export PNPM_HOME="/home/gcgbarbosa/.local/share/pnpm"
case ":$PATH:" in
*":$PNPM_HOME:"*) ;;
*) export PATH="$PNPM_HOME:$PATH" ;;
esac
# pnpm end
##
# FZF does not use ripgrep by default
# We need to tel FZF to use ripgrep with FZF_DEFAULT
#
if type rg &> /dev/null; then
export FZF_DEFAULT_COMMAND='rg --files'
export FZF_DEFAULT_OPTS='-m --height 50% --border'
fi
##
# Lines configured by zsh-newuser-install
#
HISTFILE=~/.histfile
HISTSIZE=10000
SAVEHIST=10000
setopt appendhistory autocd extendedglob notify
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/gcgbarbosa/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
# turn off all beeps
unsetopt BEEP
# set the editor for cron
export EDITOR=nvim
# set GCC version to 7
# export CC=gcc-7 CXX=g++-7
# Import colorscheme from 'wal' asynchronously
# & # Run the process in the background.
# ( ) # Hide shell job control messages.
(cat ~/.cache/wal/sequences &)
# zplug plugin manager
source ~/.zplug/init.zsh
# Async for zsh, used by pure
zplug "mafredri/zsh-async", from:github, defer:0
# Load completion library for those sweet [tab] squares
zplug "lib/completion", from:oh-my-zsh
# supports oh-my-zsh-plugins
zplug "plugins/git", from:oh-my-zsh
# show a message "you should use" for an alias
zplug "MichaelAquilina/zsh-you-should-use"
# install z to jump into directories
zplug "agkozak/zsh-z"
# suggests commands as you type based on your history and completions
zplug "zsh-users/zsh-autosuggestions"
#
zplug "zsh-users/zsh-syntax-highlighting", defer:2
# autocompletion
#zplug "marlonrichert/zsh-autocomplete"
# install plugins if there are plugins that have not been installed
if ! zplug check --verbose; then
printf "Install? [y/N]: "
if read -q; then
echo; zplug install
fi
fi
#
#zplug load --verbose
zplug load