199 lines
6.0 KiB
Bash
199 lines
6.0 KiB
Bash
# If you come from bash you might have to change your $PATH.
|
|
# export PATH=$HOME/bin:/usr/local/bin:$PATH
|
|
|
|
# Path to your oh-my-zsh installation.
|
|
export ZSH="$HOME/.config/oh-my-zsh"
|
|
|
|
# Set name of the theme to load --- if set to "random", it will
|
|
# load a random theme each time oh-my-zsh is loaded, in which case,
|
|
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
|
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
|
|
ZSH_THEME="bracket"
|
|
# ZSH_THEME="powerlevel10k/powerlevel10k"
|
|
# POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir vcs)
|
|
# POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs time virtualenv)
|
|
# POWERLEVEL9K_MODE="nerdfont-complete"
|
|
|
|
# Set list of themes to pick from when loading at random
|
|
# Setting this variable when ZSH_THEME=random will cause zsh to load
|
|
# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/
|
|
# If set to an empty array, this variable will have no effect.
|
|
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
|
|
|
|
# Uncomment the following line to use case-sensitive completion.
|
|
# CASE_SENSITIVE="true"
|
|
|
|
# Uncomment the following line to use hyphen-insensitive completion.
|
|
# Case-sensitive completion must be off. _ and - will be interchangeable.
|
|
# HYPHEN_INSENSITIVE="true"
|
|
|
|
# Uncomment the following line to disable bi-weekly auto-update checks.
|
|
# DISABLE_AUTO_UPDATE="true"
|
|
|
|
# Uncomment the following line to change how often to auto-update (in days).
|
|
# export UPDATE_ZSH_DAYS=13
|
|
|
|
# Uncomment the following line to disable colors in ls.
|
|
# DISABLE_LS_COLORS="true"
|
|
|
|
# Uncomment the following line to disable auto-setting terminal title.
|
|
# DISABLE_AUTO_TITLE="true"
|
|
|
|
# Uncomment the following line to enable command auto-correction.
|
|
# ENABLE_CORRECTION="true"
|
|
|
|
# Uncomment the following line to display red dots whilst waiting for completion.
|
|
# COMPLETION_WAITING_DOTS="true"
|
|
|
|
# Uncomment the following line if you want to disable marking untracked files
|
|
# under VCS as dirty. This makes repository status check for large repositories
|
|
# much, much faster.
|
|
# DISABLE_UNTRACKED_FILES_DIRTY="true"
|
|
|
|
# Uncomment the following line if you want to change the command execution time
|
|
# stamp shown in the history command output.
|
|
# You can set one of the optional three formats:
|
|
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
|
# or set a custom format using the strftime function format specifications,
|
|
# see 'man strftime' for details.
|
|
HIST_STAMPS="yyyy-mm-dd"
|
|
|
|
# Would you like to use another custom folder than $ZSH/custom?
|
|
# ZSH_CUSTOM=/path/to/new-custom-folder
|
|
|
|
# Which plugins would you like to load?
|
|
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
|
|
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
|
# Example format: plugins=(rails git textmate ruby lighthouse)
|
|
# Add wisely, as too many plugins slow down shell startup.
|
|
plugins=(
|
|
git
|
|
z
|
|
extract
|
|
virtualenv
|
|
virtualenvwrapper
|
|
colorize
|
|
cp
|
|
zsh-syntax-highlighting
|
|
zsh-autosuggestions
|
|
fzf
|
|
colored-man-pages
|
|
)
|
|
|
|
source $ZSH/oh-my-zsh.sh
|
|
source $HOME/.bash_profile
|
|
|
|
# User configuration
|
|
|
|
# export MANPATH="/usr/local/man:$MANPATH"
|
|
|
|
# You may need to manually set your language environment
|
|
export LANG=en_US.UTF-8
|
|
|
|
# Preferred editor for local and remote sessions
|
|
# if [[ -n $SSH_CONNECTION ]]; then
|
|
# export EDITOR='vim'
|
|
# else
|
|
# export EDITOR='mvim'
|
|
# fi
|
|
export EDITOR='vim'
|
|
# delete remote branch
|
|
alias gpod='git push origin --delete'
|
|
|
|
# pip alias
|
|
alias piu='pip install -U'
|
|
|
|
# Compilation flags
|
|
# export ARCHFLAGS="-arch x86_64"
|
|
|
|
# ssh
|
|
export SSH_KEY_PATH="~/.ssh/rsa_id"
|
|
|
|
# Set personal aliases, overriding those provided by oh-my-zsh libs,
|
|
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
|
|
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
|
|
# For a full list of active aliases, run `alias`.
|
|
#
|
|
# Example aliases
|
|
# alias zshconfig="mate ~/.zshrc"
|
|
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
|
|
|
export LOCAL=$HOME/.local
|
|
export CONF=$HOME/.config
|
|
export LOG=$LOCAL/var/log
|
|
|
|
# npm config
|
|
# export NODE_HOME=$HOME/.local/node
|
|
# export NODE_PATH=$NODE_PATH:$HOME/.local/npm/lib/node_modules
|
|
# export PATH=$HOME/.local/npm/bin:$NODE_HOME/bin:$PATH
|
|
|
|
function update_dlv () {
|
|
go install github.com/go-delve/delve/cmd/dlv@latest
|
|
}
|
|
|
|
export GOROOT=/usr/local/go
|
|
export GOPATH=$HOME/Projects/Go
|
|
export PATH=$HOME/.local/bin:$GOROOT/bin:$GOPATH/bin:$PATH
|
|
export GO111MODULE=on
|
|
|
|
# 阿里云镜像
|
|
# export GOPROXY=https://mirrors.aliyun.com/goproxy/
|
|
# 中国golang镜像
|
|
# GOPROXY=https://goproxy.io
|
|
# go env -w GOPROXY=https://goproxy.cn,direct
|
|
export GOPROXY=https://goproxy.cn
|
|
|
|
# rust config
|
|
export CARGO_HOME=$HOME/.cargo
|
|
export PATH=$CARGO_HOME/bin:$PATH
|
|
|
|
# [[ -f ~/.fzf.zsh ]] && source ~/.fzf.zsh
|
|
|
|
# Linux settings
|
|
if [[ $XDG_SESSION_TYPE = "x11" ]]; then
|
|
alias pbcopy="xclip -sel clipboard"
|
|
alias pbpaste="xclip -sel clipboard -o"
|
|
elif [[ $XDG_SESSION_TYPE = "wayland" ]]; then
|
|
alias pbcopy="wl-copy"
|
|
alias pbpaste="wl-paste"
|
|
fi
|
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/cuda/lib64/
|
|
|
|
# Java config
|
|
# export JAVA_HOME=$HOME/.local/jvm/openjdk17
|
|
# graalvm-jdk-17.0.7+8.1
|
|
export JAVA_HOME="/usr/local/jdk-21.0.1+12"
|
|
# export GRAALVM_HOME=$JAVA_HOME
|
|
export JRE_HOME=${JAVA_HOME}/jre
|
|
export CLASS_PATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
|
|
export PATH=$JAVA_HOME/bin:$PATH
|
|
|
|
export NVIM_HOME=/opt/apps/io.neovim
|
|
export PATH="${NVIM_HOME}/files/bin:${NVIM_HOME}/files/extra/bin:$PATH"
|
|
export LD_LIBRARY_PATH="${NVIM_HOME}/files/lib:${NVIM_HOME}/files/extra/lib:${LD_LIBRARY_PATH}"
|
|
export XDG_DATA_DIRS="${NVIM_HOME}/files/share"
|
|
|
|
# using maven from idea
|
|
IDEA_HOME="/opt/idea"
|
|
MVN_HOME=${IDEA_HOME}/plugins/maven/lib/maven3/
|
|
export PATH=${MVN_HOME}/bin:$PATH
|
|
|
|
VIRTUALENV_PATHS=(
|
|
"/usr/bin/virtualenvwrapper.sh"
|
|
"/usr/local/bin/virtualenvwrapper.sh"
|
|
"/opt/homebrew/bin/virtualenvwrapper.sh")
|
|
|
|
for VIRTUALENV in ${VIRTUALENV_PATHS[@]}
|
|
do
|
|
if [[ -f $VIRTUALENV ]]; then
|
|
source $VIRTUALENV
|
|
break
|
|
fi
|
|
done
|
|
unset VIRTUALENV_PATHS
|
|
|
|
# if type kitty >/dev/null 2>&1; then
|
|
# alias icat="kitty +kitten icat"
|
|
# alias kssh="kitty +kitten ssh"
|
|
# fi
|