# 配置代理
export all_proxy=socks5://127.0.0.1:7890;
export HTTP_PROXY=http://127.0.0.1:7890
export HTTPS_PROXY=http://127.0.0.1:7890

# 配置Neovim的AI补全
export OPENAI_API_KEY="sk-BxgRxTsLAZyLAktAB0Cc3e9bF9554cEc952cF0C8A7C840B3"
export OPENAI_API_BASE="https://aihubmix.com"

# 配置Gemini Cli
export GOOGLE_GEMINI_BASE_URL="https://aihubmix.com/gemini"
export GEMINI_API_KEY="sk-BxgRxTsLAZyLAktAB0Cc3e9bF9554cEc952cF0C8A7C840B3"

# export GOOGLE_GEMINI_BASE_URL="https://cn.gptapi.asia"
# export GEMINI_API_KEY="sk-korED7kHNSVz1KYY3c3b9aE599Bc41A29674C419B71d217a"

# 配置Claude Code
# export ANTHROPIC_BASE_URL="https://kuaidaima.com/"
# export ANTHROPIC_API_KEY="c55ccb4c92324ca09fbffea67b45d442.cuoRT55XfAcqy3AH"

# export ANTHROPIC_BASE_URL="https://gaccodeapi.com"
# export ANTHROPIC_API_KEY="sk-CCSINpjHVab21HDg4yGhzD8hf8jXUJ0cHkVp6Il18v6i9KD1"

# export ANTHROPIC_BASE_URL="https://anyrouter.top"
# export ANTHROPIC_BASE_URL="https://pmpjfbhq.cn-nb1.rainapp.top"
# export ANTHROPIC_API_KEY="sk-GSJh1gtECcNJE9K1WamnGrGtrwYMDVoUstGDb9zeRLdeJtaI"

# export ANTHROPIC_BASE_URL="https://one.ocoolai.com"
# export ANTHROPIC_API_KEY="sk-u6Abbrq7DehKfk9m4728AeB565Bd480bBd8c2a178b4d6b13"

# export ANTHROPIC_BASE_URL="https://aihubmix.com"
# export ANTHROPIC_API_KEY="sk-BxgRxTsLAZyLAktAB0Cc3e9bF9554cEc952cF0C8A7C840B3"

# export ANTHROPIC_BASE_URL="https://cn.gptapi.asia"
# export ANTHROPIC_API_KEY="sk-korED7kHNSVz1KYY3c3b9aE599Bc41A29674C419B71d217a"

# 配置tkinter
# export LDFLAGS="-L/opt/homebrew/opt/tcl-tk/lib"
# export CPPFLAGS="-I/opt/homebrew/opt/tcl-tk/include"
# export PKG_CONFIG_PATH="/opt/homebrew/opt/tcl-tk/lib/pkgconfig"

# 设置获取node版本信息
export NODE_VERSION=$(node -v)

# 设置thefuck
eval $(thefuck --alias)

# 设置bat
alias cc="bat"
BAT_THEME="OneHalfDark"

# 设置poppler环境变量
export PATH="/opt/homebrew/Cellar/poppler:$PATH"

# 设置zsh-z
source /Users/dyx/zsh-z/zsh-z.plugin.zsh
autoload -U compinit; compinit
zstyle ':completion:*' menu select

# 个人设置
# 常用函数
function vid (){
	cd ~/.config/nvim
}

function vn(){
    cd ~/.config/nvim
    nvim ./init.lua
}
function acc(){
    source /Users/dyx/Code/0.python-venv/mySite-django5.0-py3.12/bin/activate
    cd /Users/dyx/Code/mySite
    ls
}
function ok(){
    source ~/.zshrc
    clear
}
function Ok(){
    source ~/.zshrc
    clear
}
function se(){
    /Applications/Google\ Chrome2.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --user-data-dir="/Users/dyx/Code/selenium_data"
}
alias cls='echo "yes" | /Users/dyx/Code/0.python-venv/mySite-django5.0-py3.12/bin/python /Users/dyx/Code/mySite/manage.py collectstatic'

# Git别名
alias ge="scp -P 222 root@42.193.15.117:/www/wwwroot/mySite/db.sqlite3 /Users/dyx/Code/mySite/"
alias gini="git init"
alias gff="git diff"
alias grs="git reset"
alias gre="git reset"
alias grt="git restore"
alias gsh="git show"
alias gck="git checkout"
alias gss="git status"
alias gs="git status -s"
alias st="git status -s"
alias gsu="git status -uall -s"
alias gll="git log --all"
alias gl="git log --oneline --all"
alias glfs="git ls-files"
alias glf="git log --name-status --oneline"
alias glg="git log --oneline --graph --decorate --all"
alias ga="git add ."
alias ad="git add ."
alias gfc="git fetch"
alias gpsh="git push"
alias gpll="git pull"
alias gp="git pull"
alias gsw="git switch"
alias gb="git branch"
alias gmer="git merge"
alias grf="git reflog"
alias gcm="git commit"
alias gbr="git branch"
alias gbra="git branch -a"
alias gbrd="git branch -d"
alias gst="git stash"
alias gstl="git stash list --date=iso"
alias gsta="git stash apply"
alias gcw="git switch"
alias gcwc="git switch"


# 常用别名
alias wc="which"
alias cw="cd /Users/dyx/Code/Cloud_Web"
alias zw="cd /Users/dyx/Code/Cloud_Web"
alias ca="cd /Users/dyx/Library/CloudStorage/OneDrive-个人/0.Mac/Jetbrains激活"
alias cl="clear"
alias Cl="clear"
alias py="python"
alias ls="eza --icons"
alias l="eza --icons"
alias ll='eza -l --icons'
alias la='eza -a --icons'
alias vsh="nvim ~/.zshrc"
alias Vsh="nvim ~/.zshrc"
alias vm='vi /var/mail/dyx'
alias neovim="nvim"
alias vim="nvim"
alias vi="nvim"
alias ipy="ipython"
alias gcc="/opt/homebrew/Cellar/gcc/15.1.0/bin/gcc-15"
alias ll="tree -L"
alias ld="tree -d"
alias lD="tree -D"

# docker
alias dk="docker"
alias dkr="docker run"
alias dkrm="docker rm"
alias dkrt="docker run -it"
alias dkre="docker run -exec"
alias dkst="docker start"
alias dkstp="docker stop"
alias dkrst="docker restart"
alias dkps="docker ps"
alias dkpsa="docker ps -a"
alias dkim="docker image"
alias dkims="docker images"
alias dkrmi="docker rmi"
alias dkpl="docker pull"
alias dkpsh="docker push"
alias dkbd="docker image build"
alias dkhs="docker history"
alias dksy="docker system"

eval "$(oh-my-posh init zsh --config $(brew --prefix oh-my-posh)/themes/takuya.omp.json)"
# eval "$(oh-my-posh init zsh --config $(brew --prefix oh-my-posh)/themes/aliens.omp.json)"
# eval "$(oh-my-posh --init --shell bash --config ~/.poshthemes/paradox_dyx_linux.omp.json)"
# eval "$(oh-my-posh init zsh --config $(brew --prefix oh-my-posh)/themes/paradox_dyx_linux.omp.json)"
# eval "$(oh-my-posh init zsh --config /Users/dyx/Terminal/takuya.omp.json )"
# eval "$(oh-my-posh init zsh --config /Users/dyx/Terminal/paradox_dyx.omp.json )"
# eval "$(oh-my-posh init zsh --config /Users/dyx/Terminal/pradox_dyx2.omp.json )"
# eval "$(oh-my-posh init zsh --config /Users/dyx/Terminal/tiwahu_dyx.omp.json )"
# eval "$(oh-my-posh init zsh --config $(brew --prefix oh-my-posh)/themes/agnoster.omp.json)"
# eval "$(oh-my-posh init zsh --config $(brew --prefix oh-my-posh)/themes/agnosterplus.omp.json)"
# eval "$(oh-my-posh init zsh --config $(brew --prefix oh-my-posh)/themes/paradox.omp.json)"
# eval "$(oh-my-posh init zsh --config $(brew --prefix oh-my-posh)/themes/hotstick.minimal.omp.json)"
# eval "$(oh-my-posh init zsh --config $(brew --prefix oh-my-posh)/themes/catppuccin_mocha.omp.json)"
# eval "$(oh-my-posh init zsh --config $(brew --prefix oh-my-posh)/themes/emodipt-extend.omp.json)"
# eval "$(oh-my-posh init zsh --config $(brew --prefix oh-my-posh)/themes/emodipt.omp.json)"
# eval "$(oh-my-posh init zsh --config $(brew --prefix oh-my-posh)/themes/fish.omp.json)"
# eval "$(oh-my-posh init zsh --config $(brew --prefix oh-my-posh)/themes/patriksvensson.omp.json)"
# eval "$(oh-my-posh init zsh --config $(brew --prefix oh-my-posh)/themes/tiwahu.omp.json)"

# 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/.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/ohmyzsh/ohmyzsh/wiki/Themes
# ///ZSH_THEME="agnoster"

# 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 $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 one of the following lines to change the auto-update behavior
# zstyle ':omz:update' mode disabled  # disable automatic updates
# zstyle ':omz:update' mode auto      # update automatically without asking
# zstyle ':omz:update' mode reminder  # just remind me to update when it's time

# Uncomment the following line to change how often to auto-update (in days).
# zstyle ':omz:update' frequency 17

# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS="true"

# 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.
# You can also set it to another string to have that shown instead of the default red dots.
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
# Caution: this setting can cause issues with multiline prompts in zsh < 9.7.1 (see #5765)
# 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="mm/dd/yyyy"

# 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 $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.

# plugins=(git
# z
# )

# source $ZSH/oh-my-zsh.sh

# User configuration

# export MANPATH="/usr/local/man:$MANPATH"

# You may need to manually set your language environment
# export LANG=en_US.UTF-4

# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
#   export EDITOR='vim'
# else
#   export EDITOR='mvim'
# fi

# Compilation flags
# export ARCHFLAGS="-arch x90_64"

# 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 CLICOLOR='Yes' #是否输出颜色
# export LS_OPTIONS='--color=auto' #如果没有指定，则自动选择颜色
export LSCOLORS='CxfxcxdxbxegedabagGxGx'
# grep
# alias grep='grep --color=always'

[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh

test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"

___MY_VMOPTIONS_SHELL_FILE="${HOME}/.jetbrains.vmoptions.sh"; if [ -f "${___MY_VMOPTIONS_SHELL_FILE}" ]; then . "${___MY_VMOPTIONS_SHELL_FILE}"; fi

# 设置快捷键清除输入的内容
bindkey '^D' backward-kill-line

# Added by LM Studio CLI (lms)
export PATH="$PATH:/Users/dyx/.lmstudio/bin"

if [[ -d "/opt/homebrew/share/zsh/site-functions" ]]; then
  fpath=("/opt/homebrew/share/zsh/site-functions" $fpath)
fi

# The following lines have been added by Docker Desktop to enable Docker CLI completions.
fpath=(/Users/dyx/.docker/completions $fpath)
autoload -Uz compinit
compinit
# End of Docker CLI completions

# Added by Windsurf
export PATH="/Users/dyx/.codeium/windsurf/bin:$PATH"

. "$HOME/.local/bin/env"
