Initial commit

This commit is contained in:
Ansel Santosa 2012-11-09 20:44:06 -08:00
commit 393460a933
8 changed files with 1331 additions and 0 deletions

53
.bashrc Normal file
View File

@ -0,0 +1,53 @@
#
# ~/.bashrc
#
# Reset
Color_Off='\e[0m' # Text Reset
# Regular Colors
Black='\e[0;30m' # Black
Red='\e[0;31m' # Red
Green='\e[0;32m' # Green
Yellow='\e[0;33m' # Yellow
Blue='\e[0;34m' # Blue
Purple='\e[0;35m' # Purple
Cyan='\e[0;36m' # Cyan
White='\e[0;37m' # White
# Background
On_Black='\e[40m' # Black
On_Red='\e[41m' # Red
On_Green='\e[42m' # Green
On_Yellow='\e[43m' # Yellow
On_Blue='\e[44m' # Blue
On_Purple='\e[45m' # Purple
On_Cyan='\e[46m' # Cyan
On_White='\e[47m' # White
alias :q='exit'
alias ls='ls -a --color=auto'
alias ll='ls -l'
alias up='cd ../'
alias clear='clear;ls;'
# Git
alias gs='git status '
alias ga='git add '
alias gb='git branch '
alias gc='git commit'
alias gd='git diff'
alias go='git checkout '
alias gh='git hist '
# TMUX
alias tmux='tmux -2'
alias patched='cp ~/.custom/tmux-powerline/config.sh.patched ~/.custom/tmux-powerline/config.sh'
alias unpatched='cp ~/.custom/tmux-powerline/config.sh.unpatched ~/.custom/tmux-powerline/config.sh'
# Update Forum
alias uf='sudo cp ~/forum/htdocs/const/* /usr/local/lib/python2.7/dist-packages/askbot/const/; sudo cp ~/forum/htdocs/models/* /usr/local/lib/python2.7/dist-packages/askbot/models/; sudo cp ~/forum/htdocs/views/* /usr/local/lib/python2.7/dist-packages/askbot/views/; echo "Forum source updated. Server restart my be necessary."'
# Prompt
PS1="\[$Black$On_White\]\W \$\[$Color_Off\] "
PS1="$PS1"'$([ -n "$TMUX" ] && tmux setenv TMUXPWD_$(tmux display -p "#I_#P") "$PWD")'

13
.gitconfig Normal file
View File

@ -0,0 +1,13 @@
[user]
name = Ansel Santosa
email = ansel@extrahop.com
[color]
ui = auto
[alias]
co = checkout
ci = commit
st = status
br = branch
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
type = cat-file -t
dump = cat-file -p

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
# Vim
*.swp
*~
.netrwhist

68
.tmux.conf Executable file
View File

@ -0,0 +1,68 @@
# Status bar options
set -g status on
set -g status-utf8 on
set -g status-justify "centre"
set -g status-interval 2
set -g status-left-length 60
set -g status-right-length 90
set -g status-left "#(~/.custom/tmux-powerline/status-left.sh)"
set -g status-right "#(~/.custom/tmux-powerline/status-right.sh)"
set-window-option -g clock-mode-style 12
# Allow mouse interaction
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on
set -g mode-mouse on
# Layout options
#setw -g aggressive-resize on
set-window-option -g mode-keys vi
# Don't try to concat commands
set -s escape-time 0
# Keybindings
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
# Integrate system pastebuffer
bind C-p run "tmux set-buffer \"$(xclip -o)\"; tmux paste-buffer"
bind C-y run "tmux show-buffer | xclip -i"
#### COLOUR (Solarized 256)
# default statusbar colors
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
set-option -g status-attr default
# default window title colors
set-window-option -g window-status-fg colour244 #base0
set-window-option -g window-status-bg default
#set-window-option -g window-status-attr dim
# active window title colors
set-window-option -g window-status-current-fg colour166 #orange
set-window-option -g window-status-current-bg default
#set-window-option -g window-status-current-attr bright
# pane border
set-option -g pane-border-fg colour235 #base02
set-option -g pane-active-border-fg colour240 #base01
# message text
set-option -g message-bg colour235 #base02
set-option -g message-fg colour166 #orange
# pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour166 #orange
# clock
set-window-option -g clock-mode-colour colour64 #green

1117
.vim/colors/solarized.vim Normal file

File diff suppressed because it is too large Load Diff

28
.vimrc Executable file
View File

@ -0,0 +1,28 @@
syntax enable
set background=dark
colorscheme solarized
filetype on
filetype plugin on
set number
set ts=4
set nowrap
set softtabstop=4
set expandtab
set shiftwidth=4
set autoindent
set smartindent
set pastetoggle=<F2>
" search
set ignorecase
set smartcase
set incsearch
" backup
set backup
set backupdir=$HOME/.vim/backups
set directory=$HOME/.vim/swaps
" tabs
map <C-o> :tabnext<CR>
map <C-i> :tabprevious<CR>
map t :tabnew

47
install.sh Executable file
View File

@ -0,0 +1,47 @@
#!/bin/bash
DIR="$( cd "$( dirname "$0" )" && pwd )"
echo "This will create symlinks and destroy any conflicting configs already in place.";
read -p "Continue? [y/N] " choice
case "$choice" in
Y|y|yes )
echo "Moving to Home directory...";
cd ~;
echo "Linking bash...";
if [ -f .bashrc ];
then
rm .bashrc;
fi
ln -s $DIR/.bashrc .bashrc;
echo "Linking vim...";
if [ -f .vimrc ];
then
rm .vimrc;
fi
ln -s $DIR/.vimrc .vimrc;
echo "Linking Git...";
if [ -f .gitconfig ];
then
rm .gitconfig;
fi
ln -s $DIR/.gitconfig .gitconfig;
echo "Linking tmux...";
if [ -f .tmux.conf ];
then
rm .tmux.conf;
fi
ln -s $DIR/.tmux.conf .tmux.conf;
echo "Hotswapping bash...";
source .bashrc;
echo "Done! Exiting."
;;
* ) echo "Aborted!";;
esac

1
tmux-powerline Submodule

@ -0,0 +1 @@
Subproject commit 0f2714455afa337d280a08ab964d0ec0ec543c21