-
Notifications
You must be signed in to change notification settings - Fork 3
/
.zshrc
115 lines (94 loc) · 3.89 KB
/
.zshrc
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
#
# Samuel's .zshrc config file
#
# 2013, 08/14 @Taipei
# ___ ___
# ___ ___ /\_ \ /\_ \ (R)
# sssssssssssssamuelolololololololol /\_ \ /\_ \ ___\//\ \ ___\//\ \
# ____ __ ___ ___ __ __ __\//\ \ ___\//\ \ / __`\\ \ \ / __`\\ \ \
# /',__\ /'__`\ /' __` __`\/\ \/\ \ /'__`\\ \ \ / __`\\ \ \ /\ \L\ \\_\ \_/\ \L\ \\_\ \_
# /\__, `\\ \L\.\_/\ \/\ \/\ \ \ \_\ \\ __/ \_\ \_/\ \L\ \\_\ \\ \____//\____\ \____//\____\
# \/\____/ \__/.\_\ \_\ \_\ \_\ \____/ \____\/\____\ \____//\____\/___/ \/____/\/___/ \/____/
# \/___/ \/__/\/_/\/_/\/_/\/_/\/___/ \/____/\/____/\/___/ \/____/ by [email protected]
#
#
ZSH=$HOME/dotfiles/.zsh
ZSH_CUSTOM=$HOME/dotfiles/zsh_customization
#export ZSH_THEME="miloshadzic"
#export ZSH_THEME="norm"
#export ZSH_THEME="funky"
#export ZSH_THEME="dogenpunk"
#export ZSH_THEME="jreese"
export ZSH_THEME="crunch"
# zsh plugin settings
# --------------------------------------------
platform='unknown'
unamestr=`uname`
if [[ "$unamestr" == 'Linux' ]]; then
echo "using ZSH on Linux"
platform='Linux'
plugins=(git tmux docker docker-compose zsh-navigation-tools vagrant)
export SCIPY_PIL_IMAGE_VIEWER=gqview
elif [[ "$unamestr" == 'Darwin' ]]; then
echo "using ZSH on OS X"
# goland golang
#export PATH="/Users/samuel/go/bin:/Users/samuel/sdk/go1.18/bin:/usr/local/bin:/usr/local/sbin:/usr/local/opt/python/libexec/bin:$PATH"
# home brew golang
export PATH="/usr/local/Cellar/go/1.19/bin:/usr/local/bin:/usr/local/sbin:/usr/local/opt/python/libexec/bin:$PATH"
# homebrew java
export PATH="/usr/local/opt/openjdk@11/bin:$PATH"
export CPPFLAGS="-I/usr/local/opt/openjdk@11/include"
platform='Darwin'
plugins=(git tmux docker docker-compose zsh-navigation-tools macos vagrant)
fi
#plugins=(git vim github svn brew osx npm nvm node yum tmux virtualenv virtualenvwrapper)
#plugins=(git vim github geeknote svn brew osx npm nvm node virtualenv virtualenvwrapper yum tmux docker docker-compose zsh-navigation-tools web-search)
#[[ -s "/usr/bin/virtualenvwrapper.sh" ]] &&\
# plugins=(git vim github geeknote svn brew osx npm nvm node yum tmux docker docker-compose virtualenvwrapper)
#PATH environment variable
#[[ -d "$HOME/commands" ]] && export PATH="$HOME/commands/bin:$HOME/commands:/usr/local/bin:/usr/local/sbin:$PATH"
echo "Loading oh-my-zsh settings...."
source $ZSH/oh-my-zsh.sh
#website: http://mimosa-pudica.net/zsh-incremental.html
#file link: http://mimosa-pudica.net/src/incr-0.2.zsh
#source ~/dotfiles/incr-0.2.zsh
# alias commands
alias ll='ls -l'
alias l='ll'
alias la='l -a'
alias lh='l -h'
alias sl='ls'
export LC_CTYPE="zh_TW.UTF-8"
# terminal color issue
#export TERM=screen-256color
#export TERM=xterm
#alias tmux='DISPLAY=:0.0 TERM=screen-256color tmux -2'
alias tmux='DISPLAY=:0.0 tmux -2'
alias screen='DISPLAY=:0.0 TERM=xterm-256color screen'
#my zsh_completion
fpath=($HOME/dotfiles/zsh_completion $fpath)
autoload -U compinit
compinit
bindkey \^U backward-kill-line
# keymap
# https://wiki.archlinux.org/index.php/Zsh#Key_bindings
[[ -s "$HOME/dotfiles/.myenvvar" ]] && source "$HOME/dotfiles/.myenvvar"
# nvm, rvm, virtualenv
#source $HOME/dotfiles/samuel_py_rc
#source $HOME/dotfiles/samuel_node_rc
#source $HOME/dotfiles/samuel_ruby_rc
#echo ""
if [[ -s "/usr/bin/neofetch" ]]; then
neofetch
elif [[ -s "/usr/local/bin/neofetch" ]]; then
neofetch
elif [[ -s "/usr/bin/screenfetch" ]]; then
screenfetch
fi
#source personal rc setting with gitignored file
[[ -s "$HOME/dotfiles/samuel_zshrc" ]] && source $HOME/dotfiles/samuel_zshrc
# vim original: /usr/local/bin/vim
# (The following settings could be moved to $HOME/dotfiles/samuel_zshrc,
# which is already ignored from git repo for customization)
#
#alias vim='/usr/local/bin/nvim'