Merge branch 'master' of ssh://hectorone.homedns.org/home/mathieu/GitProject/config

This commit is contained in:
Mathieu Maret 2010-04-30 19:15:46 +02:00
commit 8ba00d1c77
9 changed files with 187 additions and 48 deletions

26
.muttrc
View File

@ -99,23 +99,23 @@ macro attach W <save-entry><kill-line>/home/mathieu/Download/
## SIDEBAR
# set up the sidebar, default not visible
set sidebar_width=24
set sidebar_visible=yes
set sidebar_delim='|'
#set sidebar_width=24
#set sidebar_visible=yes
#set sidebar_delim='|'
# color of folders with new mail
color sidebar_new yellow default
#color sidebar_new yellow default
# ctrl-n, ctrl-p to select next, prev folder
# ctrl-o to open selected folder
bind index \CP sidebar-prev
bind index \CN sidebar-next
bind index \CO sidebar-open
bind pager \CP sidebar-prev
bind pager \CN sidebar-next
bind pager \CO sidebar-open
#bind index \CP sidebar-prev
#bind index \CN sidebar-next
#bind index \CO sidebar-open
#bind pager \CP sidebar-prev
#bind pager \CN sidebar-next
#bind pager \CO sidebar-open
# b toggles sidebar visibility
macro index b '<enter-command>toggle sidebar_visible<enter><refresh>'
macro pager b '<enter-command>toggle sidebar_visible<enter><redraw-screen>'
bind index B bounce-message
#macro index b '<enter-command>toggle sidebar_visible<enter><refresh>'
#macro pager b '<enter-command>toggle sidebar_visible<enter><redraw-screen>'
#bind index B bounce-message
## COLORS

37
.vimrc
View File

@ -10,6 +10,7 @@
" F7 go to calls
" F8 view tag list
" S-F8 build ctags/cscope databases
" M-F8 build kernel ctags/cscope databases
" F9 view changes
" F10 folding ?
" F11 unhighlight search
@ -328,21 +329,31 @@ if has("cscope")
" i includes find files that include the filename under cursor
" d called find functions that function under cursor calls
endif
" build tags database with shift+F8
if has("cscope")
command! TagsBuild
\ :!echo "building ctags and cscope databases..." &&
\ ctags --c++-kinds=+p --fields=+iaS --extra=+q -R &&
\ cscope -bR
map <S-F8> :TagsBuild<CR><CR>:cscope reset<CR><CR>
else
command! TagsBuild
\ :!echo "building ctags database..." &&
\ ctags --c++-kinds=+p --fields=+iaS --extra=+q -R
\:set tags=./tags,./../tags,./../../tags,./../../../tags,tags
map <S-F8> :TagsBuild<CR><CR>
" build tags database with shift+F8 or alt+F8 to ignore /usr/include
command! CtagsBuild
\ :!echo 'building ctags database...' ;
\ ctags --fields=+iaS --extra=+q --totals -R &&
\ echo 'adding system headers...' ;
\ find -exec gcc -M '{}' \; 2>&- | tr '[:space:]' '\n' | grep '^/.*' | sort -u |
\ ctags --c-kinds=+px --c++-kinds=+px --fields=+iaS --extra=+q -aL-
command! CtagsKernelBuild
\ :!echo 'building ctags database in kernel mode...' ;
\ ctags --fields=+iaS --extra=+q --totals -R
command! CscopeBuild
\ :!echo 'building cscope database...' ;
\ cscope -bR
command! CscopeKernelBuild
\ :!echo 'building cscope database in kernel mode...' ;
\ cscope -bkR
if has("cscope")
map <S-F8> :CtagsBuild<CR><CR>:CscopeBuild<CR><CR>:cscope reset<CR><CR>
map <M-F8> :CtagsKernelBuild<CR><CR>:CscopeKernelBuild<CR><CR>:cscope reset<CR><CR>
else
map <S-F8> :CtagsBuild<CR><CR>
map <M-F8> :CtagsKernelBuild<CR><CR>
endif
" close preview window after a completion
if has("autocmd")
autocmd CursorMovedI *.{[hc],cpp} if pumvisible() == 0|pclose|endif

View File

@ -31,12 +31,12 @@ autoload -U bashcompinit
bashcompinit
# Correct for wrong command like sl
# setopt correctall
setopt correctall
# Activate Prompt
autoload -U promptinit
promptinit
prompt adam1
#prompt adam1
prompt bart
@ -71,24 +71,12 @@ zstyle ':completion:*:*:kill:*:processes' list-colors "=(#b) #([0-9]#)*=36=31"
zstyle ':completion:*' menu select=2
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
#alias
alias ls='ls --color=auto'
alias l='ls'
alias ll='ls --color=auto -lh'
alias la='ls --color=auto -lha'
alias lll='ls --color=auto -lh | less'
alias lsg='ls | grep -i '
alias ..='cd ..'
# couleur affiche dans less ( sarosque )
export LESS="$LESS -R"
#Un grep avec des couleurs :
export GREP_COLOR=31
alias grep='grep --color=auto'
alias xte='nohup xterm &' # xte lancera un xterm qui ne se fermera pas si on ferme le terminal
#export
export EDITOR=/usr/bin/vim
# support des type mimes -> ./toto.pdf
autoload -U zsh-mime-setup
autoload -U zsh-mime-handler

View File

@ -0,0 +1,19 @@
# couleur dans man
export PAGER="less"
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'
# X : Disables sending the termcap initialization and deinitialization strings to the terminal.
# F : Exit if the entire file can be displayed on the first screen
# R : couleur
export LESS="$LESS -XRF"
#export GIT_PAGER="more"
export EDITOR=/usr/bin/vim

18
.zsh/30_alias.zsh Normal file
View File

@ -0,0 +1,18 @@
alias mv='nocorrect mv' # no spelling correction on mv
alias cp='nocorrect cp'
alias mkdir='nocorrect mkdir'
#alias
alias ls='ls --color=auto'
alias l='ls'
alias ll='ls --color=auto -lh'
alias la='ls --color=auto -lha'
alias lll='ls --color=auto -lh | less'
alias lsg='ls | grep -i '
alias ..='cd ..'
alias ../..='cd ../..'
alias ../../..='cd ../../..'
alias xte='nohup xterm &' # xte lancera un xterm qui ne se fermera pas si on ferme le terminal

65
.zsh/70_Trash.zsh Normal file
View File

@ -0,0 +1,65 @@
##
## Part of configuration files for Zsh4
## AUTHOR: Hugues Hiegel <hugues@hiegel.fr>
##
## You are encouraged to use, modify, and redistribute
## these files with or without this notice.
##
## NO WARRANTY PROVIDED, USE AT YOUR OWN RISKS
##
TRASH=$ZDOTDIR/.trash
move_to_trash ()
{
FOLDER=$TRASH/$PWD
for element in $@
do
if [ -e $element ]
then
echo "Deleting $element..."
mkdir -p $FOLDER/${element:h}
mv -f $element $FOLDER/${element:h}/.
fi
done
}
list_deleted_elements ()
{
FOLDER=$TRASH/$PWD
if [ -d $FOLDER ]
then
ls -lad $(find $FOLDER -maxdepth 1 ! -wholename $FOLDER) | sed "s:$FOLDER/::"
else
echo "Nothing found in trash."
fi
}
undelete_from_trash ()
{
FOLDER=$TRASH/$PWD
for element in $@
do
if [ -e $FOLDER/$element ]
then
echo "Getting back $element..."
mkdir -p ${element:h}
mv $FOLDER/$element .
rmdir --ignore-fail-on-non-empty -p $FOLDER
else
echo "Not found in trash: $element"
fi
done
}
alias delete='move_to_trash'
alias undelete='undelete_from_trash'
alias lsdeleted='list_deleted_elements'
alias cdtrash='cd $TRASH/$PWD'
alias sotrash='cd ${PWD/$TRASH/}'
hash -d trash=$TRASH

View File

@ -8,7 +8,8 @@ export ANDROID_HOME=$HOME/Android/android-sdk-linux_86
export ANDROID_SKD=$ANDROID_HOME/platforms/android-1.6/
export ECLIPSE_HOME=$HOME/Tools/eclipse
export NETBEANS_HOME=$HOME/netbeans-6.8
export PATH=$NETBEANS_HOME/bin:$JAVA_HOME/bin/:$ANDROID_HOME/tools:$ANDROID_SKD/tools:$ECLIPSE_HOME:$PATH
export OOFICE_HOME=/opt/openoffice.org3/program
export PATH=$NETBEANS_HOME/bin:$JAVA_HOME/bin/:$ANDROID_HOME/tools:$ANDROID_SKD/tools:$ECLIPSE_HOME:$OOFICE_HOME:$PATH
#Perso Bin
export PATH=$HOME/bin/bin:$HOME/bin:$PATH

View File

@ -6,7 +6,7 @@
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><H3 ADD_DATE="0" LAST_MODIFIED="1270632178" PERSONAL_TOOLBAR_FOLDER="true">Barre de favoris</H3>
<DT><H3 ADD_DATE="0" LAST_MODIFIED="1272285743" PERSONAL_TOOLBAR_FOLDER="true">Barre de favoris</H3>
<DL><p>
<DT><A HREF="http://www.exalead.fr/search/" ADD_DATE="1247211859" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAC6UlEQVQ4jW2TTWhcVRiGn3PvzM3cpPltqomBSLuyRcEgUvGnd7CCoBsX3Yjanbjozo1uCllVpILVjRQXdSEiNBtRcaWZaRFEojUQWmxJWhKTTDKTzO+dc+eee87nojWkmHf9Pe8HL++rOEBam2g1ySLnIHaO3dQxM1YoHwnz5YPuHwIXNrvzy81UWr1MjHWSWiebsZGfN2K5eqc+X9UmOhBea+voytKOrDcSacRGWkkmDZ1JU2fSSjJpJ5k0k0w+X6zK3breM1EAbW2is+XN0rljQ4yGPkoprBOODOQxTmjoDM9TAPgifLG4zSenp4uDYb6cA/h4qTa7XNNsjBfY0R7GCsMFn5mpAQQor/TYaKV4SpH3Fdv1Llf/rpcAlatrEx2fWymSWpZ2ezgE60ApxfhIH89N9vPS0UGu/LnDzVpM4Pust3t881eFtjaR9+NqJ9qKDRVjmdvqsuzg/RcmWOxlvFle58LNJoHvcfbpw9QCn7nVBtutHvdqHRZ3k8hbaaYIgIOJ0OfLU5NMDeT4+vQUg77ifGmND+e3CfMel09N8vwhhRUhtcJGKyWHBzwIKN/oQGaJjUJ6GcM7DfoTD2vd/cSdQ7RGPEW1v5/E8/CODQaEgU+hkOO3BM58eo3KTswbl65zp9bj3JMTXHxlgrhneOfyr/ywlVIZHiIXBEwfyqHq2kSv/rRayrL7X25vxbh7FYKpw7z71GN89PIk2lje+mqB700B6QvACTPjIddeny4qgIs3qvO3/omLAMs9y+/acnzA4/prj5M64e1vF/nFhqggB4A44dLJR3nvxJhSAHVtogsL1dKIFawIN5qGaqvLyYKha4Vb9BM8gD3gkaGAz16cKI6G+bLaX+XvbrdLQwKZwFrHUK136CsEhH35vawrTvjgmfHi0dGwvFfl/9TWJvqjmsy2tC0WFHRTS2odsYVKkjES5kpnnhiZ3b/Khwz2G93tZFHqHN3M0cgcz44F5cnB8H9z/hcVPZPOEcrrSgAAAABJRU5ErkJggg==">Recherche Web - Exalead</A>
<DT><A HREF="http://www.examplenow.com/" ADD_DATE="1257329577">http://www.examplenow.com/</A>
@ -181,12 +181,13 @@
<DT><A HREF="http://www.forum-auto.com/moto/section24/sujet262684.htm" ADD_DATE="1248861606">Fazer (600, 1000, FZ6, FZ6 S2, FZ1) [topic officiel] - Les Tréteaux Topics officiels motos - FORUM Les Tréteaux - FORUM Moto</A>
<DT><A HREF="http://www.scribd.com/doc/10283675/Yamaha-Fazer-FZ6-S2-2007-Service-Manual-ENG" ADD_DATE="1248861942">Yamaha Fazer FZ6 S2 2007 Service Manual ENG</A>
<DT><A HREF="http://ymenvom.nl/search.php" ADD_DATE="1248862160">Search manuals</A>
<DT><H3 ADD_DATE="1262680673" LAST_MODIFIED="0">Stinger</H3>
<DT><H3 ADD_DATE="1262680673" LAST_MODIFIED="1272285754">Stinger</H3>
<DL><p>
<DT><A HREF="http://www.leboncoin.fr/vi/56990497.htm?ca=12_s" ADD_DATE="1249386888">Collecteur kawasaki pour zxr 750 modele 90 Equipement Auto / Moto Bouches du Rhône - leboncoin.fr</A>
<DT><A HREF="http://www.leboncoin.fr/vi/56983785.htm?ca=12_s" ADD_DATE="1249386918">Collecteur inox zxr 750 Equipement Auto / Moto Haute Marne - leboncoin.fr</A>
<DT><A HREF="http://www.leboncoin.fr/vi/56412838.htm?ca=12_s" ADD_DATE="1249386945">Pot d&#39;échappement d&#39;origine Equipement Auto / Moto Rhône - leboncoin.fr</A>
<DT><A HREF="http://www.leboncoin.fr/vi/54955910.htm?ca=12_s" ADD_DATE="1249386990">Pieces GPZR Z RS DR CBR BO ZXR DT ZZR Equipement Auto / Moto Seine Maritime - leboncoin.fr</A>
<DT><A HREF="http://www.les7pechesdumotard.fr/Deroulement-du-demontage-de-la-ZXR,129.html" ADD_DATE="1272285743">Déroulement du démontage de la ZXR - Les sept péchés du motard</A>
</DL><p>
<DT><A HREF="http://www.moto-station.com/article6679.html" ADD_DATE="1251463555" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAmklEQVQ4jaWTQQ7FIAhEx6b30psVbsbN5m8+xhAkNp3ExAXzBkXBQmZGESGAuUSEZjZrkBnd5MU7EEk2ksRfqgoAGGOg945MrbW5NzNgTXVqpdjJ7clVaqVbVfE8z2uj6/piBoB0CtVYsZwfAK83YWYWw887iOk+sWNAbN1f4xFg9wqPANEc770EZLe+fqQSkCVH8xaQmXf/5AfCVDyrfwjDTQAAAABJRU5ErkJggg==">Pneu moto : Tout ce que vous avez toujours voulu savoir... - Moto Station</A>
</DL><p>

View File

@ -34,6 +34,34 @@ function fixdbus {
echo Dbus fixed OK
}
function resize {
# Get screen size
res=$(xdpyinfo | grep dimensions | awk '{print $2}')
tailleX=$(echo $res | awk -F "x" '{print $1}');
tailleY=$(echo $res | awk -F "x" '{print $2}');
# Get image size
res=$(identify -format '%w %h\n' $1)
imgX=$(echo $res | awk '{print $1}')
imgY=$(echo $res | awk '{print $2}')
echo "Original Image Size is X: $imgX, Y: $imgY"
# Calculate resize factor
rapX=$(($tailleX*1000/$imgX))
rapY=$(($tailleY*1000/$imgY))
echo "Screen Size is X: $tailleX, Y: $tailleY"
mult=0
div=0
if [ $rapX -gt $rapY ];
then
mult=$tailleX
div=$imgX
else
mult=$tailleY
div=$imgY
fi
res=$((($imgX*$mult)/$div))'x'$((($imgY*$mult)/$div))
echo "New size is $res"
`mogrify -resize $res $1`;
}
# please install libnotify-bin to popup notification
function notify {
@ -61,16 +89,24 @@ wget -O - http://www.bonjourmadame.fr | grep -Eo "(http://www.bonjourmadame.fr/p
echo Photo downloaded OK
ls $fileprefix* | sort -r | tail -n +2 | xargs rm -f
if [[ -e /usr/bin/identify ]]
then
resize $todaywp;
echo Photo Resize OK;
fi
fixdbus
if [[ -e /usr/bin/feh ]]
then
feh --bg-center $todaywp
fi
if [[ -e /usr/bin/xfconf-query ]]
then
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s $todaywp
elif [[ -e /usr/bin/feh ]]
then
feh --bg-scale $todaywp
elif [[ -e /usr/bin/gconftool-2 ]]
fi
if [[ -e /usr/bin/gconftool-2 ]]
then
gconftool-2 --type string --set /desktop/gnome/background/picture_filename $todaywp
fi