Advertisement
Guest User

fitymakoktel

a guest
Sep 17th, 2015
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.70 KB | None | 0 0
  1. ### source global profile:
  2.  
  3. #source /etc/profile
  4. #source ~/.profile
  5. source ~/.utf8
  6.  
  7. ### zsh shtuff:
  8.  
  9. HISTSIZE=36000
  10. SAVEHIST=36000
  11. HISTFILE=~/.zsh_history
  12. PROMPT='%B[%n@%m:%~]%b '
  13.  
  14. zmodload zsh/mathfunc
  15.  
  16. setopt APPEND_HISTORY
  17. setopt SHARE_HISTORY
  18. setopt HIST_ALLOW_CLOBBER
  19. setopt HIST_REDUCE_BLANKS
  20. setopt HIST_IGNORE_DUPS
  21. setopt INC_APPEND_HISTORY
  22. setopt ALL_EXPORT
  23. setopt AUTO_CD
  24. #setopt CDABLE_VARS
  25. setopt CHASE_LINKS
  26. setopt CHASE_DOTS
  27. #setopt GLOBDOTS
  28. #setopt ALWAYS_TO_END
  29. #setopt MENUCOMPLETE
  30. setopt NOCLOBBER
  31. setopt CDABLEVARS
  32. #setopt CORRECT
  33. #setopt CORRECTALL
  34. setopt BRACE_CCL
  35. unsetopt BEEP
  36.  
  37. unsetopt BG_NICE
  38.  
  39. zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
  40. autoload -U compinit zmv
  41. compinit
  42.  
  43. #bindkey "\e[3~" delete-char
  44. #bindkey '^[[H' beginning-of-line
  45. #bindkey '^[[F' end-of-line
  46. #bindkey '\e[1~' beginning-of-line
  47. #bindkey '\e[4~' end-of-line
  48. #bindkey '\e[6~' down-line-or-search
  49. #bindkey '\e[5~' up-line-or-search
  50. #bindkey '\e[3~' delete-char
  51. #bindkey '^i' expand-or-complete-prefix
  52.  
  53. bindkey '^[OH' beginning-of-line
  54. bindkey '^[OF' end-of-line
  55. bindkey '^[[2~' overwrite-mode
  56. bindkey '^[[3~' delete-char
  57. bindkey '^[OA' up-line-or-history
  58. bindkey '^[OB' down-line-or-history
  59. bindkey '^[OD' backward-char
  60. bindkey '^[OC' forward-char
  61. bindkey '^[[5~' history-beginning-search-backward
  62. bindkey '^[[6~' history-beginning-search-forward
  63.  
  64. # type '...' to get '../..' with successive .'s adding /..
  65. function rationalise-dot {
  66. local MATCH # keep the regex match from leaking to the environment
  67. if [[ $LBUFFER =~ '(^|/| | |'$'\n''|\||;|&)\.\.$' ]]; then
  68. LBUFFER+=/
  69. zle self-insert
  70. zle self-insert
  71. else
  72. zle self-insert
  73. fi
  74. }
  75. zle -N rationalise-dot
  76. bindkey . rationalise-dot
  77. # without this, typing a . aborts incremental history search
  78. bindkey -M isearch . self-insert
  79.  
  80. ### aliases:
  81.  
  82. alias -g ll='ls -laiFh'
  83. alias -g l='ls -F'
  84. alias -g ls='ls -F'
  85. alias -g lx='du -hsx * | sort -rh'
  86. alias -g s='sudo '
  87. #alias -g su='su -'
  88. alias -g grep='egrep -ia'
  89. alias -g rm='rm -iv'
  90. alias -g mv='mv -iv'
  91. alias -g cp='cp -iv'
  92. alias -g o='xdg-open'
  93. alias -g aa='aptitude'
  94. alias -g a='apt-get'
  95. alias -g af='apt-file'
  96. alias -g as='apt-cache search'
  97. alias -g aas='aptitude search'
  98. alias -g ac='apt-cache'
  99. alias -g uu='sudo apt-get update && sudo apt-get dist-upgrade'
  100. alias -g aclean='sudo apt-get -y --purge autoremove && sudo dpkg -P `deborphan` ; sudo apt-get clean && sudo apt-get autoclean'
  101. #alias -g sc='ffmpeg -f alsa -ac 2 -i hw:0,0 -f x11grab -r 25 -s 1366x768 -i :0.0 -sameq -ac 1 ~/Desktop/screencast.mp4'
  102. alias -g sc='ffmpeg -f alsa -i pulse -f x11grab -r 25 -s 1366x768 -i :0.0 -sameq ~/Desktop/screencast.mp4'
  103. alias -g burn='wodim dev=/dev/sr0 -v -data'
  104. alias -g cdblank='wodim blank=fast'
  105. alias -g get='wget -c --tries=0'
  106. alias -g siterip='wget -mk -np -c'
  107. alias -g alsamixer='TERM=xterm-bold alsamixer'
  108. alias -g mc='TERM=xterm-bold mc'
  109. alias -g me='TERM=xterm-bold mcedit'
  110. alias -g elinks='TERM=xterm-bold elinks'
  111. alias -g htop='TERM=xterm-bold htop'
  112. alias -g lynx='TERM=xterm-bold lynx'
  113. alias -g irssi='TERM=xterm-bold irssi'
  114. alias -g matrix='TERM=xterm-bold cmatrix'
  115. alias -g tmux='TERM=xterm-bold tmux'
  116. #alias -g vim='TERM=xterm-bold vim'
  117. #alias -g fpc='ppcx64'
  118. #alias -g fpc32='fpc'
  119. alias -g less='less -X'
  120. alias -g cfdisk='TERM=xterm-bold cfdisk'
  121. alias -g conn='sudo netstat -natp | grep EST'
  122. alias -g wakeanubis='powerwake -b 10.10.10.100 00:1c:c0:7d:04:fa'
  123. alias -g wakeanubisnet='ssh root@bamdadkhan.ddns.net -p 10001 "/usr/sbin/wol -h 10.10.10.100 00:1c:c0:7d:04:fa"'
  124. alias -g sleepanubis='ssh bamdad@10.10.10.100 "sudo /usr/sbin/pm-suspend & exit"'
  125. alias -g sleepanubisnet='ssh bamdad@bamdadkhan.ddns.net -p 1001 "sudo /usr/sbin/pm-suspend & exit"'
  126. alias -g shanubisnet='ssh bamdad@bamdadkhan.ddns.net -p 1001'
  127. alias -g sftpanubisnet='sftp -P 1001 bamdad@bamdadkhan.ddns.net'
  128. alias -g shanubis='ssh bamdad@10.10.10.100'
  129. alias -g sftpanubis='sftp bamdad@10.10.10.100'
  130. alias -g shanbarnet='ssh bamdad@bamdadkhan.ddns.net -p 666'
  131. alias -g sftpanbarnet='sftp -P 666 bamdad@bamdadkhan.ddns.net -P'
  132. alias -g shanbar='ssh bamdad@10.10.10.149'
  133. alias -g sftpanbar='sftp bamdad@10.10.10.149'
  134. alias -g shnapocka='rsh 10.10.10.200'
  135. alias -g xnapocka='Xephyr :1 -screen 1024x768 -ac -query 10.10.10.200'
  136.  
  137. ### functions
  138.  
  139. function pid {
  140. ps ax | \grep -i $@ | \grep -v \grep
  141. }
  142.  
  143. function replaceall {
  144. f="$1"
  145. r="$2"
  146. shift
  147. shift
  148. perl -pi -w -e "s/$f/$r/g;" "$@"
  149. }
  150.  
  151. function yt {
  152. mplayer -cookies -cookies-file /tmp/cookie.txt $(youtube-dl -g --cookies /tmp/cookie.txt $1)
  153. }
  154.  
  155. function speak {
  156. echo $@ | espeak -p30 -s170 --stdout | aplay
  157. }
  158. function speakhu {
  159. echo $@ | espeak -vhu -p30 -s170 --stdout | aplay
  160. }
  161. function rawsnd {
  162. su -c "cat $@ | padsp tee /dev/audio > /dev/null"
  163. }
  164. function 2mp3 {
  165. ffmpeg -i $@ -acodec libmp3lame -ac 2 -ab 256k -vn -y $(echo $@ | cut -d"." -f1).mp3
  166. }
  167. function murder {
  168. kill -9 $(ps ax | \grep $1 | \grep -v \grep | awk '{print $1}')
  169. }
  170.  
  171. ### misc
  172.  
  173. export EDITOR=nano
  174. export PATH=~/.bin:$PATH
  175. #export TERM=xterm-bold
  176. #export PATH=/opt/solstudio12.2/bin:$PATH
  177. #export MANPATH=/opt/solstudio12.2/man:$MANPATH
  178.  
  179. # bell
  180.  
  181. #if [ $DISPLAY != "" ]; then
  182. # /usr/bin/xset b 100
  183. #fi
  184.  
  185. #### tmux
  186.  
  187. if [ $TERM != "screen-256color" ] && [ $TERM != "screen" ]; then
  188. tmux new;
  189. export DBUS_SESSION_BUS_ADDRESS=$(tr '\0' '\n' < /proc/$(pgrep -U $(whoami) gnome-session)/environ|grep ^DBUS_SESSION_BUS_ADDRESS=|cut -d= -f2-)
  190. fi
  191.  
  192. ### dtach
  193.  
  194. #CURRTTY=`echo $TTY | tr -d '/dev/pts/'`
  195. #if [ ! -f /tmp/dtach.$CURRTTY ]; then
  196. # dtach -A /tmp/dtach.$CURRTTY -z zsh
  197. #fi
  198.  
  199. #biff y
  200.  
  201. cd ~
  202.  
  203.  
  204. ---
  205.  
  206.  
  207. set -g terminal-overrides 'xterm*:smcup@:rmcup@'
  208. #set -g status-position top
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement