-
Notifications
You must be signed in to change notification settings - Fork 1
/
shrc
executable file
·126 lines (114 loc) · 4.45 KB
/
shrc
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#!/bin/sh
#命令别名
if [ -n "${NVIM_LISTEN_ADDRESS+x}" ]; then
alias vim="~/.config/nvim/send_command_to_vim.py"
alias vi="~/.config/nvim/send_command_to_vim.py"
else
alias vim='nvim'
alias vi='nvim'
fi
alias grep="grep --color=auto"
alias cls='tput reset'
alias chrome="google-chrome"
alias top='htop'
alias codeit='code . && exit'
alias apt_proxy='apt -o Acquire::http::proxy="http://127.0.0.1:8118/"'
# fuzzy的cd跳转
alias cdto='cd $(find -type d | fzf)'
alias q="exit"
# my mpc
alias mpc='mpc --host=localhost --port=16600'
# android copy
alias adbcopy='adb shell am broadcast -a clipper.set -e text'
# android paste
alias adbclipget='adb shell am broadcast -a clipper.get'
upgrade_finish(){
echo "更新完成" | espeak -v zh
}
# 命令行使用剪贴板
case "$(uname -s)" in
Linux*)
alias tocopy='xclip -selection c'
alias fromcopy='xclip -selection clipboard -o'
;;
Darwin*)
alias tocopy='pbcopy'
alias fromcopy='pbpaste'
;;
esac
#ros相关
#export ROS_HOSTNAME=192.168.188.233
#export ROS_MASTER_URI=http://192.168.188.2:11311
PATH=~/.cargo/bin:~/.nix-profile/bin:~/.local/bin:~/bin:/opt/ghc/bin:~/.cabal/bin:~/.stack/programs/x86_64-linux/ghc-8.2.2/bin:$PATH
PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
nixpkgs=$HOME/.nix-defexpr/channels/nixpkgs
# 消除ctrl+s锁定
# 参考https://unix.stackexchange.com/questions/72086/ctrl-s-hang-terminal-emulator
if [ ! -z $MY_TERMINAL ]; then
if [ $MY_TERMINAL != "alacritty" ] ;then
stty -ixon
fi
fi
# CUDA
# export PATH=/usr/local/cuda/bin:$PATH
# export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
# rust proxy
export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static
export RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup
# vim mode
set -o vi
# man colorful
export LESS_TERMCAP_mb=$'\E[1m\E[32m'
export LESS_TERMCAP_mh=$'\E[2m'
export LESS_TERMCAP_mr=$'\E[7m'
export LESS_TERMCAP_md=$'\E[1m\E[36m'
export LESS_TERMCAP_ZW=""
export LESS_TERMCAP_us=$'\E[4m\E[1m\E[37m'
export LESS_TERMCAP_me=$'\E(B\E[m'
export LESS_TERMCAP_ue=$'\E[24m\E(B\E[m'
export LESS_TERMCAP_ZO=""
export LESS_TERMCAP_ZN=""
export LESS_TERMCAP_se=$'\E[27m\E(B\E[m'
export LESS_TERMCAP_ZV=""
export LESS_TERMCAP_so=$'\E[1m\E[33m\E[44m'
export LANG=en_US.UTF-8
export PATH="$PATH:$HOME/.emacs.d/bin"
case "$(uname -s)" in
Linux*) ;;
Darwin*)
export PATH="/usr/local/opt/python/libexec/bin:$PATH"
export PATH="/usr/local/opt/sphinx-doc/bin:$PATH"
export PATH="/usr/local/opt/gettext/bin:$PATH"
export PATH="$PATH:/usr/local/bin"
export PATH="$PATH:~/go/bin"
export PATH="$PATH:/Library/Apple/usr/bin"
export PATH="/usr/local/sbin:$PATH"
export ANDROID_HOME="$HOME/Library/Android/sdk"
export ANDROID_SDK_ROOT="$HOME/Library/Android/sdk"
# export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-11.0.17.jdk/Contents/Home
export PATH="$PATH:$ANDROID_HOME/platform-tools"
export PATH=$ANDROID_SDK_ROOT/platform-tools:$PATH
export PATH=$ANDROID_SDK_ROOT/build-tools/29.0.3:$PATH
export PATH=$ANDROID_SDK_ROOT/tools:$PATH
export GOPATH="$HOME/go"
export CXXFLAGS=-isystem\ /usr/local/Cellar/llvm/10.0.1/include/c++/v1
export PATH="$PATH:~/anaconda3/bin"
export PATH="$PATH:/Users/bytedance/.pyenv/versions/2.7.18/bin"
export PATH="$HOME/Qt5.14.2/5.14.2/clang_64/bin:$PATH"
export PATH="$HOME/Qt5.14.2/Tools/QtInstallerFramework/3.2/bin:$PATH"
export CMAKE_PREFIX_PATH=$HOME/Qt5.14.2/5.14.2/clang_64/lib/cmake/Qt5
export PATH="$PATH:~/Library/Python/3.8/bin"
# export PATH="/usr/local/opt/llvm/bin:$PATH"
# export LDFLAGS="-L/usr/local/Cellar/llvm@9/9.0.1_2/lib/clang"
# export CPPFLAGS="-I/usr/local/Cellar/llvm@9/9.0.1_2/include"
export ANDROID_NDK_HOME="$HOME/Library/Android/sdk/ndk/22.1.7171670"
export ANDROID_NDK="$HOME/Library/Android/sdk/ndk/22.1.7171670"
export PATH=$ANDROID_NDK:$PATH #open ndk-build
export PATH="$PATH:/Applications/CMake.app/Contents/bin"
# export CC=/Users/bytedance/.rtcbuild/.dolphin/dolphin_clang
# export CXX=/Users/bytedance/.rtcbuild/.dolphin/dolphin_clang++
;;
esac
export RUSTUP_DIST_SERVER="https://rsproxy.cn"
export RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup"