dotfiles

configuration files for different softwares
git clone git://z3bra.org/dotfiles
Log | Files | Refs

commit b2ad9c30994ab419db36c1b345849a662518d2c5
parent 99c0cea75f52ab6548d7d26bf875162b28eddd03
Author: z3bra <willy@mailoo.org>
Date:   Mon May 12 07:53:44 2014

Merge branch 'master' of git:dotfiles

Diffstat:
 Xresources            |  4 ++--
 bashrc                |  6 ++++++
 copy.sh               | 47 ++++++++++++++++++++++++++++++++---------------
 inputrc               |  8 ++++++++
 profile               |  2 +-
 vim/colors/shblah.vim |  9 ++++++---
 6 files changed, 55 insertions(+), 21 deletions(-)

diff --git a/Xresources b/Xresources @@ -51,8 +51,8 @@ URxvt.keysym.M-v: perl:keyboard-select:activate ! Colored man pages URxvt.colorIT: #cacaca -URxvt.colorBD: #eee685 -URxvt.colorUL: #d45f10 +URxvt.colorBD: #ede265 +URxvt.colorUL: #ffffff ! XTerm --------------------------------------------------------- diff --git a/bashrc b/bashrc @@ -30,6 +30,8 @@ complete -cf man complete -cf killall complete -cf pkill complete -cf fakeroot +complete -cf respawn +complete -cf pgrep # }}} ## FUNCTIONS {{{ @@ -62,6 +64,10 @@ stop() { for s in $@; do sudo /etc/rc.d/$s stop; done } restart() { for s in $@; do sudo /etc/rc.d/$s restart; done } status() { for s in $@; do sudo /etc/rc.d/$s status; done } +respawn() { + test -n "$@" && pkill "$@" && "$@" +} + sprunge() { test -z $1 && FILE='-' || FILE=$1 diff --git a/copy.sh b/copy.sh @@ -11,7 +11,8 @@ b=`tput bold` OK="[${G} OK ${N}]" NOPE="[${R}FAIL${N}]" -cat <<EOF > $TMPFILE +listfiles() { + cat <<EOF > $TMPFILE ## ## Here is an auto-generated file for linking ## config file to your $home directory @@ -27,27 +28,43 @@ cat <<EOF > $TMPFILE ## EOF -echo "listing the whole directory" -ls $PWD >> $TMPFILE + echo "listing the whole directory" + ls $PWD >> $TMPFILE + # Remove this script from the file list + sed -i "/`basename $0`/d" $TMPFILE +} + +config() { +# Edit the temporary file test -z "$EDITOR" && vi $TMPFILE || $EDITOR $TMPFILE +} -echo "simulating..." +simulate() { +# Print what's going to happen +echo "the following files will be linked:" for f in `grep -v '^#' $TMPFILE`; do echo "~/.$f -> ${B}${PWD}/$f${N}" done +} -echo "attempting to link config file" -echo -read -p "Hit <Enter> to continue, <Ctrl-C> to abort..." -for f in `grep -v '^#' $TMPFILE`; do - ln -s $PWD/$f ~/.$f 2>/dev/null - echo -n "${f} ... " - test -L ~/.$f && echo $OK || echo $NOPE -done +link() { + read -p "hit ^C to abort..." + for f in `grep -v '^#' $TMPFILE`; do + echo -n "${f} ... " + ln -s $PWD/$f ~/.$f 2>/dev/null && echo $OK || echo $NOPE + done +} -echo "removing temporary files" -rm $TMPFILE +clean() { + echo "removing temporary files" + rm $TMPFILE +} -echo "finished." +test -f $TMPFILE || listfiles +config +simulate +link +clean +exit 0 diff --git a/inputrc b/inputrc @@ -0,0 +1,8 @@ +set editing-mode vi + +# clear screen with control-L +c-l: clear-screen + +# smart command history +"\e[A": history-search-backward +"\e[B": history-search-forward diff --git a/profile b/profile @@ -1,4 +1,4 @@ -export PATH=$PATH:~/bin:. +export PATH=$PATH:/sbin/:~/bin:. export MAIL=$HOME/var/mail/INBOX export PAGER=less export EDITOR=vim diff --git a/vim/colors/shblah.vim b/vim/colors/shblah.vim @@ -22,8 +22,9 @@ highlight Constant term=NONE cterm=bold ctermfg=2 ctermbg=NONE highlight Cursor term=NONE cterm=bold ctermfg=3 ctermbg=NONE highlight CursorLine term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE highlight DiffAdd term=NONE cterm=bold ctermfg=2 ctermbg=NONE -highlight DiffChange term=NONE cterm=bold ctermfg=3 ctermbg=NONE -highlight DiffDelete term=NONE cterm=bold ctermfg=1 ctermbg=NONE +highlight DiffChange term=NONE cterm=bold ctermfg=NONE ctermbg=NONE +highlight DiffDelete term=NONE cterm=bold ctermfg=7 ctermbg=1 +highlight DiffText term=NONE cterm=bold ctermfg=7 ctermbg=4 highlight FoldColumn term=NONE cterm=bold ctermfg=0 ctermbg=NONE highlight Folded term=NONE cterm=bold ctermfg=0 ctermbg=NONE highlight Function term=NONE cterm=bold ctermfg=7 ctermbg=NONE @@ -64,6 +65,7 @@ syn match Cursor "\"__Cursor.*" syn match CursorLine "\"__CursorLine.*" syn match DiffAdd "\"__DiffAdd.*" syn match DiffChange "\"__DiffChange.*" +syn match DiffText "\"__DiffText.*" syn match DiffDelete "\"__DiffDelete.*" syn match Folded "\"__Folded.*" syn match Function "\"__Function.*" @@ -90,7 +92,8 @@ syn match Visual "\"__Visual.*" "__Cursor char under the cursor? "__CursorLine Line where the cursor is "__DiffAdd +line added from file.orig -"__DiffChange changed from file.org +"__DiffChange line changed from file.orig +"__DiffText actual changes on this line "__DiffDelete -line removed from file.orig "__Folded +--- 1 line : Folded line --- "__Function function sblah()