-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_zshrc
79 lines (66 loc) · 2.19 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
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
export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH
export ZSH="$HOME/.oh-my-zsh"
export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/home/rlchen/.miniforge3/envs/phenx/lib:$LD_LIBRARY_PATH # Add custom paths
export LD_LIBRARY_PATH=/home/rlchen/project/phenx/build/extern/armadillo:$LD_LIBRARY_PATH
#export LD_LIBRARY_PATH=/opt/intel/:$LD_LIBRARY_PATH
#export LD_LIBRARY_PATH=/opt/intel/oneapi/mkl/latest/lib/$LD_LIBRARY_PATH
ZSH_THEME=""
zstyle ':omz:update' mode reminder # just remind me to update when it's time
zstyle ':omz:update' frequency 13
plugins=(git zsh-autosuggestions zsh-syntax-highlighting extract web-search)
source $ZSH/oh-my-zsh.sh
export ARCHFLAGS="-arch x86_64"
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/rlchen/.miniforge3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/rlchen/.miniforge3/etc/profile.d/conda.sh" ]; then
. "/home/rlchen/.miniforge3/etc/profile.d/conda.sh"
else
export PATH="/home/rlchen/.miniforge3/bin:$PATH"
fi
fi
unset __conda_setup
if [ -f "/home/rlchen/.miniforge3/etc/profile.d/mamba.sh" ]; then
. "/home/rlchen/.miniforge3/etc/profile.d/mamba.sh"
fi
## easy c++ compile and run
function dbc() {
if [[ -z $1 ]]; then
echo "Please provide a file name"
return 1
fi
if [[ -f $1 ]]; then
if [[ $1 == *.c ]]; then
gcc -O0 -g -o "${1%.*}" $1 && ./"${1%.*}"
elif [[ $1 == *.cpp ]]; then
g++ -g -O0 -std=c++20 -o "${1%.*}" $1 && ./"${1%.*}"
else
echo "Please provide a c/c++ file"
fi
else
echo "File not found"
fi
}
## easy mamba env activate
function act() {
if [[ -z $1 ]]; then
echo "Please provide an environment name"
return 1
fi
mamba activate $1
}
# <<< conda initialize <<<
## alias
alias nb2py='jupyter nbconvert --to script --no-prompt'
alias ls='lsd'
alias l='ls -l'
alias la='ls -a'
alias lla='ls -la'
alias lt='ls --tree'
eval "$(zoxide init --cmd cd zsh)"
eval "$(starship init zsh)"
export PATH=/home/rlchen/.pixi/bin:$PATH
eval "$(pixi completion --shell zsh)"