Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sterling Jensen committed Jan 30, 2015
0 parents commit 626aad8
Show file tree
Hide file tree
Showing 12 changed files with 918 additions and 0 deletions.
170 changes: 170 additions & 0 deletions .Xdefaults
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
! vim: set fdm=marker :
! Solarized Colors {{{
!!SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B RGB HSB
!!--------- ------- ---- ------- ----------- ---------- ----------- -----------
!!base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21
!!base02 #073642 0/4 black 235 #262626 20 -12 -12 7 54 66 192 90 26
!!base01 #586e75 10/7 brgreen 240 #585858 45 -07 -07 88 110 117 194 25 46
!!base00 #657b83 11/7 bryellow 241 #626262 50 -07 -07 101 123 131 195 23 51
!!base0 #839496 12/6 brblue 244 #808080 60 -06 -03 131 148 150 186 13 59
!!base1 #93a1a1 14/4 brcyan 245 #8a8a8a 65 -05 -02 147 161 161 180 9 63
!!base2 #eee8d5 7/7 white 254 #e4e4e4 92 -00 10 238 232 213 44 11 93
!!base3 #fdf6e3 15/7 brwhite 230 #ffffd7 97 00 10 253 246 227 44 10 99
!!yellow #b58900 3/3 yellow 136 #af8700 60 10 65 181 137 0 45 100 71
!!orange #cb4b16 9/3 brred 166 #d75f00 50 50 55 203 75 22 18 89 80
!!red #dc322f 1/1 red 160 #d70000 50 65 45 220 50 47 1 79 86
!!magenta #d33682 5/5 magenta 125 #af005f 50 65 -05 211 54 130 331 74 83
!!violet #6c71c4 13/5 brmagenta 61 #5f5faf 50 15 -45 108 113 196 237 45 77
!!blue #268bd2 4/4 blue 33 #0087ff 55 -10 -45 38 139 210 205 82 82
!!cyan #2aa198 6/6 cyan 37 #00afaf 60 -35 -05 42 161 152 175 74 63
!!green #859900 2/2 green 64 #5f8700 60 -20 65 133 153 0 68 100 60

!! Common
#define S_yellow #b58900
#define S_orange #cb4b16
#define S_red #dc322f
#define S_magenta #d33682
#define S_violet #6c71c4
#define S_blue #268bd2
#define S_cyan #2aa198
#define S_green #859900

!! Dark
#define S_base03 #002b36
#define S_base02 #073642
#define S_base01 #586e75
#define S_base00 #657b83
#define S_base0 #839496
#define S_base1 #93a1a1
#define S_base2 #eee8d5
#define S_base3 #fdf6e3

!! Light
!#define S_base03 #fdf6e3
!#define S_base02 #eee8d5
!#define S_base01 #93a1a1
!#define S_base00 #839496
!#define S_base0 #657b83
!#define S_base1 #586e75
!#define S_base2 #073642
!#define S_base3 #002b36

*background: S_base03
*foreground: S_base0
*fading: 0
*fadeColor: S_base03
*cursorColor: S_base1
*pointerColorBackground:S_base01
*pointerColorForeground:S_base1

!! black dark/light
*color0: S_base02
*color8: S_base03
!! red dark/light
*color1: S_red
*color9: S_orange
!! green dark/light
*color2: S_green
*color10: S_base01
!! yellow dark/light
*color3: S_yellow
*color11: S_base00
!! blue dark/light
*color4: S_blue
*color12: S_base0
!! magenta dark/light
*color5: S_magenta
*color13: S_violet
!! cyan dark/light
*color6: S_cyan
*color14: S_base1
!! white dark/light
*color7: S_base2
*color15: S_base3

*color237: #3a3a3a
!}}}
!-------------------------------------------------------------------------------
! Xft settings {{{
!-------------------------------------------------------------------------------

Xft.dpi: 96
Xft.antialias: true
! Subpixel rendering
Xft.rgba: rgb
! Hinting adjusts the font so that it lines up with the pixel grid.
Xft.hinting: true
! Disable autohinting for fonts without hinting instructions.
Xft.autohinting: false
! Hintstyle is the amount of font reshaping done to lineup up the font to the
! grid. Too little is blurry, too much is distorted:
! [hintnone,hintslight,hintmedium,hintfull]
Xft.hintstyle: hintmedium
! Use with subpixel rendering
Xft.lcdfilter: lcddefault
!! Disable bitmap fonts
Xft.embeddedbitmap: false

!Xft.dpi: 96
!Xft.antialias: false
!Xft.rgba: rgb
!Xft.hinting: true
!Xft.hintstyle: hintslight

!}}}
!-------------------------------------------------------------------------------
! URxvt settings {{{
! Colours lifted from Solarized (http://ethanschoonover.com/solarized)
! More info at:
! http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/doc/rxvt.1.pod
!-------------------------------------------------------------------------------

URxvt.depth: 32
URxvt.intensityStyles: false
!URxvt.geometry: 80x30
URxvt.transparent: false
URxvt.fading: 0
!URxvt.urgentOnBell: true
!URxvt.visualBell: true
URxvt.loginShell: true
URxvt.saveLines: 4096
URxvt.internalBorder: 0
URxvt.lineSpace: 0
URxvt.clipboard.autocopy: true

!---Windows

!---Fonts
! Prevent urxvt from substituting font chars with its own
URxvt.skipBuiltinGlyphs: true
URxvt.allow_bold: false
URxvt.font: xft:Monospace:pixelsize=12, \
-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1

URxvt.boldFont: xft:Monospace:pixelsize=12
URxvt.italicFont: xft:Monospace:pixelsize=12
URxvt.bolditalicFont: xft:Monospace:pixelsize=12
!URxvt.font: -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1

! Fix font space
URxvt*letterSpace: -1

! Scrollbar
URxvt.scrollStyle: rxvt
URxvt.scrollBar: false

! Perl extensions
!URxvt.perl-ext-common: default,matcher
!URxvt.matcher.button: 1
!URxvt.urlLauncher: firefox

! Cursor
URxvt.cursorBlink: true
URxvt.cursorColor: #657b83
URxvt.cursorUnderline: false

! Pointer
URxvt.pointerBlank: true

!}}}

198 changes: 198 additions & 0 deletions .bash_profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
# .bashrc
# vim: fdm=marker
# Update PATH {{{
function chkpath () {
case ":$PATH:" in
*":$1:"*) :;; # already in PATH
*) PATH="$1:$PATH";;
esac
}
chkpath "$HOME/bin"
chkpath "$HOME/scripts"
# }}}
# Set other environment variables {{{
export LANG=en_US.UTF-8
export PAGER=less
export EDITOR=vim
export VISUAL=vim
#export INPUTRC=~/.inputrc
export MANPAGER=less
export TMPDIR=/tmp
export TMP=/tmp
## }}}
# Aliases {{{
# motd {{{
alias motd=motd_func
# }}}
# ls/ll/lld {{{
#if ! alias ls >/dev/null; then unalias ls; fi # Clear existing alias
case "$OSTYPE" in
linux*)
# h: human-readable, l: long, A: show hidden
alias ls="ls -h --color=auto"
LSTIMESTYLE='--time-style="+%Y-%m-%d %H:%M:%S"'
alias ll="LANG=C ls -lA $LSTIMESTYLE --group-directories-first"
alias lld="ll -d */"
;;
freebsd*)
alias ll="ls -h -G -lA" # long listing format, show hidden
# TODO: Add directory sorting and ISO time for ls in freebsd
;;
esac
# }}}
# :q {{{
alias :q=' exit'
# }}}
# df {{{
alias df='df -h'
# }}}
# nl {{{
alias nl='nl -ba' # Number all lines
# }}}
# tree {{{
alias tree='tree -C' # Show color
# }}}
# }}}
# Set dircolors {{{
if command -v dircolors >/dev/null; then # Check if command exists
if [ ! -f ~/.dircolors ]; then # Check if dot file exists
dircolors -p > ~/.dircolors # Generate dot file
fi
eval $(dircolors -b ~/.dircolors) # Load into $LS_COLORS
fi
# }}}
# Bash and tty settings {{{
if [ -t 0 -a -t 1 ]; then # Test if interactive terminal. 0:stdin,1:stdout
# PS1=$'\\[\e[31m\\][\u \w]\$\\[\e[0m\\] '
PS1=$'[\u \W]\$ '
stty -ixon # Disable XON/XOFF flow controll
stty -ixoff # Disable start/stop characters
if [ ${BASH_VERSINFO[0]} -ge 4 ]; then
shopt -s cdspell # Set autocorrect for cd command
shopt -s checkwinsize # Set auto $LINES & $COLUMNS updating
shopt -s cmdhist # Set multiline to single line saving
shopt -s dirspell # Set autocorrect in path (tab completion)
shopt -s extglob # Set extended pattern matching
shopt -s histappend # Set append to history instead of overwrite
shopt -s no_empty_cmd_completion
shopt -u promptvars # Unset prompt var expansion
#set -o noclobber # Prevent accidental clobber with '>'
#stty -echoctl # Disable echo for control characters ('^c')
fi
fi
# }}}
# Less settings {{{
export GROFF_NO_SGR=1
export LESS="FiMQRSX" # Options passed to less
# F: auto exit single page i: ignore case in search
# M: verbose prompt R: raw ansi color escapes Q: quite
# S: don't wrap X: disable termcap de/init
export LESSHISTFILE="-" # Disable history
#export LESS_TERMCAP_mb=$'\E[01;31m'
#export LESS_TERMCAP_md=$'\E[01;31m'
#export LESS_TERMCAP_me=$'\E[0m'
#export LESS_TERMCAP_so=$'\E[01;44;33m'
#export LESS_TERMCAP_se=$'\E[0m'
#export LESS_TERMCAP_us=$'\E[01;32m'
#export LESS_TERMCAP_ue=$'\E[0m'
# }}}
# Bash history settings {{{
export HISTFILESIZE=16384 # Lines stored on disk
export HISTSIZE=16384 # Lines stored in memory
#export HISTIGNORE="&:[bf]g:exit:ls" # &: Duplicate, bg,fg: job control
export HISTCONTROL=ignoreboth # Ignore spaced and duplicates
export HISTTIMEFORMAT='%Y-%m-%d %H:%M:%S ' # Add timestamp to history file
# }}}
## Git settings {{{
source /usr/local/share/git-core/contrib/completion/git-completion.bash
source /usr/local/share/git-core/contrib/completion/git-prompt.sh
GIT_PS1_SHOWCOLORHINTS=1
PROMPT_COMMAND='__git_ps1 "[\u \w]" "\\\$ "'
## }}}
# Useful programs {{{
# ncdu: NCurses Disk Usage
# vifm: NCurses file manager
# }}}
# Useful files {{{
# ~/.Xdefaults
# ~/.i3/config
# ~/.bashrc
# ~/.vimrc
# }}}

#script -c "echo -e '\e[0;31mASDF\e[0m'" -q /dev/null
#script -c 'grep EXEC download' -q /dev/null
#script -c 'cal' -q /dev/null
#paste -d' ' <(grep "EXEC" download) <(echo -e '\e[0;31m' 'asdf' '\e[0m')
#tst1=$(script -c 'cal' -q /dev/null); echo "$tst1"
#tst2=$(script -c 'grep EXEC download' -q /dev/null); echo "$tst2"

#read -d'' tst1 script -c "cal" -q /dev/null
function fillCanvas () {
local linesToFill=$(($LINES - 1)) # Make room for prompt
local columnsToFill=$(($COLUMNS - 0))
local fillChar=-1
local filledLine=$(for ((i=0 ; i < $columnsToFill ; i++)); do
if((++fillChar > 9)); then fillChar=0; fi
printf "%s" $fillChar;
done)
for ((i=0 ; i < $linesToFill ; i++)); do
blankCanvas[i]=$(printf "%-s\n" $filledLine);
done
}
declare -a blankCanvas; fillCanvas # Setup canvas
function drawAt () {
local x=$1
local y=$2
#local blockToDraw="$3"
#echo "$blockToDraw"
local newItem=
mapfile -t newItem < <(script -c 'cal' -q)
local newItemXlen=${#newItem[@]}
echo $newItemXlen
printf "%s\n" "${newItem[@]}"
local canvasXlen=${#blankCanvas[@]}
for ((canvasX=0 ; canvasX < $canvasXlen ; canvasX++)); do
local canvasYlen=${#blankCanvas[canvasX]}
if((canvasX >= x && canvasX <= (x + newItemXlen))); then
local newItemYlen=${#newItem[0]}
echo "newItemYlen: $newItemYlen"
local linePre="${blankCanvas[canvasX]:0:$y}"
local lineMid="${newItem[0]}"
local linePost="${blankCanvas[canvasX]:10:20}"
local toPrint=$linePre
toPrint+=$lineMid
toPrint+="$linePost"
echo "linePre: $linePre"
echo "lineMid: $lineMid"
echo "linePost: $linePost"
echo "toPrint: $toPrint"
#blankCanvas[canvasX]=echo "$linePre" "X" "$linePost";
fi
done
}
function motd_func () {
drawAt 1 1
printf "%s\n" "${blankCanvas[@]}"
}
#motd
#asdf="012345"; asdf=${asdf/${asdf:3:2}/xx}; echo $asdf
# Autorun {{{
#motd
#clear
#echo "$(blankCanvas)"
#asdf="$(blankCanvas)"
#tst1=$(script -c 'cal' -q /dev/null) #; echo "$tst1" #ALL GLOBBED TOGETHER
#drawAt 1 2 "$tst1"
# }}}











27 changes: 27 additions & 0 deletions .gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[user]
name = Sterling Jensen
email = [email protected]
[core]
editor = vim
[color]
diff = auto
status = auto
branch = auto
interactive = auto
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[gc]
auto=1
[merge]
summary=true
tool = vimdiff
[diff]
tool = vimdiff
Loading

0 comments on commit 626aad8

Please sign in to comment.