add zsh files 80-env and 81-proxy
This commit is contained in:
parent
6cb647aeb6
commit
afe28694fb
@ -2,28 +2,3 @@
|
|||||||
|
|
||||||
# ZSH_THEME="robbyrussell"
|
# ZSH_THEME="robbyrussell"
|
||||||
# PROMPT='%(?:%{$fg_bold[green]%}:%{$fg_bold[red]%})${HOST:-} %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
|
# PROMPT='%(?:%{$fg_bold[green]%}:%{$fg_bold[red]%})${HOST:-} %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
|
||||||
|
|
||||||
command_exists() { command -v "$@" >/dev/null 2>&1; }
|
|
||||||
|
|
||||||
# pip3
|
|
||||||
export PATH=$PATH:$HOME/.local/bin
|
|
||||||
command_exists trash-put && alias rm='trash-put'
|
|
||||||
|
|
||||||
# Docker
|
|
||||||
# export DOCKER_HOST=unix:///run/user/500/docker.sock
|
|
||||||
# export DOCKER_HOST=unix:///run/user/1000/docker.sock
|
|
||||||
|
|
||||||
# Yarn
|
|
||||||
# export PATH=$PATH:$HOME/.yarn/bin
|
|
||||||
|
|
||||||
# Golang
|
|
||||||
# export PATH=$PATH:/usr/local/go/bin
|
|
||||||
# export PATH=$PATH:$HOME/.local/go/bin
|
|
||||||
# export GOPROXY=https://goproxy.cn,direct
|
|
||||||
|
|
||||||
# Node.js, npm, nvm
|
|
||||||
# export NVM_NODEJS_ORG_MIRROR=https://npmmirror.com/mirrors/node
|
|
||||||
# export NVM_IOJS_ORG_MIRROR=https://npmmirror.com/mirrors/iojs
|
|
||||||
|
|
||||||
# WSL Xming
|
|
||||||
# export DISPLAY=:0;
|
|
||||||
|
|||||||
27
files/zsh/80-env.zsh
Normal file
27
files/zsh/80-env.zsh
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# Pip3
|
||||||
|
if [ -d "$HOME/.local/bin" ]; then
|
||||||
|
export PATH=$PATH:$HOME/.local/bin
|
||||||
|
command_exists trash-put && alias rm='trash-put'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Docker
|
||||||
|
if [ -f "~/.config/systemd/user/docker.service" ]; then
|
||||||
|
export DOCKER_HOST=unix:///run/user/$(id -u)/docker.sock
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Golang
|
||||||
|
if command_exists go; then
|
||||||
|
export PATH=$PATH:/usr/local/go/bin
|
||||||
|
export PATH=$PATH:$HOME/.local/go/bin
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Yarn
|
||||||
|
if [ -d "$HOME/.yarn" ]; then
|
||||||
|
export PATH=$PATH:$HOME/.yarn/bin
|
||||||
|
fi
|
||||||
|
|
||||||
|
# WSL1
|
||||||
|
if grep -q Microsoft /proc/version; then
|
||||||
|
# Xming
|
||||||
|
export DISPLAY=:0;
|
||||||
|
fi
|
||||||
11
files/zsh/81-proxy.zsh
Normal file
11
files/zsh/81-proxy.zsh
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# Golang
|
||||||
|
if command_exists go; then
|
||||||
|
export GO111MODULE=on
|
||||||
|
export GOPROXY=https://goproxy.cn,direct
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Node.js, npm, nvm
|
||||||
|
if [ -d "$HOME/.nvm" ]; then
|
||||||
|
export NVM_NODEJS_ORG_MIRROR=https://npmmirror.com/mirrors/node
|
||||||
|
export NVM_IOJS_ORG_MIRROR=https://npmmirror.com/mirrors/iojs
|
||||||
|
fi
|
||||||
@ -113,6 +113,8 @@ configure_zsh() {
|
|||||||
cp $scriptdir/files/zsh/10-theme.zsh ~/.oh-my-zsh/custom/
|
cp $scriptdir/files/zsh/10-theme.zsh ~/.oh-my-zsh/custom/
|
||||||
cp $scriptdir/files/zsh/20-function.zsh ~/.oh-my-zsh/custom/
|
cp $scriptdir/files/zsh/20-function.zsh ~/.oh-my-zsh/custom/
|
||||||
cp $scriptdir/files/zsh/50-alias.zsh ~/.oh-my-zsh/custom/
|
cp $scriptdir/files/zsh/50-alias.zsh ~/.oh-my-zsh/custom/
|
||||||
|
cp $scriptdir/files/zsh/80-env.zsh ~/.oh-my-zsh/custom/
|
||||||
|
cp $scriptdir/files/zsh/81-proxy.zsh ~/.oh-my-zsh/custom/
|
||||||
cp $scriptdir/files/zsh/90-other.zsh ~/.oh-my-zsh/custom/
|
cp $scriptdir/files/zsh/90-other.zsh ~/.oh-my-zsh/custom/
|
||||||
cp $scriptdir/files/zsh/ys-simple.zsh-theme ~/.oh-my-zsh/custom/themes/
|
cp $scriptdir/files/zsh/ys-simple.zsh-theme ~/.oh-my-zsh/custom/themes/
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -82,6 +82,8 @@ update_file $scriptdir/files/zsh/00-init.zsh ~/.oh-my-zsh/custom/00-init
|
|||||||
update_file $scriptdir/files/zsh/10-theme.zsh ~/.oh-my-zsh/custom/10-theme.zsh
|
update_file $scriptdir/files/zsh/10-theme.zsh ~/.oh-my-zsh/custom/10-theme.zsh
|
||||||
update_file $scriptdir/files/zsh/20-function.zsh ~/.oh-my-zsh/custom/20-function.zsh
|
update_file $scriptdir/files/zsh/20-function.zsh ~/.oh-my-zsh/custom/20-function.zsh
|
||||||
update_file $scriptdir/files/zsh/50-alias.zsh ~/.oh-my-zsh/custom/50-alias.zsh
|
update_file $scriptdir/files/zsh/50-alias.zsh ~/.oh-my-zsh/custom/50-alias.zsh
|
||||||
|
update_file $scriptdir/files/zsh/80-env.zsh ~/.oh-my-zsh/custom/80-env.zsh
|
||||||
|
update_file $scriptdir/files/zsh/81-proxy.zsh ~/.oh-my-zsh/custom/81-proxy.zsh
|
||||||
update_file $scriptdir/files/zsh/90-other.zsh ~/.oh-my-zsh/custom/90-other.zsh
|
update_file $scriptdir/files/zsh/90-other.zsh ~/.oh-my-zsh/custom/90-other.zsh
|
||||||
update_file $scriptdir/files/zsh/ys-simple.zsh-theme ~/.oh-my-zsh/custom/themes/ys-simple.zsh-theme
|
update_file $scriptdir/files/zsh/ys-simple.zsh-theme ~/.oh-my-zsh/custom/themes/ys-simple.zsh-theme
|
||||||
update_authorized_keys
|
update_authorized_keys
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user