Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### source global profile:
- #source /etc/profile
- #source ~/.profile
- source ~/.utf8
- ### zsh shtuff:
- HISTSIZE=36000
- SAVEHIST=36000
- HISTFILE=~/.zsh_history
- PROMPT='%B[%n@%m:%~]%b '
- zmodload zsh/mathfunc
- setopt APPEND_HISTORY
- setopt SHARE_HISTORY
- setopt HIST_ALLOW_CLOBBER
- setopt HIST_REDUCE_BLANKS
- setopt HIST_IGNORE_DUPS
- setopt INC_APPEND_HISTORY
- setopt ALL_EXPORT
- setopt AUTO_CD
- #setopt CDABLE_VARS
- setopt CHASE_LINKS
- setopt CHASE_DOTS
- #setopt GLOBDOTS
- #setopt ALWAYS_TO_END
- #setopt MENUCOMPLETE
- setopt NOCLOBBER
- setopt CDABLEVARS
- #setopt CORRECT
- #setopt CORRECTALL
- setopt BRACE_CCL
- unsetopt BEEP
- unsetopt BG_NICE
- zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
- autoload -U compinit zmv
- compinit
- #bindkey "\e[3~" delete-char
- #bindkey '^[[H' beginning-of-line
- #bindkey '^[[F' end-of-line
- #bindkey '\e[1~' beginning-of-line
- #bindkey '\e[4~' end-of-line
- #bindkey '\e[6~' down-line-or-search
- #bindkey '\e[5~' up-line-or-search
- #bindkey '\e[3~' delete-char
- #bindkey '^i' expand-or-complete-prefix
- bindkey '^[OH' beginning-of-line
- bindkey '^[OF' end-of-line
- bindkey '^[[2~' overwrite-mode
- bindkey '^[[3~' delete-char
- bindkey '^[OA' up-line-or-history
- bindkey '^[OB' down-line-or-history
- bindkey '^[OD' backward-char
- bindkey '^[OC' forward-char
- bindkey '^[[5~' history-beginning-search-backward
- bindkey '^[[6~' history-beginning-search-forward
- # type '...' to get '../..' with successive .'s adding /..
- function rationalise-dot {
- local MATCH # keep the regex match from leaking to the environment
- if [[ $LBUFFER =~ '(^|/| | |'$'\n''|\||;|&)\.\.$' ]]; then
- LBUFFER+=/
- zle self-insert
- zle self-insert
- else
- zle self-insert
- fi
- }
- zle -N rationalise-dot
- bindkey . rationalise-dot
- # without this, typing a . aborts incremental history search
- bindkey -M isearch . self-insert
- ### aliases:
- alias -g ll='ls -laiFh'
- alias -g l='ls -F'
- alias -g ls='ls -F'
- alias -g lx='du -hsx * | sort -rh'
- alias -g s='sudo '
- #alias -g su='su -'
- alias -g grep='egrep -ia'
- alias -g rm='rm -iv'
- alias -g mv='mv -iv'
- alias -g cp='cp -iv'
- alias -g o='xdg-open'
- alias -g aa='aptitude'
- alias -g a='apt-get'
- alias -g af='apt-file'
- alias -g as='apt-cache search'
- alias -g aas='aptitude search'
- alias -g ac='apt-cache'
- alias -g uu='sudo apt-get update && sudo apt-get dist-upgrade'
- alias -g aclean='sudo apt-get -y --purge autoremove && sudo dpkg -P `deborphan` ; sudo apt-get clean && sudo apt-get autoclean'
- #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'
- alias -g sc='ffmpeg -f alsa -i pulse -f x11grab -r 25 -s 1366x768 -i :0.0 -sameq ~/Desktop/screencast.mp4'
- alias -g burn='wodim dev=/dev/sr0 -v -data'
- alias -g cdblank='wodim blank=fast'
- alias -g get='wget -c --tries=0'
- alias -g siterip='wget -mk -np -c'
- alias -g alsamixer='TERM=xterm-bold alsamixer'
- alias -g mc='TERM=xterm-bold mc'
- alias -g me='TERM=xterm-bold mcedit'
- alias -g elinks='TERM=xterm-bold elinks'
- alias -g htop='TERM=xterm-bold htop'
- alias -g lynx='TERM=xterm-bold lynx'
- alias -g irssi='TERM=xterm-bold irssi'
- alias -g matrix='TERM=xterm-bold cmatrix'
- alias -g tmux='TERM=xterm-bold tmux'
- #alias -g vim='TERM=xterm-bold vim'
- #alias -g fpc='ppcx64'
- #alias -g fpc32='fpc'
- alias -g less='less -X'
- alias -g cfdisk='TERM=xterm-bold cfdisk'
- alias -g conn='sudo netstat -natp | grep EST'
- alias -g wakeanubis='powerwake -b 10.10.10.100 00:1c:c0:7d:04:fa'
- alias -g wakeanubisnet='ssh root@bamdadkhan.ddns.net -p 10001 "/usr/sbin/wol -h 10.10.10.100 00:1c:c0:7d:04:fa"'
- alias -g sleepanubis='ssh bamdad@10.10.10.100 "sudo /usr/sbin/pm-suspend & exit"'
- alias -g sleepanubisnet='ssh bamdad@bamdadkhan.ddns.net -p 1001 "sudo /usr/sbin/pm-suspend & exit"'
- alias -g shanubisnet='ssh bamdad@bamdadkhan.ddns.net -p 1001'
- alias -g sftpanubisnet='sftp -P 1001 bamdad@bamdadkhan.ddns.net'
- alias -g shanubis='ssh bamdad@10.10.10.100'
- alias -g sftpanubis='sftp bamdad@10.10.10.100'
- alias -g shanbarnet='ssh bamdad@bamdadkhan.ddns.net -p 666'
- alias -g sftpanbarnet='sftp -P 666 bamdad@bamdadkhan.ddns.net -P'
- alias -g shanbar='ssh bamdad@10.10.10.149'
- alias -g sftpanbar='sftp bamdad@10.10.10.149'
- alias -g shnapocka='rsh 10.10.10.200'
- alias -g xnapocka='Xephyr :1 -screen 1024x768 -ac -query 10.10.10.200'
- ### functions
- function pid {
- ps ax | \grep -i $@ | \grep -v \grep
- }
- function replaceall {
- f="$1"
- r="$2"
- shift
- shift
- perl -pi -w -e "s/$f/$r/g;" "$@"
- }
- function yt {
- mplayer -cookies -cookies-file /tmp/cookie.txt $(youtube-dl -g --cookies /tmp/cookie.txt $1)
- }
- function speak {
- echo $@ | espeak -p30 -s170 --stdout | aplay
- }
- function speakhu {
- echo $@ | espeak -vhu -p30 -s170 --stdout | aplay
- }
- function rawsnd {
- su -c "cat $@ | padsp tee /dev/audio > /dev/null"
- }
- function 2mp3 {
- ffmpeg -i $@ -acodec libmp3lame -ac 2 -ab 256k -vn -y $(echo $@ | cut -d"." -f1).mp3
- }
- function murder {
- kill -9 $(ps ax | \grep $1 | \grep -v \grep | awk '{print $1}')
- }
- ### misc
- export EDITOR=nano
- export PATH=~/.bin:$PATH
- #export TERM=xterm-bold
- #export PATH=/opt/solstudio12.2/bin:$PATH
- #export MANPATH=/opt/solstudio12.2/man:$MANPATH
- # bell
- #if [ $DISPLAY != "" ]; then
- # /usr/bin/xset b 100
- #fi
- #### tmux
- if [ $TERM != "screen-256color" ] && [ $TERM != "screen" ]; then
- tmux new;
- export DBUS_SESSION_BUS_ADDRESS=$(tr '\0' '\n' < /proc/$(pgrep -U $(whoami) gnome-session)/environ|grep ^DBUS_SESSION_BUS_ADDRESS=|cut -d= -f2-)
- fi
- ### dtach
- #CURRTTY=`echo $TTY | tr -d '/dev/pts/'`
- #if [ ! -f /tmp/dtach.$CURRTTY ]; then
- # dtach -A /tmp/dtach.$CURRTTY -z zsh
- #fi
- #biff y
- cd ~
- ---
- set -g terminal-overrides 'xterm*:smcup@:rmcup@'
- #set -g status-position top
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement