Advertisement
Guest User

Untitled

a guest
Apr 29th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.77 KB | None | 0 0
  1. # Lines configured by zsh-newuser-install
  2. HISTFILE=~/.histfile
  3. HISTSIZE=1000
  4. SAVEHIST=1000
  5. bindkey -v
  6. # End of lines configured by zsh-newuser-install
  7. # The following lines were added by compinstall
  8. zstyle :compinstall filename '/home/liuchong/.zshrc'
  9.  
  10. # End of lines added by compinstall
  11.  
  12. autoload -U compinit promptinit
  13. compinit
  14. promptinit
  15.  
  16. prompt walters
  17.  
  18. setopt autocd
  19.  
  20. if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
  21. export QT_QPA_PLATFORM=wayload
  22. XDG_SESSION_TYPE=wanland exec dbus-run-session gnome-session
  23. fi
  24.  
  25. setopt HIST_IGNORE_DUPS
  26.  
  27. autoload -Uz add-zsh-hook
  28. function xterm_title_precmd () {
  29. print -Pn '\e]2;%n@%m %/\a'
  30. }
  31.  
  32. function xterm_title_preexec () {
  33. print -Pn '\e]2;%n@%m %/ %# '
  34. print -n "${(q)1}\a"
  35. }
  36.  
  37. if [[ "$TERM" == (screen*|xterm*|rxvt*) ]]; then
  38. add-zsh-hook -Uz precmd xterm_title_precmd
  39. add-zsh-hook -Uz preexec xterm_title_preexec
  40. fi
  41.  
  42. alias ll='ls -lFh --color=always'
  43. alias tailf='tail -f'
  44. alias less='less -R'
  45.  
  46. source ~/.zsh-nvm/zsh-nvm.plugin.zsh
  47.  
  48. export JAVA_HOME=/usr/lib/jvm/default
  49. export ANDROID_HOME=$HOME/.opt/android-sdk
  50.  
  51.  
  52. export PATH=$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin
  53. export PATH=$PATH:$ANDROID_HOME/ndk-bundle
  54. export PATH=$PATH:$HOME/.opt/android-studio/bin/
  55.  
  56. export WINEPREFIX=$HOME/win32
  57. export WINEARCH=win32
  58.  
  59. export DB_SOCKET="$HOME/work/mariadb/run/mariadb.socket"
  60.  
  61.  
  62. autoload zkbd
  63. function zkbd_file() {
  64. [[ -f ~/.zkbd/${TERM}-${VENDOR}-${OSTYPE} ]] && printf '%s' ~/".zkbd/${TERM}-${VENDOR}-${OSTYPE}" && return 0
  65. [[ -f ~/.zkbd/${TERM}-${DISPLAY} ]] && printf '%s' ~/".zkbd/${TERM}-${DISPLAY}" && return 0
  66. return 1
  67. }
  68.  
  69. [[ ! -d ~/.zkbd ]] && mkdir ~/.zkbd
  70. keyfile=$(zkbd_file)
  71. ret=$?
  72. if [[ ${ret} -ne 0 ]]; then
  73. zkbd
  74. keyfile=$(zkbd_file)
  75. ret=$?
  76. fi
  77. if [[ ${ret} -eq 0 ]] ; then
  78. source "${keyfile}"
  79. else
  80. printf 'Failed to setup keys using zkbd.\n'
  81. fi
  82. unfunction zkbd_file; unset keyfile ret
  83.  
  84. # setup key accordingly
  85. [[ -n "$key[Home]" ]] && bindkey -- "$key[Home]" beginning-of-line
  86. [[ -n "$key[End]" ]] && bindkey -- "$key[End]" end-of-line
  87. [[ -n "$key[Insert]" ]] && bindkey -- "$key[Insert]" overwrite-mode
  88. [[ -n "$key[Backspace]" ]] && bindkey -- "$key[Backspace]" backward-delete-char
  89. [[ -n "$key[Delete]" ]] && bindkey -- "$key[Delete]" delete-char
  90. [[ -n "$key[Up]" ]] && bindkey -- "$key[Up]" up-line-or-history
  91. [[ -n "$key[Down]" ]] && bindkey -- "$key[Down]" down-line-or-history
  92. [[ -n "$key[Left]" ]] && bindkey -- "$key[Left]" backward-char
  93. [[ -n "$key[Right]" ]] && bindkey -- "$key[Right]" forward-char
  94.  
  95. fg() {
  96. if [[ $# -eq 1 && $1 = - ]]; then
  97. builtin fg %-
  98. else
  99. builtin fg %"$@"
  100. fi
  101. }
  102.  
  103. export NVM_DIR="$HOME/.nvm"
  104. [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement