Some cleanup

This commit is contained in:
Frank Villaro-Dixon 2013-08-22 16:26:45 +02:00
parent dd76577861
commit fd7e872565
7 changed files with 118 additions and 61 deletions

View file

@ -82,6 +82,11 @@ case $1 in
"suspend")
systemctl suspend
xlock -mode blank
;;
"lock")
xlock -mode blank -dpmsoff 1
;;
esac

2
bashrc
View file

@ -99,7 +99,7 @@ alias makew='make'
alias BSI2='cd ~/Documents/UniGE/BSI2*/'
OCTOPUS=~/Programmation/Utils/octopus.sh
OCTOPUS=~/.my_utils/octopus.sh
alias dual='$OCTOPUS monitor dual'
alias laptop='$OCTOPUS monitor laptop'
alias extern='$OCTOPUS monitor extern'

View file

@ -2,7 +2,8 @@
#include "fibonacci.c"
/* appearance */
static const char font[] = "-*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*";
//static const char font[] = "-*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*";
static const char font[] = "-*-dejavu sans-medium-r-*-*-14-*-*-*-*-*-*-*";
static const char normbordercolor[] = "#444444";
static const char normbgcolor[] = "#222222";
static const char normfgcolor[] = "#bbbbbb";
@ -63,10 +64,6 @@ static const char *muttcmd[] = {"roxterm", "-e", "mutt", NULL};
//static const char *lockcmd[] = { "xlock", "-mode", "blank", "-startCmd", "~/Programmation/Utils/monitorOff.sh", "-timeout", "15", "-dpmsoff", "1", NULL };
//static const char *volup[] = { "amixer", "-q", "set", "Master", "5%+", "unmute", NULL };
//static const char *voldown[] = { "amixer", "-q", "set", "Master", "5%-", "unmute", NULL };
//static const char *volmute[] = { "amixer", "-q", "set", "Master", "toggle", NULL };
static const char *volup[] = {"octopus.sh", "vol", "up", NULL};
static const char *voldown[] = {"octopus.sh", "vol", "down", NULL};
static const char *volmute[] = {"octopus.sh", "vol", "mute", NULL};

View file

@ -1,69 +1,113 @@
#!/bin/bash
function deploy_for_desktop()
{ # {{{
cd ~
ln -s $WAI/xinitrc ./.xinitrc
ln -s $WAI/octaverc ./.octaverc
ln -s $WAI/gitconfig ./.gitconfig
cd ~
if [ ! -d "~/.my_utils" ]; then mkdir ~/.my_utils; fi;
cd ~/.my_utils
ln -s $WAI/Utils/monitor.sh ./monitor.sh
ln -s $WAI/Utils/monitorOff.sh ./monitorOff.sh
ln -s $WAI/Utils/track.sh ./track.sh
ln -s $WAI/Utils/blink.sh ./blink.sh
ln -s $WAI/Utils/octopus.sh ./octopus.sh
ln -s $WAI/chooseWP.sh ~/Pictures/wallpapers/chooseWP.sh
} # }}}
function deploy_vim()
{ # {{{
cd ~
ln -s $WAI/vim/vimrc ./.vimrc
if [ ! -d "~/.vim" ]; then mkdir ~/.vim/; fi;
cd ~/.vim
if [ ! -d "./colors" ]; then mkdir colors; fi;
cd colors
ln -s $WAI/vim/colors/wombat256modv1.vim ./wombat256modv1.vim
cd ..
if [ ! -d "./skeletons" ]; then mkdir skeletons; fi;
cd skeletons
for i in `ls $WAI/vim/skeletons`; do ln -s $WAI/vim/skeletons/$i ./$i; done
cd ..
if [ ! -d "./spell" ]; then mkdir spell; fi;
cd spell
for i in `ls $WAI/vim/spell`; do ln -s $WAI/vim/spell/$i ./$i; done
cd ..
if [ ! -d "./plugin" ]; then mkdir plugin; fi;
cd plugin
for i in `ls $WAI/vim/plugin`; do ln -s $WAI/vim/plugin/$i ./$i; done
cd ..
if [ ! -d "./scripts" ]; then mkdir scripts; fi;
cd scripts
for i in `ls $WAI/vim/scripts`; do ln -s $WAI/vim/scripts/$i ./$i; done
} # }}}
function deploy_ssh()
{ # {{{
if [ ! -d "~/.ssh" ]; then mkdir .ssh/; fi;
cd ~/.ssh
ln -s $WAI/ssh/config ./
} # }}}
function deploy_mutt()
{ # {{{
cd ~
ln -s $WAI/mailcap ./.mailcap
if [ ! -d "~/.mutt" ]; then mkdir ~/.mutt/; fi;
cd ~/.mutt
ln -s $WAI/mutt/muttrc ./
ln -s $WAI/mutt/killsig ./
ln -s $WAI/mutt/passwords.gpg ./
ln -s $WAI/mutt/crypto ./
ln -s $WAI/mutt/colors.test1 ./
ln -s $WAI/mutt/colors.test2 ./
ln -s $WAI/mutt/unlock-pass.sh ./
} # }}}
WAI=`pwd`
#simple files
cd ~/
cd ~
ln -s $WAI/bashrc ./.bashrc
ln -s $WAI/vimrc ./.vimrc
ln -s $WAI/gitconfig ./.gitconfig
ln -s $WAI/xinitrc ./.xinitrc
ln -s $WAI/screenrc ./.screenrc
ln -s $WAI/octaverc ./.octaverc
ln -s $WAI/mailcap ./.mailcap
ln -s $WAI/chooseWP.sh ~/Pictures/wallpapers/chooseWP.sh
#SSH
if [ ! -d "~/.ssh" ]; then mkdir .ssh/; fi;
cd ~/.ssh
ln -s $WAI/ssh/config ./
#MUTT
if [ ! -d "~/.mutt" ]; then mkdir ~/.mutt/; fi;
cd ~/.mutt
ln -s $WAI/mutt/muttrc ./
ln -s $WAI/mutt/killsig ./
ln -s $WAI/mutt/passwords.gpg ./
ln -s $WAI/mutt/crypto ./
ln -s $WAI/mutt/colors.test1 ./
ln -s $WAI/mutt/colors.test2 ./
ln -s $WAI/mutt/unlock-pass.sh ./
deploy_for_desktop
deploy_vim
deploy_ssh
deploy_mutt
#VIM
if [ ! -d "~/.vim" ]; then mkdir ~/.vim/; fi;
cd ~/.vim
if [ ! -d "./colors" ]; then mkdir colors; fi;
cd colors
ln -s $WAI/vim/colors/wombat256modv1.vim ./wombat256modv1.vim
cd ..
if [ ! -d "./skeletons" ]; then mkdir skeletons; fi;
cd skeletons
for i in `ls $WAI/vim/skeletons`; do ln -s $WAI/vim/skeletons/$i ./$i; done
cd ..
if [ ! -d "./spell" ]; then mkdir spell; fi;
cd spell
for i in `ls $WAI/vim/spell`; do ln -s $WAI/vim/spell/$i ./$i; done
cd ..
if [ ! -d "./plugin" ]; then mkdir plugin; fi;
cd plugin
for i in `ls $WAI/vim/plugin`; do ln -s $WAI/vim/plugin/$i ./$i; done
cd ~
if [ -d "Programmation" ]; then mkdir Programmation; fi;
cd ~/Programmation
ln -s $WAI/git_auto_pull.sh ./git_auto_pull.sh
if [ ! -d "./Utils" ]; then mkdir Utils; fi;
cd ./Utils
ln -s $WAI/Utils/monitor.sh ./monitor.sh
ln -s $WAI/Utils/monitorOff.sh ./monitorOff.sh
ln -s $WAI/Utils/track.sh ./track.sh
ln -s $WAI/Utils/blink.sh ./blink.sh
ln -s $WAI/Utils/octopus.sh ./octopus.sh
function deploy_directory()
{ # {{{
# @arg1: dst directory
# @arg2: src directory
if [ ! -d $1 ]; then mkdir $1; fi;
cd $1;
for i in `ls $2`; do ln -s $2/$i ./$i; done
cd ..
} # }}}

2
vim/scripts/doc.php.sh Executable file
View file

@ -0,0 +1,2 @@
#!/bin/bash
firefox "http://www.php.net/$1" &

View file

@ -5,6 +5,8 @@
"execute pathogen#infect()
map <Tab> <C-w>w
map <S-Tab> <C-w>W
syntax on
@ -12,7 +14,7 @@ syntax on
set spell
"set nocompatible "fuck you !. impossible de backspace, sinon
"set backspace=indent,eol,start
set backspace=indent,eol,start
"set ruler
set number
@ -153,3 +155,10 @@ autocmd BufNewFile *
" skeleton template use <+KEY+>
nnoremap § <esc>/<+.\{-1,}+><return>c/+>/e<return>
inoremap § <esc>/<+.\{-1,}+><return>c/+>/e<return>
au BufRead /dev/shm/mutt-* set tw=80
autocmd BufNewFile,BufRead *.py set keywordprg=pydoc
autocmd BufNewFile,BufRead *.php set keywordprg=~/.vim/scripts/doc.php.sh

View file

@ -13,7 +13,7 @@ fi
#DWM
export PATH=~/Programmation/Utils/:$PATH
export PATH=~/.my_utils/:$PATH
source ~/.bashrc