From 92ed07abfb4473a9f92547c9ddc8d3e96ea9ed51 Mon Sep 17 00:00:00 2001 From: "Jason S. Jones" Date: Sat, 2 Aug 2014 16:26:22 -0700 Subject: [PATCH] Initial commit of dotfiles. --- bash_aliases | 72 ++++++++++++++++++++++++ bashrc | 155 +++++++++++++++++++++++++++++++++++++++++++++++++++ gitconfig | 12 ++++ tmux.conf | 3 + vimrc | 30 ++++++++++ 5 files changed, 272 insertions(+) create mode 100644 bash_aliases create mode 100644 bashrc create mode 100644 gitconfig create mode 100644 tmux.conf create mode 100644 vimrc diff --git a/bash_aliases b/bash_aliases new file mode 100644 index 0000000..282144a --- /dev/null +++ b/bash_aliases @@ -0,0 +1,72 @@ +# vim: ft=sh +# +# some more ls aliases +alias ll='ls -Xlh --group-directories-first' +alias la='ls -XA --group-directories-first' +alias l='ls -XCF --group-directories-first' + +#alias sysupdate='sudo apt-get update && sudo apt-get dist-upgrade -u' + +#alias starttitan="VBoxHeadless --startvm debian_lenny &" +#alias killtitan="VBoxManage controlvm debian_lenny poweroff" + +alias gvim="gvim --remote-silent" + +alias sa="screen -raAd" +alias ta="tmux attach -d" +alias tmux="TERM=screen-256color tmux" + +#alias mountorion="sshfs orion: ~/orion/" +#alias unmountorion="fusermount -u ~/orion/" + +alias ccb="ledger -c bal checking liabilities:mastercard bank:savings \ +assets:cash liabilities:govt" + +alias cfb="ledger bal checking liabilities:mastercard bank:savings \ +assets:cash liabilities:govt" + +alias cab="ledger bal checking liabilities:mastercard bank:savings \ +assets:cash liabilities:govt assets:portfolio:cash" + +alias getpodcasts="gpo update && gpo download" +alias getcleared="ledger --cleared bal liabilities:mastercard checking" +alias networth="ledger -V --price-db ~/finances/prices.db bal \ + assets:portfolio liabilities:mastercard bank:savings assets:cash \ + bank:checking" + +alias edch="vim ~/finances/2014_checking.ldg" +alias edmc="vim ~/finances/2014_mastercard.ldg" +alias edin="vim ~/finances/2014_investments.ldg" + +alias gedch="gvim ~/finances/2014_checking.ldg" +alias gedmc="gvim ~/finances/2014_mastercard.ldg" +alias gedin="gvim ~/finances/2014_investments.ldg" + +alias ..="cd .." +alias c='clear' +alias df='df -h' +alias mkdir='mkdir -pv' +alias mount='mount |column -t' +alias h='history' +alias edit='vim' +alias st2='sublime-text-2' +alias restart='sudo shutdown -r now' + +alias irssi="TERM=screen-256color irssi" + + +alias ping='ping -c 5' +alias apt-get='sudo apt-get' +alias ac="apt-cache" + +alias psx="ps auxw | grep $1" + +alias startdelta="VBoxHeadless --startvm freebsd &" +alias killdelta="VBoxManage controlvm freebsd acpipowerbutton" +alias delta="ssh jsjones@delta" + +alias awsconnect="ssh -i ~/.ec2/ec2.pem ubuntu@ec2-54-244-136-14.us-west-2.compute.amazonaws.com" + +alias cinnamon-restart='cinnamon --replace -d :0.0 >/dev/null 2>&1 &' +alias android_dev="sh ~/android-studio/bin/studio.sh &" +alias java-dev="sh ~/bin/intellijIDEA/bin/idea.sh &" diff --git a/bashrc b/bashrc new file mode 100644 index 0000000..725b659 --- /dev/null +++ b/bashrc @@ -0,0 +1,155 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +# stuff from kyle wheeler's bashrc file. +JSJDEBUG=${JSJDEBUG:-no} + +function dprint { +if [[ $JSJDEBUG == yes && $- == *i* ]]; then + date "+%H:%M:%S $*" + echo $SECONDS $* +fi +} + +#dprint alive + +if [ -r "${HOME}/.bashrc.local.preload" ]; then + dprint "Loading bashrc preload" + source "${HOME}/.bashrc.local.preload" +fi + +# ANSI color codes +RS="\[\033[0m\]" # reset +HC="\[\033[1m\]" # bold +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 + +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 + + +# If not running interactively, don't do anything +[ -z "$PS1" ] && return + +# don't put duplicate lines in the history. See bash(1) for more options +export HISTCONTROL=ignoredups + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# make less more friendly for non-text input files, see lesspipe(1) +[ -x /usr/bin/lesspipe ] && eval "$(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 + +# set a fancy prompt (non-color, unless we know we "want" color) +#case "$TERM" in +#xterm-color) +# PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' +# ;; +#*) +# PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' + #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' +# ;; +#esac + +export GIT_PS1_SHOWDIRTYSTATE=1 + +# Comment in the above and uncomment this below for a color prompt +#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' + +PS1="$HC$FGRN\u$RS$FWHT on $HC$FYEL\h$RS$FWHT at $HC$FCYN\w$FMAG\$(__git_ps1)$FBLE\n\\$ $RS" +#PS1='\u@\h \w$(__git_ps1)\$' +PS2="$HC$FBLE> $RS" + + +# If this is an xterm set the title to user@host:dir +case "$TERM" in +xterm*|rxvt*) + PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"' + ;; +*) + ;; +esac + +# 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 color support of ls and also add handy aliases +if [ "$TERM" != "dumb" ]; then + eval "`dircolors -b`" + alias ls='ls -X --color=auto' + alias dir='ls --color=auto --format=vertical' + alias grep='grep --color=auto' + #alias vdir='ls --color=auto --format=long' +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 [ -f /etc/bash_completion ]; then + . /etc/bash_completion +fi + +# added by jsjones +if [ -f ~/.bash_task_completion ]; then + source ~/.bash_task_completion +fi + +if [ -f ~/.git-completion ]; then + source ~/.git-completion +fi + +set -o vi +shopt -s cdspell + +echo -e "Welcome to the terminal...$USER" +echo 'This is where the fun starts!...(read from ~/.bashrc)' +echo 'Type: "sysupdate" to run apt-get update && dist-upgrade -u' +echo $(date) + +source /home/jsjones/bin/functions + + +export PATH=$PATH:/home/jsjones/bin:/home/jsjones/bin/SynologyAssistant/:/home/jsjones/bin/android-sdk-linux/tools:/usr/local/bin:/home/jsjones/google_appengine +export MANPATH=$MANPATH:.:/home/jsjones/src/man: +export TERM="xterm-256color" +export EDITOR="vim" +export PRINTER="PSC-2350-series" +export DEBFULLNAME="Jason Jones" +export DEBEMAIL="jsjones96@gmail.com" +export GIT_EDITOR="vim" +export LEDGER="~/finances/master_ledger.ldg" +export LEDGER_PRICE_DB="~/finances/prices.db" + + +export CLASSPATH=$CLASSPATH:~/src/algs4/stdlib.jar:~/src/algs4/algs4.jar +test -r ~/src/algs4/bin/config.sh && source ~/src/algs4/bin/config.sh + diff --git a/gitconfig b/gitconfig new file mode 100644 index 0000000..70e0cbe --- /dev/null +++ b/gitconfig @@ -0,0 +1,12 @@ +[user] + name = Jason S. Jones + email = jsjones96@gmail.com +[apply] + whitespace = nowarn +[color] + ui = auto +[help] + autocorrect = 1 +[core] + autocrlf = input + editor = vim diff --git a/tmux.conf b/tmux.conf new file mode 100644 index 0000000..9d95eca --- /dev/null +++ b/tmux.conf @@ -0,0 +1,3 @@ +set-option -g prefix C-a + +set -g default-terminal screen-256color diff --git a/vimrc b/vimrc new file mode 100644 index 0000000..1477ef3 --- /dev/null +++ b/vimrc @@ -0,0 +1,30 @@ +" ========================================================= +" Author: Jason Jones +" +" This .vimrc file is tailored for my personal use, as it should be. +" It is the top level file that sources all other configuations +" and settings. +" ========================================================= + + +" All of the plugins are installed with Vundle from this file. +source ~/.vim/vundle.vim + +" Automatically detect file types -- (must be turned on after Vundle) +filetype plugin indent on + +" All of the vim configuation. +source ~/.vim/config.vim + + +" Plugin specific configuation +source ~/.vim/plugins.vim + + +" Key Mappings +source ~/.vim/mappings.vim + + +" Load all the auto commands +source ~/.vim/autocmds.vim +