dotfiles/.rc.sh
2023-10-12 23:37:36 +08:00

39 lines
896 B
Bash

alias s=ssh
alias grep='grep --color'
alias sj='ssh -CqTnN -D :1080'
alias y='yadm'
export PUB_HOSTED_URL=https://mirror.sjtu.edu.cn/dart-pub/
export FLUTTER_STORAGE_BASE_URL=https://mirror.sjtu.edu.cn/
export CHROME_EXECUTABLE=/usr/bin/microsoft-edge-stable
export PATH="$HOME/go/bin:$HOME/.local/flutter/bin:$HOME/.local/bin:$PATH"
function get_proxy() {
if [ -e ~/.proxy ]; then
cat ~/.proxy
else
echo 'http://127.0.0.1:7890'
fi
}
function pon() {
proxy=`get_proxy`
export http_proxy=http://127.0.0.1:7890
export https_proxy=http://127.0.0.1:7890
echo "\033[32m开启代理:$proxy\033[0m"
}
function poff() {
unset http_proxy
unset https_proxy
echo "\033[31m关闭代理\033[0m"
}
function pstat() {
if [ $http_proxy ];then
echo "\033[32m代理开启\033[0m"
else
echo "\033[31m代理关闭\033[0m"
fi
}