Skip to content

Instantly share code, notes, and snippets.

@pop
Last active August 29, 2015 14:16
Show Gist options
  • Save pop/a9914963d9acd1aa464b to your computer and use it in GitHub Desktop.
Save pop/a9914963d9acd1aa464b to your computer and use it in GitHub Desktop.
dotfiles

Dotfiles

Elijah Caine

This is a collection of my configuration files (dotfiles). This gist is mostly meant as a backup however if you need a reference for any of my files go ahead and take a look!

Usage

Each file should include a comment at or near the top of the file with the file's intended location ($HOME/.config/file_name, /etc/foo/filename, etc). If there isn't a location and you need to know where the file should go take a look at the program's documentation or ping me about it.

The way I use this gist when restoring my system is: 1. Clone the gist 2. Symlink each file to the appropriate location 3. Rock and roll

#
# location: $HOME/.bash_profile
#
[[ -f ~/.bashrc ]] && . ~/.bashrc
export HISTFILESIZE=100000
export HISTSIZE=""
### START-Keychain ###
eval `/usr/bin/keychain --eval -Q -q --nogui $HOME/.ssh/*`
source $HOME/.keychain/$HOSTNAME-sh
### End-Keychain ##
xrdb -load ~/.Xdefaults
source $HOME/.bashrc
#
# location: $HOME/.bashrc
#
alias hobo='vagrant'
alias ls='ls --color'
alias rm='rm -i'
alias dd='echo ARE YOU SURE YOU WANT TO DO THAT?'
EDITOR='vim'
LD_LIBRARY_PATH=/usr/local/lib
### This block syncs up my bash history file in my tmux sessons.
# avoid duplicates..
export HISTCONTROL=ignoredups:erasedups
# append history entries..
shopt -s histappend
# After each command, save and reload history
export PROMPT_COMMAND="history -a; history -c; history -r; $@"
### Git prompt
PS1='\[\033[00m\]\[\e[1;32m\][\h] \[\e[1;33m\][\W]\[\e[m\]\[\e[1;30m\] ->\[\e[m\]'
source ~/.git-prompt.sh
PS1='\[\033[00m\]\[\e[1;32m\][\h] \[\e[1;33m\][\W]\[\e[m\]\[\e[1;30m\] ->\[\e[m\]\[\033[1;31m\]$(__git_ps1)\[\e[0;37m '
export HOSTALIASES=~/.hosts
export LANG=en_US.UTF-8
export PATH=$PATH:/
export PATH=$PATH:/home/eli/.gem/ruby/2.1.0/bin
# Go stuff
export GOPATH=$HOME/bin/go
export PATH=$PATH:~/bin/go/bin
export PATH=$PATH:~/git/hashi
alias \:q='echo DOES THIS LOOK LIKE VIM MOTHERFUCKER!!!'
alias \:wq='echo You really should use :x'
alias \:w='vimvimvimvimvimvimvim'
export ETC=/etc
# For all the things I don't want to make public
source /home/eli/.secretsrc
alias LS='clear;ls'
alias packer='packer-io'
#!/bin/sh
#
# locaion: $HOME/bin/battery_time_remaining.sh
#
BAT_TIME=$(acpi | awk '{print $5}')
echo $BAT_TIME
#!/bin/sh
#
# location: $HOME/bin/connected.sh
#
PINGED=$(ping -c 3 8.8.8.8 | awk '{print $4}')
#echo $PINGED
STATUS=$(echo $PINGED | awk '{print $4}')
EXPECTED=$(echo 8.8.8.8:)
#echo $STATUS
if [ $STATUS == $EXPECTED ]; then
echo 'U'
else
echo 'D'
fi
# location: $HOME/.i3/config
# Set $mod to windows key
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:DejaVu Sans Mono 8
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec urxvt
# kill focused window
bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
bindsym $mod+d exec dmenu_run
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+h split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# switch to workspace
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+Shift+2 move container to workspace 2
bindsym $mod+Shift+3 move container to workspace 3
bindsym $mod+Shift+4 move container to workspace 4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+Shift+6 move container to workspace 6
bindsym $mod+Shift+7 move container to workspace 7
bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+Shift+0 move container to workspace 10
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the window’s width.
# Pressing right will grow the window’s width.
# Pressing up will shrink the window’s height.
# Pressing down will grow the window’s height.
bindsym j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym semicolon resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
status_command i3status --config ~/.i3/i3status.conf
}
exec --no-startup-id feh --bg-scale ~/.i3/bkgrnd.jpg
bindsym $mod+q exec i3lock
# location: $HOME/.i3/i3status.conf
#i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
colors = true
interval = 5
}
order += "disk /"
order += "disk /home/"
order += "wireless wlp2s0"
order += "battery 0"
order += "tztime local"
wireless wlp2s0 {
format_up = "[ %essid ]"
format_down = "[ !!! ]"
}
battery 0 {
format = "[ %remaining ]"
}
tztime local {
format = "[ %Y-%m-%d - %H:%M:%S ]"
}
disk "/" {
format = "[ / %avail ]"
}
disk "/home/" {
format = "[ /H/ %avail ]"
}
#
# location: $HOME/.tmux.conf
#
set -g status-utf8 on
set -g status-right ' #[bg=grey,fg=white]%H:%M #[bg=black,fg=white] %Y/%m/%d #[bg=green,fg=black] #(~/bin/nano.sh) #(~/bin/battery_time_remaining.sh) #[bg=black,fg=white] #(~/bin/connected.sh) '
run-shell ~/bin/tmux-resurrect/resurrect.tmux
setw -g aggressive-resize on
set -g @resurrect-strategy-vim 'session'
# Set lock screen command to X
bind-key ^q lock-server
set-option -g lock-command "vlock"
set-option -g history-limit 10000
"
" location: $HOME/.vimrc
"
"Latex Plugin
filetype plugin indent on
set grepprg=grep\ -nH\ $*
let g:tex_flavor = "latex"
set runtimepath=~/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,~/.vim/after
"Personal
syntax on
colorscheme default
set nu
set cc=80
set tw=78
hi ColorColumn ctermbg=6
set cursorline
set tabstop=4
set shiftwidth=4
set expandtab
set paste
set rtp+=$GOPATH/src/github.com/golang/lint/misc/vim
" autocmd BufWritePost,FileWritePost *.go execute 'Lint' | cwindow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment