# ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples # If not running interactively, don't do anything case $- in *i*) ;; *) return;; esac # don't put duplicate lines or lines starting with space in the history. # See bash(1) for more options HISTCONTROL=ignoreboth # append to the history file, don't overwrite it shopt -s histappend # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) HISTSIZE=1000 HISTFILESIZE=2000 # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. shopt -s checkwinsize # If set, the pattern "**" used in a pathname expansion context will # match all files and zero or more directories and subdirectories. #shopt -s globstar # make less more friendly for non-text input files, see lesspipe(1) [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" # set variable identifying the chroot you work in (used in the prompt below) if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then debian_chroot=$(cat /etc/debian_chroot) fi ########################___start color opts__############################ # set a fancy prompt (non-color, unless we know we "want" color) case "$TERM" in xterm-color) color_prompt=yes;; esac # uncomment for a colored prompt, if the terminal has the capability; turned # off by default to not distract the user: the focus in a terminal window # should be on the output of commands, not on the prompt force_color_prompt=yes if [ -n "$force_color_prompt" ]; then if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then # We have color support; assume it's compliant with Ecma-48 # (ISO/IEC-6429). (Lack of such support is extremely rare, and such # a case would tend to support setf rather than setaf.) color_prompt=yes else color_prompt= fi fi if [ "$color_prompt" = yes ]; then # ANSI color codes RS="\[\033[0m\]" # reset HC="\[\033[1m\]" # hicolor UL="\[\033[4m\]" # underline INV="\[\033[7m\]" # inverse background and foreground FBLK="\[\033[30m\]" # foreground black FRED="\[\033[31m\]" # foreground red FGRN="\[\033[32m\]" # foreground green FYEL="\[\033[33m\]" # foreground yellow FBLE="\[\033[34m\]" # foreground blue FMAG="\[\033[35m\]" # foreground magenta FCYN="\[\033[36m\]" # foreground cyan FWHT="\[\033[37m\]" # foreground white FPUR='\[\033[35m\]' # Purple # bold FBLKb="\[\033[1;30m\]" # foreground black FREDb="\[\033[1;31m\]" # foreground red FGRNb="\[\033[1;32m\]" # foreground green FYELb="\[\033[1;33m\]" # foreground yellow FBLEb="\[\033[1;34m\]" # foreground blue FMAGb="\[\033[1;35m\]" # foreground magenta FCYNb="\[\033[1;36m\]" # foreground cyan FWHTb="\[\033[1;37m\]" # foreground white FPURb='\[\033[1;35m\]' # Purple BBLK="\[\033[40m\]" # background black BRED="\[\033[41m\]" # background red BGRN="\[\033[42m\]" # background green BYEL="\[\033[43m\]" # background yellow BBLE="\[\033[44m\]" # background blue BMAG="\[\033[45m\]" # background magenta BCYN="\[\033[46m\]" # background cyan BWHT="\[\033[47m\]" # background white #PS1="\n${FYELb}${UL}${debian_chroot:+($debian_chroot)}\u@\h:${RS}${FGRNb}\w ${FCYNb}\n\$${RS} " # PS1="\n${FYELb}${UL}grasshopper@:${RS}${FGRNb}\w ${FCYNb}\n\$${RS} " PS1="\n${FYELb}${UL}grasshopper@:${RS}${FGRNb}\w ${FCYNb}\$\n${RS}" #PS1="\\[\n${FYELb}${UL}grasshopper@:${RS}${FGRNb}\w ${FCYNb}\n\$${RS} " PS2="${FGRNb}> $RS" else #PS1='[${debian_chroot:+($debian_chroot)}\u:.../\W]\$ ' PS1='[${debian_chroot:+($debian_chroot)}\u:.../\W]\$ ' fi # If this is an xterm set the title to user@host:dir case "$TERM" in xterm*|rxvt*) PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" ;; *) ;; esac ########################___stop color opts__############################ ## enable color support of ls and also add handy aliases #if [ -x /usr/bin/dircolors ]; then # test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" # alias ls='ls --color=auto' # #alias dir='dir --color=auto' # #alias vdir='vdir --color=auto' # # alias grep='grep --color=auto' # alias fgrep='fgrep --color=auto' # alias egrep='egrep --color=auto' #fi ########################___start aliases__############################ # some more ls aliases alias ls='ls --color' #'ls -G' alias ld='ls --color -d' #'ls -dG' alias lt='ls --color -t' #'ls -dG' alias ll='ls --color -l' #'ls -lG' alias la='ls --color -a' #'ls -aG' alias lld='ls --color -ld' #'ls -dG' alias llt='ls --color -lt' #'ls -lG' alias ll='ls -alF' alias lstr='ls -tr --color' alias ltr='ls -ltr --color' alias la='ls -A' alias l='ls -CF' alias emcas='emacs' alias eogg='eog --fullscreen' ########################___stop aliases__############################ # Add an "alert" alias for long running commands. Use like so: # sleep 10; alert alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' # Alias definitions. # You may want to put all your additions into a separate file like # ~/.bash_aliases, instead of adding them here directly. # See /usr/share/doc/bash-doc/examples in the bash-doc package. if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi # enable programmable completion features (you don't need to enable # this, if it's already enabled in /etc/bash.bashrc and /etc/profile # sources /etc/bash.bashrc). if ! shopt -oq posix; then if [ -f /usr/share/bash-completion/bash_completion ]; then . /usr/share/bash-completion/bash_completion elif [ -f /etc/bash_completion ]; then . /etc/bash_completion fi fi #########################__start stuff__################################ export EDITOR=/usr/bin/emacs export OMP_NUM_THREADS=12 #########################__stop stuff__################################ ########################__start AFNI__################################## export DYLD_FALLBACK_LIBRARY_PATH=~/afni_src/linux_ubuntu_12_64 export PATH=$PATH:~/afni_src/linux_ubuntu_12_64:. LCORNsag="1200x500+600+0" #"1200x900+100+0" LCORNaxi="1200x500+950+500" #"1100x900+100+600" LCORNaxig="300x200+50+200" WINgeom="+0+500" MWINgeom="+50+650" MCORNaxi="620x750+1250+0" MCORNsag="820x680+400+0" alias afnii="afni -DAFNI_ENFORCE_ASPECT=YES -DAFNI_LEFT_IS_LEFT=YES \ -com 'OPEN_WINDOW A geom=+110+620' \ -com 'SET_FUNC_VISIBLE A.-' \ -com 'SET_FUNC_AUTORANGE A.+' \ -com 'OPEN_WINDOW A.axialimage geom=520x600+900+20 ifrac=0.8 opacity=9 keypress=a' \ -com 'OPEN_WINDOW A.sagittalimage geom=650x550+200+20 ifrac=0.8 opacity=9 keypress=a' \ -com 'OPEN_WINDOW A.coronalimage geom=450x450+1500+20 ifrac=0.8 opacity=9 keypress=a' \ -com 'OPEN_WINDOW A.axialgraph geom=350x250+1500+800 matrix=3'" alias afniminimont="afni -DAFNI_LEFT_IS_LEFT=YES \ -com 'OPEN_WINDOW A.axialimage mont=3x1:1' \ -com 'OPEN_WINDOW A.sagittalimage mont=3x1:1' \ -com 'SET_XHAIRS OFF' -DAFNI_ENFORCE_ASPECT=YES \ -com 'OPEN_WINDOW A.sagittalimage geom=$LCORNsag keypress=a' \ -com 'OPEN_WINDOW A.axialimage geom=$LCORNaxi keypress=a' \ -com 'OPEN_WINDOW geom=$WINgeom'" alias afniminimontx="afni -DAFNI_LEFT_IS_LEFT=YES \ -com 'OPEN_WINDOW A.axialimage mont=3x1:1' \ -com 'OPEN_WINDOW A.sagittalimage mont=3x1:1' \ -com 'SET_XHAIRS SINGLE' -DAFNI_ENFORCE_ASPECT=YES \ -com 'OPEN_WINDOW A.sagittalimage geom=$LCORNsag keypress=a' \ -com 'OPEN_WINDOW A.axialimage geom=$LCORNaxi keypress=a' \ -com 'OPEN_WINDOW geom=$WINgeom'" alias afniminimont3="afni -DAFNI_LEFT_IS_LEFT=YES \ -com 'OPEN_WINDOW A.axialimage mont=3x1:3' \ -com 'OPEN_WINDOW A.sagittalimage mont=3x1:3' \ -com 'SET_XHAIRS OFF' -DAFNI_ENFORCE_ASPECT=YES \ -com 'OPEN_WINDOW A.sagittalimage geom=$LCORNsag keypress=a' \ -com 'OPEN_WINDOW A.axialimage geom=$LCORNaxi keypress=a' \ -com 'OPEN_WINDOW geom=$WINgeom'" alias afniminimont3x="afni -DAFNI_LEFT_IS_LEFT=YES \ -com 'OPEN_WINDOW A.axialimage mont=3x1:3' \ -com 'OPEN_WINDOW A.sagittalimage mont=3x1:3' \ -com 'SET_XHAIRS MULTI' -DAFNI_ENFORCE_ASPECT=YES \ -com 'OPEN_WINDOW A.sagittalimage geom=$LCORNsag keypress=a' \ -com 'OPEN_WINDOW A.axialimage geom=$LCORNaxi keypress=a' \ -com 'OPEN_WINDOW geom=$WINgeom'" alias afnimont="afni -DAFNI_LEFT_IS_LEFT=YES \ -com 'OPEN_WINDOW geom=$MWINgeom' \ -com 'OPEN_WINDOW A.sagittalimage mont=4x4:1:0:none opacity=9' \ -com 'OPEN_WINDOW A.axialimage mont=4x4:1:0:none opacity=9' \ -com 'SET_XHAIRS OFF' -DAFNI_ENFORCE_ASPECT=YES \ -com 'OPEN_WINDOW A.sagittalimage geom=$MCORNsag keypress=a' \ -com 'OPEN_WINDOW A.axialimage geom=$MCORNaxi keypress=a' \ -com 'OPEN_WINDOW A.sagittalimage ifrac=0.8' \ -com 'OPEN_WINDOW A.axialimage ifrac=0.8'" alias afnimontx="afni -DAFNI_LEFT_IS_LEFT=YES -DAFNI_CROSSHAIR_GAP=2 \ -com 'OPEN_WINDOW geom=$MWINgeom' \ -com 'OPEN_WINDOW A.sagittalimage mont=4x4:1:0:none opacity=9' \ -com 'OPEN_WINDOW A.axialimage mont=4x4:1:0:none opacity=9' \ -com 'SET_XHAIRS SINGLE' -DAFNI_ENFORCE_ASPECT=YES \ -com 'OPEN_WINDOW A.sagittalimage geom=$MCORNsag keypress=a' \ -com 'OPEN_WINDOW A.axialimage geom=$MCORNaxi keypress=a' \ -com 'OPEN_WINDOW A.sagittalimage ifrac=0.8' \ -com 'OPEN_WINDOW A.axialimage ifrac=0.8'" ahdir=`apsearch -afni_help_dir` if [ -f "$ahdir/all_progs.COMP.bash" ] then . $ahdir/all_progs.COMP.bash fi ########################__stop AFNI__################################## ########################__start FreeSurfer AFNI__###################### export FREESURFER_HOME=/usr/local/freesurfer source $FREESURFER_HOME/SetUpFreeSurfer.sh export TORTOISE_HOME=/usr/local/tortoise export PATH=$PATH:$TORTOISE_HOME/DIFFPREPV31/bin/bin:. export PATH=$PATH:$TORTOISE_HOME/DRBUDDIV31/bin:. ########################__start FreeSurfer AFNI__###################### alias sshfelix="ssh -XY taylorpa3@felix" alias sshafniHQ="ssh afniHQ@safni"