Committing the first of my dotfiles

This commit is contained in:
Ubuntu 2017-05-29 19:24:39 +00:00
commit 941a12e166
5 changed files with 354 additions and 0 deletions

13
bash_profile Normal file
View File

@ -0,0 +1,13 @@
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
export PS1="\e[0;37;42m\u@\h:\e[m\$PWD> "

26
bashrc Normal file
View File

@ -0,0 +1,26 @@
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
#export PS1="\u@\h\w$ "
alias ll='ls -la'
## pass options to free ##
alias meminfo='free -m -l -t'
## get top processes eating memory ##
alias psmem='ps auxf | sort -nr -k 4'
alias psmem10='ps auxf | sort -nr -k 4 | head -10'
## get top processes eating CPU ##
alias pscpu='ps auxf | sort -nr -k 3'
alias pscup10='ps auxf | sort -nr -k 3 | head -10'
## get server CPU info ##
alias cpuinfo='lscpu'

213
dir_colors Normal file
View File

@ -0,0 +1,213 @@
# Configuration file for the color ls utility
# Synchronized with coreutils 8.5 dircolors
# This file goes in the /etc directory, and must be world readable.
# You can copy this file to .dir_colors in your $HOME directory to override
# the system defaults.
# COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not
# pipes. 'all' adds color characters to all output. 'none' shuts colorization
# off.
COLOR tty
# Extra command line options for ls go here.
# Basically these ones are:
# -F = show '/' for dirs, '*' for executables, etc.
# -T 0 = don't trust tab spacing when formatting ls output.
OPTIONS -F -T 0
# Below, there should be one TERM entry for each termtype that is colorizable
TERM Eterm
TERM ansi
TERM color-xterm
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM cons25
TERM console
TERM cygwin
TERM dtterm
TERM eterm-color
TERM gnome
TERM gnome-256color
TERM jfbterm
TERM konsole
TERM kterm
TERM linux
TERM linux-c
TERM mach-color
TERM mlterm
TERM putty
TERM rxvt
TERM rxvt-256color
TERM rxvt-cygwin
TERM rxvt-cygwin-native
TERM rxvt-unicode
TERM rxvt-unicode256
TERM screen
TERM screen-256color
TERM screen-256color-bce
TERM screen-bce
TERM screen-w
TERM screen.linux
TERM vt100
TERM xterm
TERM xterm-16color
TERM xterm-256color
TERM xterm-88color
TERM xterm-color
TERM xterm-debian
# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)
EIGHTBIT 1
# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
#NORMAL 00 # no color code at all
#FILE 00 # normal file, use no color at all
RESET 0 # reset to "normal" color
DIR 01;34 # directory
LINK 01;36 # symbolic link (If you set this to 'target' instead of a
# numerical value, the color is as for the file pointed to.)
MULTIHARDLINK 00 # regular file with more than one link
FIFO 40;33 # pipe
SOCK 01;35 # socket
DOOR 01;35 # door
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file
MISSING 01;05;37;41 # ... and the files they point to
SETUID 37;41 # file that is setuid (u+s)
SETGID 30;43 # file that is setgid (g+s)
CAPABILITY 30;41 # file with capability
STICKY_OTHER_WRITABLE 37;42 # dir that is sticky and other-writable (+t,o+w)
OTHER_WRITABLE 37;42 # dir that is other-writable (o+w) and not sticky
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
# This is for files with execute permission:
EXEC 01;32
# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
# (and any comments you want to add after a '#')
# executables (bright green)
#.cmd 01;32
#.exe 01;32
#.com 01;32
#.btm 01;32
#.bat 01;32
#.sh 01;32
#.csh 01;32
# archives or compressed (bright red)
.tar 01;31
.tgz 01;31
.arj 01;31
.taz 01;31
.lzh 01;31
.lzma 01;31
.tlz 01;31
.txz 01;31
.zip 01;31
.z 01;31
.Z 01;31
.dz 01;31
.gz 01;31
.lz 01;31
.xz 01;31
.bz2 01;31
.tbz 01;31
.tbz2 01;31
.bz 01;31
.tz 01;31
.deb 01;31
.rpm 01;31
.jar 01;31
.rar 01;31
.ace 01;31
.zoo 01;31
.cpio 01;31
.7z 01;31
.rz 01;31
# image formats (magenta)
.jpg 01;35
.jpeg 01;35
.gif 01;35
.bmp 01;35
.pbm 01;35
.pgm 01;35
.ppm 01;35
.tga 01;35
.xbm 01;35
.xpm 01;35
.tif 01;35
.tiff 01;35
.png 01;35
.svg 01;35
.svgz 01;35
.mng 01;35
.pcx 01;35
.mov 01;35
.mpg 01;35
.mpeg 01;35
.m2v 01;35
.mkv 01;35
.ogm 01;35
.mp4 01;35
.m4v 01;35
.mp4v 01;35
.vob 01;35
.qt 01;35
.nuv 01;35
.wmv 01;35
.asf 01;35
.rm 01;35
.rmvb 01;35
.flc 01;35
.avi 01;35
.fli 01;35
.flv 01;35
.gl 01;35
.dl 01;35
.xcf 01;35
.xwd 01;35
.yuv 01;35
.cgm 01;35
.emf 01;35
# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
.axv 01;35
.anx 01;35
.ogv 01;35
.ogx 01;35
# audio formats (cyan)
.aac 01;36
.au 01;36
.flac 01;36
.mid 01;36
.midi 01;36
.mka 01;36
.mp3 01;36
.mpc 01;36
.ogg 01;36
.ra 01;36
.wav 01;36
# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
.axa 01;36
.oga 01;36
.spx 01;36
.xspf 01;36

72
profile_setup.sh Normal file
View File

@ -0,0 +1,72 @@
#!/bin/bash
###############################################################################
#
# Name: profile_setup.sh
# Author: Nathan A. Smith
# Purpose: Initial profile setup -- Installing VIM personalization and
# creating symlinks for dotfiles
#
###############################################################################
### Variables
dir=~/dotfiles
olddir=~/dotfiles_old
files="bashrc vimrc bash_profile dir_colors"
RC=0
### Mainline
# create dotfiles_old in home directory
echo "Creating $olddir for backup of any existing dotfiles in ~"
mkdir -p $olddir
echo "...done"
# change to the dotfiles directory
echo "Changing to the $dir directory"
cd $dir
echo "...done"
# move any existing dotfile in home directory to dotfiles_old directory, then create symbolic links
for file in $files; do
echo "Moving any existing dotfiles from ~ to $olddir"
mv ~/.$file ~/dotfiles_old/
echo "Creating symlink to $file in home directory."
ln -s $dir/$file ~/.$file
done
# make vim autoload and bundle directories, install pathogen and clone Vim Sensible and Solarized Vim colors
echo "Making Vim autoload and bundle directories"
mkdir ~/.vim/autoload ~/.vim/bundle
echo "...done"
echo "Installing Pathogen and other Vim plugins..."
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
if [ $? -ne 0 ]; then
RC=$?
fi
cd ~/.vim/bundle
git clone https://github.com/tpope/vim-sensible.git
if [ $? -ne 0 ]; then
RC=$?
fi
git clone git://github.com/altercation/vim-colors-solarized.git
if [ $? -ne 0 ]; then
RC=$?
fi
git clone --depth=1 https://github.com/vim-syntastic/syntastic.git
if [ $? -ne 0 ]; then
RC=$?
fi
if [ $RC -ne 0 ]; then
echo "There were problems with the installation. Please check output for errors."
else
echo "...done"
fi

30
vimrc Normal file
View File

@ -0,0 +1,30 @@
" Pathogen
execute pathogen#infect()
call pathogen#helptags() " generate helptags for everything in 'runtimepath'
set nocompatible " get rid of Vi compatibility mode. SET FIRST!
filetype plugin indent on " filetype detection[ON] plugin[ON] indent[ON]
syntax enable " enable syntax highlighting (previously syntax on).
set background=light " Set to Solarized Light
colorscheme solarized " Enable Solarized color scheme
set number " Show line numbers
set laststatus=2 " Last window always has a statusline
filetype indent on " Activates indenting for files
set nohlsearch " Dont' conintue to hilite searched phrases
set incsearch " Do hilite search as you type your search.
set ignorecase " Make sure searches are case-insensitive.
set ruler " Always show info along bottom
set autoindent " Auto-indent
set tabstop=4 " tab spacing
set softtabstop=4 " unify
set shiftwidth=4 " indent/outdent by 4 columns
set shiftround " alwys indent/outdent to the nearest tabstop
set expandtab " use spaces instead of tabs
set smarttab " use tabs at the start of a line, spaces elsewhere
set nowrap " don't wrap text
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0