From fc6814be8f52c34705d000045a4527a67551f1de Mon Sep 17 00:00:00 2001 From: James Bunton Date: Tue, 17 Jun 2014 19:37:45 +1000 Subject: [PATCH] Convert tabs to spaces --- .bash/functions | 60 ++++---- .bash/interactive | 90 +++++------ .bash_profile | 4 +- .bashrc | 2 +- .config/fontconfig/fonts.conf | 60 ++++---- .gitconfig | 48 +++--- .pythonrc.py | 14 +- .ssh/config | 8 +- .vim/abbrs/YDATE | 2 +- .vim/abbrs/cmain.c | 4 +- .vim/abbrs/cmaina.c | 4 +- .vim/abbrs/cppmain.cpp | 4 +- .vim/abbrs/cppmaina.cpp | 4 +- .vim/abbrs/jmain.java | 6 +- .vim/abbrs/latexreport.tex | 4 +- .vim/abbrs/pymain.py | 4 +- .vim/abbrs/pymaina.py | 14 +- .vim/abbrs/xhtmltemplate.xhtml | 6 +- .vim/abbrs2vim.py | 40 ++--- .vim/commenter.vim | 154 +++++++++---------- .vim/macros.vim | 140 ++++++++--------- .vim/state.vim | 8 +- .vimrc | 4 +- .xmonad/xmobar.hs | 28 ++-- .xmonad/xmonad.hs | 272 ++++++++++++++++----------------- README | 14 +- bin/bin2ascii | 4 +- bin/csv2txt | 6 +- bin/dates | 6 +- bin/java-decompile-recursive | 8 +- 30 files changed, 511 insertions(+), 511 deletions(-) diff --git a/.bash/functions b/.bash/functions index 44e11ea..7420d28 100644 --- a/.bash/functions +++ b/.bash/functions @@ -9,58 +9,58 @@ # Eg, to remove ~/bin from $PATH # pathremove ~/bin PATH function pathremove { - local IFS=':' - local NEWPATH - local DIR - local PATHVARIABLE=${2:-PATH} - for DIR in ${!PATHVARIABLE} ; do - if [ "${DIR}" != "${1}" ] ; then - NEWPATH="${NEWPATH:+${NEWPATH}:}${DIR}" - fi - done - export ${PATHVARIABLE}="${NEWPATH}" + local IFS=':' + local NEWPATH + local DIR + local PATHVARIABLE=${2:-PATH} + for DIR in ${!PATHVARIABLE} ; do + if [ "${DIR}" != "${1}" ] ; then + NEWPATH="${NEWPATH:+${NEWPATH}:}${DIR}" + fi + done + export ${PATHVARIABLE}="${NEWPATH}" } # Usage: pathprepend /path/to/bin [PATH] # Eg, to prepend ~/bin to $PATH # pathprepend ~/bin PATH function pathprepend { - pathremove "${1}" "${2}" - [ -d "${1}" ] || return - local PATHVARIABLE="${2:-PATH}" - export ${PATHVARIABLE}="${1}${!PATHVARIABLE:+:${!PATHVARIABLE}}" + pathremove "${1}" "${2}" + [ -d "${1}" ] || return + local PATHVARIABLE="${2:-PATH}" + export ${PATHVARIABLE}="${1}${!PATHVARIABLE:+:${!PATHVARIABLE}}" } # Usage: pathappend /path/to/bin [PATH] # Eg, to append ~/bin to $PATH # pathappend ~/bin PATH function pathappend { - pathremove "${1}" "${2}" - [ -d "${1}" ] || return - local PATHVARIABLE=${2:-PATH} - export $PATHVARIABLE="${!PATHVARIABLE:+${!PATHVARIABLE}:}${1}" + pathremove "${1}" "${2}" + [ -d "${1}" ] || return + local PATHVARIABLE=${2:-PATH} + export $PATHVARIABLE="${!PATHVARIABLE:+${!PATHVARIABLE}:}${1}" } # Usage: is_function something # Check if a function exists function is_function { - declare -Ff "$1" > /dev/null + declare -Ff "$1" > /dev/null } # Usage: find_up_recurse somefile # Check if a file named somefile exists in this directory or any parent function find_up_recurse { - d="$1" - pushd . > /dev/null - while [ "$PWD" != "/" ]; do - if [ -e "$d" ]; then - popd > /dev/null - return 0 - fi - cd .. - done - popd > /dev/null - return 1 + d="$1" + pushd . > /dev/null + while [ "$PWD" != "/" ]; do + if [ -e "$d" ]; then + popd > /dev/null + return 0 + fi + cd .. + done + popd > /dev/null + return 1 } # Load local functions diff --git a/.bash/interactive b/.bash/interactive index cdfc6ec..fb3c558 100644 --- a/.bash/interactive +++ b/.bash/interactive @@ -2,8 +2,8 @@ # Check for unsupported TERM variable if ! tput init &> /dev/null; then - echo "Warning! TERM=$TERM unsupported, using TERM=xterm" - export TERM=xterm + echo "Warning! TERM=$TERM unsupported, using TERM=xterm" + export TERM=xterm fi @@ -12,30 +12,30 @@ fi [ -r /usr/share/git/completion/git-prompt.sh ] && source /usr/share/git/completion/git-prompt.sh function my_git_ps1 { - find_up_recurse .git || return - GIT_PS1_SHOWDIRTYSTATE=1 \ - GIT_PS1_SHOWUNTRACKEDFILES=1 \ - __git_ps1 2> /dev/null + find_up_recurse .git || return + GIT_PS1_SHOWDIRTYSTATE=1 \ + GIT_PS1_SHOWUNTRACKEDFILES=1 \ + __git_ps1 2> /dev/null } function my_hg_ps1 { - find_up_recurse .hg || return - b="$(hg branch 2>/dev/null)" || return - s="$(hg status | cut -c1 | sort -u | tr -d " \n")" - echo -n " ($b" - [ -n "$s" ] && echo -n " $s" - echo -n ")" + find_up_recurse .hg || return + b="$(hg branch 2>/dev/null)" || return + s="$(hg status | cut -c1 | sort -u | tr -d " \n")" + echo -n " ($b" + [ -n "$s" ] && echo -n " $s" + echo -n ")" } function my_svn_ps1 { - find_up_recurse .svn || return - s="$(svn status --ignore-externals 2>/dev/null | cut -c1 | sort -u | tr -d " \n")" - [ -z "$s" ] && return - echo -n " ($s)" + find_up_recurse .svn || return + s="$(svn status --ignore-externals 2>/dev/null | cut -c1 | sort -u | tr -d " \n")" + [ -z "$s" ] && return + echo -n " ($s)" } if [ -z "$debian_chroot" -a -r /etc/debian_chroot ]; then - debian_chroot=$(cat /etc/debian_chroot) + debian_chroot=$(cat /etc/debian_chroot) fi PS1='${debian_chroot:+($debian_chroot)}' PS1="$PS1"'\[\033[00;31m\]\u@\h\[\033[00m\]:\[\033[00;34m\]\w\[\033[00m\]' @@ -46,11 +46,11 @@ PS1="$PS1"'\n\$ ' # Display return codes on error function print_exit_code { - _exit_msg="\033[01;33mexit code: $?\033[00m" - if [ -z "${BASH_SOURCE[1]}" ]; then - echo -e "$_exit_msg" - fi - unset _exit_msg + _exit_msg="\033[01;33mexit code: $?\033[00m" + if [ -z "${BASH_SOURCE[1]}" ]; then + echo -e "$_exit_msg" + fi + unset _exit_msg } trap print_exit_code ERR @@ -61,35 +61,35 @@ eval $(TERM=xterm dircolors 2> /dev/null) if [ "${DARKTERM:-1}" -eq 1 ]; then - # Sets colour scheme in apps like Vim - export COLORFGBG="15;0" + # Sets colour scheme in apps like Vim + export COLORFGBG="15;0" - # Bold ls colours - LS_COLORS="$(echo "${LS_COLORS}" | sed 's/00;/01;/g')" - LSCOLORS="ExFxCxDxBxEGEDABAGACAD" # BSD ls - PS1="$(echo "${PS1}" | sed 's/00;/01;/g')" + # Bold ls colours + LS_COLORS="$(echo "${LS_COLORS}" | sed 's/00;/01;/g')" + LSCOLORS="ExFxCxDxBxEGEDABAGACAD" # BSD ls + PS1="$(echo "${PS1}" | sed 's/00;/01;/g')" else - # Sets colour scheme in apps like Vim - export COLORFGBG="0;15" + # Sets colour scheme in apps like Vim + export COLORFGBG="0;15" - # Unbold ls colours - LS_COLORS="$(echo "${LS_COLORS}" | sed 's/01;/00;/g')" - LSCOLORS="exfxcxdxbxegedabagacad" # BSD ls + # Unbold ls colours + LS_COLORS="$(echo "${LS_COLORS}" | sed 's/01;/00;/g')" + LSCOLORS="exfxcxdxbxegedabagacad" # BSD ls fi # xterm titlebar displays 'hostname:workingdir' if tput hs || tput tsl &> /dev/null; then - PROMPT_COMMAND='tput tsl; echo -n "$(hostname| cut -d. -f1):${PWD/$HOME/~}"; tput fsl;' + PROMPT_COMMAND='tput tsl; echo -n "$(hostname| cut -d. -f1):${PWD/$HOME/~}"; tput fsl;' fi # screen window displays current command case "${TERM}" in screen*) - PROMPT_COMMAND="$PROMPT_COMMAND echo -ne '\033k\033\\'" - ;; + PROMPT_COMMAND="$PROMPT_COMMAND echo -ne '\033k\033\\'" + ;; esac # Useful aliases @@ -118,30 +118,30 @@ alias pstime='ps -weo pid,user:16,lstart,args --sort start_time|less -S' # Colorful man pages function man { env \ - LESS_TERMCAP_md=$'\E[01;38;5;74m' \ - LESS_TERMCAP_me=$'\E[0m' \ - LESS_TERMCAP_us=$'\E[04;38;5;146m' \ - LESS_TERMCAP_ue=$'\E[0m' \ + LESS_TERMCAP_md=$'\E[01;38;5;74m' \ + LESS_TERMCAP_me=$'\E[0m' \ + LESS_TERMCAP_us=$'\E[04;38;5;146m' \ + LESS_TERMCAP_ue=$'\E[0m' \ man "$@" } # Usage: mcd somedir # Creates the directory if it doesn't exist, and changes into it function mcd { - mkdir -p "${1}" && - cd "${1}" + mkdir -p "${1}" && + cd "${1}" } # Usage: vimf somefile # Does a recursive search of the current directory for somefile, then edits it function vimf { - find . -iname "${1}" -exec vim '{}' + + find . -iname "${1}" -exec vim '{}' + } # Sets the nice and ionice priorities for the current shell to the lowest values function slowshell { - ionice -c 3 -p $$ - renice -n 19 -p $$ + ionice -c 3 -p $$ + renice -n 19 -p $$ } diff --git a/.bash_profile b/.bash_profile index 98e80fd..08b4080 100644 --- a/.bash_profile +++ b/.bash_profile @@ -7,6 +7,6 @@ source "${HOME}/.bash/environment" # An interactive shell starting bash_profile must be a login shell (man bash) # We run the login script and the interactive setup if [ -n "${PS1}" ]; then - source "${HOME}/.bash/login" - source "${HOME}/.bash/interactive" + source "${HOME}/.bash/login" + source "${HOME}/.bash/interactive" fi diff --git a/.bashrc b/.bashrc index 1888b27..79f465c 100644 --- a/.bashrc +++ b/.bashrc @@ -4,5 +4,5 @@ source "${HOME}/.bash/environment" # An interactive shell starting bashrc is not a login shell, just run # interactive setup if [ -n "${PS1}" ]; then - source "${HOME}/.bash/interactive" + source "${HOME}/.bash/interactive" fi diff --git a/.config/fontconfig/fonts.conf b/.config/fontconfig/fonts.conf index 4b0e699..32e4aa5 100644 --- a/.config/fontconfig/fonts.conf +++ b/.config/fontconfig/fonts.conf @@ -3,56 +3,56 @@ - true - lcddefault - false - false - true - hintslight - rgb + true + lcddefault + false + false + true + hintslight + rgb - Nimbus Mono L - monospace + Nimbus Mono L + monospace - serif - - Georgia - DejaVu Serif - + serif + + Georgia + DejaVu Serif + - sans-serif - - Ubuntu - Source Sans Pro - DejaVu Sans - + sans-serif + + Ubuntu + Source Sans Pro + DejaVu Sans + - monospace - - Ubuntu Mono - Consolas - Inconsolata - DejaVu Sans Mono - + monospace + + Ubuntu Mono + Consolas + Inconsolata + DejaVu Sans Mono + diff --git a/.gitconfig b/.gitconfig index ee52155..2c79ea9 100644 --- a/.gitconfig +++ b/.gitconfig @@ -1,31 +1,31 @@ [user] - name = James Bunton - email = jamesbunton@delx.net.au + name = James Bunton + email = jamesbunton@delx.net.au [color] - ui = always + ui = always [core] - pager = less -+F -+X - editor = vim + pager = less -+F -+X + editor = vim [log] - decorate = full + decorate = full [diff] - renamelimit = 10000 + renamelimit = 10000 [push] - # Set to tracking instead of upstream for backwards compatibility - default = tracking + # Set to tracking instead of upstream for backwards compatibility + default = tracking [alias] - graphlog = log --graph --pretty=format:'%C(bold black)%h%Creset %C(bold red)%ad %C(bold blue)%s%Creset %C(bold yellow)%d%Creset %C(bold black)<%an>%Creset' --date=short - ci = commit - co = checkout - st = status - di = diff - diw = diff --color-words - dic = diff --cached - dicw = diff --cached --color-words - ff = merge --ff-only - ffpull = pull --ff-only - lso = ls-files -X .gitignore -o - pushn = !git push origin -u --set-upstream "$(git rev-parse --abbrev-ref HEAD)" - pushd = !git push origin --delete "$(git rev-parse --abbrev-ref HEAD)" - cherry-pick = cherry-pick -x - branches-to-kill = !git branch --merged origin/master|grep -v master|xargs -n1 echo git branch -d + graphlog = log --graph --pretty=format:'%C(bold black)%h%Creset %C(bold red)%ad %C(bold blue)%s%Creset %C(bold yellow)%d%Creset %C(bold black)<%an>%Creset' --date=short + ci = commit + co = checkout + st = status + di = diff + diw = diff --color-words + dic = diff --cached + dicw = diff --cached --color-words + ff = merge --ff-only + ffpull = pull --ff-only + lso = ls-files -X .gitignore -o + pushn = !git push origin -u --set-upstream "$(git rev-parse --abbrev-ref HEAD)" + pushd = !git push origin --delete "$(git rev-parse --abbrev-ref HEAD)" + cherry-pick = cherry-pick -x + branches-to-kill = !git branch --merged origin/master|grep -v master|xargs -n1 echo git branch -d diff --git a/.pythonrc.py b/.pythonrc.py index 6ffe0b2..5d8a274 100644 --- a/.pythonrc.py +++ b/.pythonrc.py @@ -38,13 +38,13 @@ defaultCompleter = rlcompleter.Completer() historyPath = os.path.expanduser("~/.pyhistory") def myCompleter(text, state): - if text.strip() == "": - if state == 0: - return text + "\t" - else: - return None - else: - return defaultCompleter.complete(text, state) + if text.strip() == "": + if state == 0: + return text + "\t" + else: + return None + else: + return defaultCompleter.complete(text, state) def save_history(historyPath=historyPath): import readline diff --git a/.ssh/config b/.ssh/config index 8820f64..01ebc17 100644 --- a/.ssh/config +++ b/.ssh/config @@ -1,6 +1,6 @@ Host * -#ControlMaster auto -#ControlPath ~/.ssh/master-%r@%h:%p -HashKnownHosts no -SendEnv COLORFGBG + HashKnownHosts no + SendEnv COLORFGBG +### ControlMaster auto +### ControlPath ~/.ssh/master-%r@%h:%p diff --git a/.vim/abbrs/YDATE b/.vim/abbrs/YDATE index b22bb13..cd9d886 100644 --- a/.vim/abbrs/YDATE +++ b/.vim/abbrs/YDATE @@ -1 +1 @@ -=strftime("%Y-%m-%d") \ No newline at end of file +=strftime("%Y-%m-%d") diff --git a/.vim/abbrs/cmain.c b/.vim/abbrs/cmain.c index 74627c6..5a317f5 100644 --- a/.vim/abbrs/cmain.c +++ b/.vim/abbrs/cmain.c @@ -9,7 +9,7 @@ int main(void) { - ___ - return 0; + ___ + return 0; } diff --git a/.vim/abbrs/cmaina.c b/.vim/abbrs/cmaina.c index 84668d1..9cc5d31 100644 --- a/.vim/abbrs/cmaina.c +++ b/.vim/abbrs/cmaina.c @@ -9,7 +9,7 @@ int main(int argc, char** argv) { - ___ - return 0; + ___ + return 0; } diff --git a/.vim/abbrs/cppmain.cpp b/.vim/abbrs/cppmain.cpp index c47dfd8..cedf7a4 100644 --- a/.vim/abbrs/cppmain.cpp +++ b/.vim/abbrs/cppmain.cpp @@ -8,7 +8,7 @@ int main(void) { - ___ - return 0; + ___ + return 0; } diff --git a/.vim/abbrs/cppmaina.cpp b/.vim/abbrs/cppmaina.cpp index dba7dca..a8f468c 100644 --- a/.vim/abbrs/cppmaina.cpp +++ b/.vim/abbrs/cppmaina.cpp @@ -8,7 +8,7 @@ int main(int argc, char** argv) { - ___ - return 0; + ___ + return 0; } diff --git a/.vim/abbrs/jmain.java b/.vim/abbrs/jmain.java index aa289bf..de791b3 100644 --- a/.vim/abbrs/jmain.java +++ b/.vim/abbrs/jmain.java @@ -1,6 +1,6 @@ public class ___ClassName { - public static void main(String[] args) { - // code - } + public static void main(String[] args) { + // code + } } diff --git a/.vim/abbrs/latexreport.tex b/.vim/abbrs/latexreport.tex index c1cf3ae..ff02003 100644 --- a/.vim/abbrs/latexreport.tex +++ b/.vim/abbrs/latexreport.tex @@ -35,8 +35,8 @@ \title{___The Title goes here} \author{ - ___First Author\\ - (email: \tt{___user@example.com}) \\ + ___First Author\\ + (email: \tt{___user@example.com}) \\ } \begin{document} diff --git a/.vim/abbrs/pymain.py b/.vim/abbrs/pymain.py index c3fb418..54e8ecc 100644 --- a/.vim/abbrs/pymain.py +++ b/.vim/abbrs/pymain.py @@ -3,9 +3,9 @@ import os import sys def main(): - ___ pass + ___ pass if __name__ == "__main__": - main() + main() diff --git a/.vim/abbrs/pymaina.py b/.vim/abbrs/pymaina.py index 1ff3615..f5cddef 100644 --- a/.vim/abbrs/pymaina.py +++ b/.vim/abbrs/pymaina.py @@ -3,15 +3,15 @@ import os import sys def main(___arg): - ___ pass + ___ pass if __name__ == "__main__": - try: - ___arg = sys.argv[1] - except: - print >>sys.stderr, "Usage: %s ___arg" % sys.argv[0] - sys.exit(1) + try: + ___arg = sys.argv[1] + except: + print >>sys.stderr, "Usage: %s ___arg" % sys.argv[0] + sys.exit(1) - main(___arg) + main(___arg) diff --git a/.vim/abbrs/xhtmltemplate.xhtml b/.vim/abbrs/xhtmltemplate.xhtml index 1aac5c7..e37169f 100644 --- a/.vim/abbrs/xhtmltemplate.xhtml +++ b/.vim/abbrs/xhtmltemplate.xhtml @@ -3,9 +3,9 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - ___ - -