-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
466 lines (401 loc) · 17.1 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
# environment variable
if [ -z $IS_PATH_SET ]; then
case `uname` in
Darwin)
export PATH="$PATH:/Library/TeX/texbin"
export PATH="$PATH:/Applications/Adobe Acrobat DC/Adobe Acrobat.app/Contents/MacOS/"
export PATH="$PATH:/Applications/Skim.app/Contents/MacOS/"
export PATH="$PATH:/Applications/Firefox.app/Contents/MacOS/"
export PATH="$PATH:/Applications/Google Chrome.app/Contents/MacOS/"
export PATH="$PATH:/Applications/Vivaldi.app/Contents/MacOS/"
export PATH="$PATH:/Applications/VirtualBox.app/Contents/MacOS/"
export PATH="$PATH:/Applications/Wine Staging.app/Contents/Resources/wine/bin/"
export PATH="/usr/local/opt/inetutils/libexec/gnubin:$PATH"
export MANPATH="/usr/local/opt/inetutils/libexec/gnuman:$MANPATH"
;;
esac
export PATH="$HOME/.local/bin:$PATH"
export PATH="$PATH:$PSPDEV/bin:$HOME/bin"
export PATH="$PATH:$VITASDK/bin"
which ruby > /dev/null 2>&1 && export PATH="$(ruby -rrubygems -e "puts Gem.user_dir")/bin:$PATH"
export PATH="/home/$USER/.cabal/bin:$PATH"
export PATH="/usr/lib/ccache/bin:$PATH"
export PATH="/usr/share/git/diff-highlight:$PATH"
#export PATH="$HOME/.cargo/bin:$PATH"
#export PATH="/usr/lib/smlnj/bin:$PATH"
if [ -n "$(echo $PATH | grep Gentoo)" ] || [ "$(uname -r | awk -F- '{print $2}')" = "gentoo" ]; then
export PATH="$PATH:/usr/sbin:/sbin"
fi
export MANPATH="/usr/share/man/ja:/usr/share/man:/usr/local/man:/usr/local/share/man"
export MANPATH="$MANPATH:/usr/i486-mingw32/share/man:/opt/qt/man"
export MANPATH="$MANPATH:/opt/pspsdk/man:/opt/pspsdk/psp/man:/opt/pspsdk/psp/share/man"
which rbenv > /dev/null 2>&1 && eval "$(rbenv init -)"
# OCaml OPAM
[ -f ~/.opam/opam-init/init.zsh ] && . $HOME/.opam/opam-init/init.zsh /dev/null 2> /dev/null || true
export IS_PATH_SET=1
fi
# other environment variable
HISTFILE=~/.zsh_history
HISTSIZE=100000
SAVEHIST=100000
REPORTTIME=3
# set default permission file -> 644 directory -> 755
umask 022
[ ! -d $HOME/.zfunc ] && mkdir $HOME/.zfunc
[ ! -f $HOME/.zfunc/_rustup ] && [ -f /usr/bin/rustup ] && rustup completions zsh > $HOME/.zfunc/_rustup
fpath+=$HOME/.zfunc
[ -f ~/.zshrc.color ] && source ~/.zshrc.color
vendor=$(uname -r | awk -F- '{print $3}')
# most necesary setting
autoload -U compinit promptinit
compinit -c
promptinit
## prompt preset
#prompt walters
## progronosisi complete
##
#autoload predict-on
#predict-on
# set keybind like vi
bindkey -v
# bindkey hjkl to select complete menu
zmodload zsh/complist
bindkey -M menuselect 'h' vi-backward-char
bindkey -M menuselect 'j' vi-down-line-or-history
bindkey -M menuselect 'k' vi-up-line-or-history
bindkey -M menuselect 'l' vi-forward-char
# grouping complete command
zstyle ':completion:*' menu select
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' group-name ''
zstyle ':completion:*' format "%B${fg_red}completing %B${underline}${fg_yellow}%d%b"
# display vcs infomation
autoload -Uz vcs_info
zstyle ':vcs_info:*' formats \
'(%{%F{white}%K{green}%}%s%{%f%k%})-[%{%F{white}%K{blue}%}%b%{%f%k%}]'
zstyle ':vcs_info:*' actionformats \
'(%{%F{white}%K{green}%}%s%{%f%k%})-[%{%F{white}%K{blue}%}%b%{%f%k%}|%{%F{white}%K{red}%}%a%{%f%k%}]'
# alias
setopt complete_aliases
alias h='history 25'
alias j='jobs -l'
which gcc > /dev/null 2>&1 && GCC_VERSION=$(gcc -dumpversion | awk -F. '{printf "%2d%02d%02d", $1,$2,$3}')
alias grep='grep --color=auto'
#alias less='/usr/share/vim/vim74/macros/less.sh'
case `uname` in
Darwin)
if [ -z $(which ls | grep Gentoo) ]; then
alias ls='ls -G -w'
export LSCOLORS=fxgxcxdxcxegedabagacad
else
alias ls='ls --color'
# set dircolors
if [ -e ~/.dir_colors ]; then
eval `dircolors -b ~/.dir_colors`
else
export LS_COLORS='no=00:fi=00:di=01;35:ln=01;36:pi=40;33:so=01;32:do=01;32:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;33:*.jpeg=01;33:*.gif=01;33:*.bmp=01;33:*.pbm=01;33:*.pgm=01;33:*.ppm=01;33:*.tga=01;33:*.xbm=01;33:*.xpm=01;33:*.tif=01;33:*.tiff=01;33:*.png=01;33:*.svg=01;33:*.mng=01;33:*.pcx=01;33:*.mov=01;33:*.mpg=01;33:*.mpeg=01;33:*.m2v=01;33:*.mkv=01;33:*.ogm=01;33:*.mp4=01;33:*.m4v=01;33:*.mp4v=01;33:*.vob=01;33:*.qt=01;33:*.nuv=01;33:*.wmv=01;33:*.asf=01;33:*.rm=01;33:*.rmvb=01;33:*.flc=01;33:*.avi=01;33:*.fli=01;33:*.gl=01;33:*.dl=01;33:*.xcf=01;33:*.xwd=01;33:*.yuv=01;33:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:'
fi
fi
;;
FreeBSD)
if [ "$GCC_VERSION" -ge 40900 ]; then
alias gcc='gcc -fdiagnostics-color'
fi
alias ls='ls -G -w'
export LSCOLORS=fxgxcxdxcxegedabagacad
;;
Linux)
if [ "$GCC_VERSION" -ge 40900 ]; then
alias gcc='gcc -fdiagnostics-color'
fi
alias ls='ls --color'
# set dircolors
export LS_COLORS='no=00:fi=00:di=01;35:ln=01;36:pi=40;33:so=01;32:do=01;32:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;33:*.jpeg=01;33:*.gif=01;33:*.bmp=01;33:*.pbm=01;33:*.pgm=01;33:*.ppm=01;33:*.tga=01;33:*.xbm=01;33:*.xpm=01;33:*.tif=01;33:*.tiff=01;33:*.png=01;33:*.svg=01;33:*.mng=01;33:*.pcx=01;33:*.mov=01;33:*.mpg=01;33:*.mpeg=01;33:*.m2v=01;33:*.mkv=01;33:*.ogm=01;33:*.mp4=01;33:*.m4v=01;33:*.mp4v=01;33:*.vob=01;33:*.qt=01;33:*.nuv=01;33:*.wmv=01;33:*.asf=01;33:*.rm=01;33:*.rmvb=01;33:*.flc=01;33:*.avi=01;33:*.fli=01;33:*.gl=01;33:*.dl=01;33:*.xcf=01;33:*.xwd=01;33:*.yuv=01;33:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:'
if [ -e ~/.dir_colors ]; then
eval `dircolors -b ~/.dir_colors`
fi
if [ -z "$LS_COLORS" ]; then
export LS_COLORS='no=00:fi=00:di=01;35:ln=01;36:pi=40;33:so=01;32:do=01;32:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;33:*.jpeg=01;33:*.gif=01;33:*.bmp=01;33:*.pbm=01;33:*.pgm=01;33:*.ppm=01;33:*.tga=01;33:*.xbm=01;33:*.xpm=01;33:*.tif=01;33:*.tiff=01;33:*.png=01;33:*.svg=01;33:*.mng=01;33:*.pcx=01;33:*.mov=01;33:*.mpg=01;33:*.mpeg=01;33:*.m2v=01;33:*.mkv=01;33:*.ogm=01;33:*.mp4=01;33:*.m4v=01;33:*.mp4v=01;33:*.vob=01;33:*.qt=01;33:*.nuv=01;33:*.wmv=01;33:*.asf=01;33:*.rm=01;33:*.rmvb=01;33:*.flc=01;33:*.avi=01;33:*.fli=01;33:*.gl=01;33:*.dl=01;33:*.xcf=01;33:*.xwd=01;33:*.yuv=01;33:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:'
fi
;;
esac
if [ -n "$XDG_CURRENT_DESKTOP" ] && [ "$XDG_CURRENT_DESKTOP" = "GNOME" ]; then
alias xdg-open='gio open'
fi
which nvim > /dev/null 2>&1 && alias vim='nvim'
if $(echo `tty | sed -e 's/\/dev\///'` | grep pty > /dev/null ) ; then
alias tmux='env TERM=xterm-256color tmux'
fi
alias la='ls -aF'
alias lf='ls -FA'
alias ll='ls -lAF'
alias lsd='ls -ld *(-/DN)' # display only Directory and DirectorySymbolicLink
#alias -g L='| less'
#alias -g H='| head'
#alias -g T='| tail'
#alias -g G='| grep'
#alias -g W='| wc'
#alias -g S='| sed'
#alias -g A='| awk'
#alias less=lv
alias unzip='unzip -Ocp932'
alias info='info --vi-keys'
alias verynice='ionice -c3 nice -n 15'
alias maxima='rlwrap maxima'
alias luajitlatex='luajittex --fmt=luajitlatex.fmt'
case `uname` in
Linux)
if [[ "$vendor" == "Microsoft" ]]; then
alias clipin='/mnt/c/tools/win32yank/win32yank.exe -i'
alias clipout='/mnt/c/tools/win32yank/win32yank.exe -o'
else
alias clipin='xsel --clipboard --input'
alias clipout='xsel --clipboard --output'
fi
;;
Darwin)
alias clipin='pbcopy'
alias clipout='pbpaste'
;;
esac
alias chkccopt="gcc -march=native -E -v - </dev/null 2>&1 | sed -n 's/.* -v - //p'"
alias chkccdef="echo | gcc -E -xc -dM - | sort | uniq"
#echo | gcc -E -v -march=native - 2>&1 | sed '/march/!d;s/.*\(-march\)/\1/'
alias pacman='sudo pacmatic'
alias mksrcinfo='makepkg --printsrcinfo > .SRCINFO'
alias pacmanlist='/usr/bin/pacman -Qqettn'
alias aurlist='/usr/bin/pacman -Qqettm'
#alias jfbterm='env LANG=ja_JP.UTF-8 jfbterm -e uim-fep'
#alias jman='env LANG=ja_JP.eucJP GROFF_NO_SGR=true jman'
#alias exctags=jexctags
lsofcmd() { lsof -o0 -o -p $(pidof "$@") }
findgrep() { find . -name '*.c' -or -name '*.h' -exec grep -H "$@" {} \; }
play_tv() { mpv "http://mani:40772/api/channels/$1/$2/stream?decode=1" }
alias tokyomx='play_tv GR 16'
alias ud='play_tv GR 28'
alias bs11='play_tv BS BS09_0'
# history
#
setopt hist_ignore_dups # no recoding duplicate command
setopt hist_save_no_dups # no recoding duplicate command in history
setopt share_history # sharing history between other session in real time
setopt hist_reduce_blanks # recoding history its removed extra space
setopt incappend_history # recoding history in order on multiple session
setopt histnostore # no recoding history command in history
setopt inc_append_history # add history as increment
setopt extended_history # add execute date to history
# fileglob
#
setopt extendedglob # use extended glob
setopt globdots # match dotfiles
setopt magic_equal_subst # glob after = (ex. ./configure --prefix=...)
#setopt numericglobsort # sorted by numeric
# I/O
#
#setopt noclobber # show error for overwrite redirect
#setopt correct # correcting spell for command
#setopt correctall # correcting spell for command argument
# changing directory
#
setopt cdable_vars # assignment absolute path variable regard to directory
setopt auto_cd # moving directory only typing directory name
setopt auto_pushd # push directory stack only cd command
setopt pushd_ignore_dups # no pushing duplicate directory
# control job
#
setopt autoresume # resume job type job\'s initial
setopt longlistjobs # use long formant for job list
setopt notify # quick display background job status
# complete
#
#setopt autolist # it has complete candidate, auto listup menu
#setopt auto_menu
setopt list_types # display file type when compliting
setopt list_packed # packed disoplay when compliting
setopt nolistbeep # mute beep
setopt completeinword
# complete from command history
autoload history-search-end
zle -N history-beginning-search-backward-end history-search-end
zle -N history-beginning-search-forward-end history-search-end
bindkey "" history-beginning-search-backward-end
bindkey "" history-beginning-search-forward-end
[ -f ~/zsh_plugin/zaw/zaw.zsh ] && bindkey "" zaw-history # plugin
# bindkey
#
setopt noflowcontrol # to use C-q, C-s
bindkey '' push-line-or-edit # to use buffer stack on vi keybind
#
# Set Prompt
#
if [ -n "$(command -v starship)" ]; then
eval "$(starship init zsh)"
else
update_prompt(){
PROMPTTTY=`tty | sed -e 's/\/dev\///'`
if [ -n "$(echo $PATH | grep Gentoo)" ]; then
gentoo_prompt="${fg_default}Gentoo on "
fi
if [ -n "$SSH_CONNECTION" ]; then
prompt_hostname="${fg_yellow}${underline}%m${clear}"
else
prompt_hostname="${fg_green}%m${fg_default}"
fi
PROMPT="%b${fg_green}%n${fg_default}@${gentoo_prompt}${prompt_hostname}<%B${PROMPTTTY}%b>
%(?..${bg_blue}%?)${clear}%(!.#.$) "
RPROMPT=" %B%(?.${fg_yellow}[%39<...<%~]%b${fg_default}.:()"
SPROMPT="correct: %R -> %r ? "
LANG=C vcs_info >&/dev/null
if [ -n "$vcs_info_msg_0_" ]; then
RPROMPT="${vcs_info_msg_0_}-${RPROMPT}"
fi
}
precmd_functions=($precmd_functions update_prompt)
fi
#
# resize console
#
rsz() {
if [[ -t 0 && $# -eq 0 ]];then
local IFS='[;' escape geometry x y
print -n '\e7\e[r\e[999;999H\e[6n\e8'
read -sd R escape geometry
x=${geometry##*;} y=${geometry%%;*}
if [[ ${COLUMNS} -eq ${x} && ${LINES} -eq ${y} ]];then
print "${TERM} ${x}x${y}"
else
print "${COLUMNS}x${LINES} -> ${x}x${y}"
stty cols ${x} rows ${y}
fi
else
[[ -n ${commands[repo-elephant]} ]] && repo-elephant || print 'Usage: rsz' ## Easter egg here :)
fi
}
#
# print system info
#
neofetch() {curl -s https://raw.githubusercontent.com/dylanaraps/neofetch/master/neofetch | bash}
#
# Colored man page
#
man() {
env \
LESS_TERMCAP_mb=$(printf "\e[1;31m") \
LESS_TERMCAP_md=$(printf "\e[1;31m") \
LESS_TERMCAP_me=$(printf "\e[0m") \
LESS_TERMCAP_se=$(printf "\e[0m") \
LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
LESS_TERMCAP_ue=$(printf "\e[0m") \
LESS_TERMCAP_us=$(printf "\e[1;32m") \
man "$@"
}
#
# show all history
#
history-all() { history -E 1 }
#
# PDF producing from markdown using pandoc w/ Japanese
#
md2pdf() {
if [ $# -ne 5 ]; then
echo "Usage: $0 <title> <author> <date> <input file> <output file>"
return 1
fi
case `uname` in
Linux)
# fontfamily=sourcehan-jp,deluxe
fontfamily=hiragino-pron,deluxe,jis2004
;;
Darwin)
fontfamily=hiragino-pron,deluxe,jis2004
;;
esac
(cat << EOF
---
title: $1
author: $2
date: $3
header-includes:
- \usepackage{unicode-math}
- \unimathsetup{math-style=ISO,bold-style=ISO}
- \setmathfont{TeX Gyre Pagella Math}
- \setmainfont[Ligatures=TeX, Scale=0.95]{TeX Gyre Pagella}
- \setsansfont[Ligatures=TeX, Scale=0.95]{TeX Gyre Heros}
- \setmonofont[Ligatures=TeX, Scale=1]{TeX Gyre Cursor}
- \renewcommand{\bfdefault}{bx}
- \renewcommand{\headfont}{\gtfamily\sffamily\bfseries}
- \usepackage{luacode}
- \usepackage{luatexja-otf}
- \usepackage[$fontfamily]{luatexja-preset}
- \ltjsetparameter{jacharrange={-2}}
- \usepackage[euler-digits,euler-hat-accent]{eulervm}
---
EOF
) | cat - $4 \
| pandoc -f markdown -t latex \
--latex-engine=lualatex \
-V documentclass=ltjsarticle \
-V classoption=10.5ptj -V classoption=a4paper \
-o $5
}
#
# appendix
#
fizzbuzz() {
seq $1 | sed '5~5s/.*/Buzz/' | sed '3~3s/[0-9]*/Fizz/'
}
prime() {
seq 2 $1 | factor | awk '$0*=!$3'
}
##
## setting city by geoiplookup
##
#
#if [ "ping not found" = "$(which ping)" ]; then
# if [ "ping4 not found" != "$(which ping4)" ]; then PING=ping4;
# else export CITY=Tokyo
# fi
#elif [ "Darwin" = "$(uname)" ]; then PING=ping;
#elif [ -z "$(ping 2>&1 | grep 'ping -6')" ]; then PING=ping;
#else PING=ping && PING_OPT=-4
#fi
#
#if [ -z "$CITY" ]; then
# $PING $PING_OPT google.com -c 1 -W 3 >> /dev/null
# if [ $? -eq 0 ] && [ -e /usr/bin/geoiplookup ] && [ -e /usr/bin/dig ]; then
## export CITY=$(echo $(geoiplookup $(curl -s4 inet-ip.info) | grep City | awk -F , '{print $4}'))
## export CITY=$( curl -s4 ipinfo.io | grep city | cut -d: -f 3 | sed -e 's/ *"\(.*\)",/\1/' )
# PUBLIC_IP=$(dig +short myip.opendns.com @resolver1.opendns.com)
# if [ -z "$PUBLIC_IP" ]; then
# export CITY=$( curl -s4 ipinfo.io | grep city | cut -d: -f 3 | sed -e 's/ *"\(.*\)",/\1/' )
# else
# export CITY=$(echo $(geoiplookup $(dig +short myip.opendns.com @resolver1.opendns.com) | grep City | awk -F , '{print $4}'))
# fi
# if [ "$CITY" = "N/A" ] || [ "$CITY" = "" ] ; then
# export CITY=Tokyo
# fi
# else
# export CITY=Tokyo
# fi
#fi
# create tmp directory for openSUSE with WSL
if [ -f /etc/os-release ]; then
dist_name=$(grep '^NAME=' /etc/os-release | awk -F\" '{print $2}')
else
dist_name="none"
fi
if [[ "$vendor" == "Microsoft" ]] && [[ "$dist_name" == "openSUSE Leap" ]] && [ ! -d /var/run/systemd ]; then
systemd-tmpfiles --create
fi
#
# Include other files
#
[ -f ~/.zshrc.utils ] && source ~/.zshrc.utils || true
[ -f ~/.zshrc.search ] && source ~/.zshrc.search || true
[ -f ~/.zshrc.vimode ] && source ~/.zshrc.vimode || true
[ -f ~/alias-sradio.txt ] && source ~/alias-sradio.txt || true
#[ -f ~/zsh_plugin/zaw/zaw.zsh ] && source ~/zsh_plugin/zaw/zaw.zsh || true
if $(echo `tty | sed -e 's/\/dev\///'` | grep ttyS > /dev/null ) ; then
rsz
fi
#vim:set ft=zsh: