From 855496fcaa271806c324a0c10f121e43d9942e15 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Fri, 6 Nov 2009 10:54:06 +0100 Subject: [PATCH 1/7] improve Openbox installation explanation --- Desktop | 7 ++++++- autostart.sh | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Desktop b/Desktop index 108b64a..b9cbcfb 100644 --- a/Desktop +++ b/Desktop @@ -1,9 +1,12 @@ NOWHERE=$PWD aptitude install openbox -svn checkout http://tint2.googlecode.com/svn/trunk/ tint2-read-only aptitude install libcairo2-dev libpango1.0-dev libglib2.0-dev libimlib2-dev libxinerama-dev #libxrand-dev +if [ ! -f ./tint2-read-only ]; then + svn checkout http://tint2.googlecode.com/svn/trunk/ tint2-read-only +fi + cd tint2-read-only ./configure make @@ -25,3 +28,5 @@ cp $NOWHERE/gmrunrc $HOME/.gmrunrc #install GSM-openboxTheme.obt dans openbox cp $NOWHERE/OpenBox-rx.xml $HOME/.config/openbox/rc.xml cp $NOWHERE/autostart.sh $HOME/.config/openbox/autostart.sh + +aptitude install network-manager-gnome diff --git a/autostart.sh b/autostart.sh index d37eefb..4b175bb 100644 --- a/autostart.sh +++ b/autostart.sh @@ -4,4 +4,5 @@ xchat & pidgin & evolution & conky & -/usr/lib/gnome-volume-manager/gnome-volume-manager --sm-disable +/usr/lib/gnome-volume-manager/gnome-volume-manager --sm-disable & +#nm-applet --sm-disable & From 878c56ed06535aac3853b8b4bfa25659b08eb88b Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Fri, 6 Nov 2009 10:57:06 +0100 Subject: [PATCH 2/7] Simple error correction --- Desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Desktop b/Desktop index ae51c09..6589dbf 100644 --- a/Desktop +++ b/Desktop @@ -3,7 +3,7 @@ NOWHERE=$PWD aptitude install openbox obconf obmenu aptitude install libcairo2-dev libpango1.0-dev libglib2.0-dev libimlib2-dev libxinerama-dev #libxrand-dev -if [ ! -f ./tint2-read-only ]; then +if [ ! -d ./tint2-read-only ]; then svn checkout http://tint2.googlecode.com/svn/trunk/ tint2-read-only fi From 6a4c2e7a3fc10f31d87e7742dfb6df745c21abe9 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Thu, 12 Nov 2009 14:10:26 +0100 Subject: [PATCH 3/7] add la alis in bashrc and translate (trans2fr trans2en) shutcurt in gmrun --- .zshrc | 1 + gmrunrc | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.zshrc b/.zshrc index a482f18..e038073 100644 --- a/.zshrc +++ b/.zshrc @@ -50,6 +50,7 @@ zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p 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 ' diff --git a/gmrunrc b/gmrunrc index 114ebb9..8e8e358 100644 --- a/gmrunrc +++ b/gmrunrc @@ -7,6 +7,8 @@ Left = 250 # My second firefox profile (made with `firefox -ProfileManager`) URL_ff =`/usr/bin/firefox` #type ff: URL_google = x-www-browser 'http://www.google.com.ph/search?q=%s' +URL_trans2fr = x-www-browser 'http://translate.google.fr/translate_t?hl=fr&ie=UTF-8&text=%s&sl=en&tl=fr#' +URL_trans2en = x-www-browser 'http://translate.google.fr/translate_t?hl=fr&ie=UTF-8&text=%s&sl=fr&tl=en#' Terminal = gnome-terminal #type ctrl-enter TermExec = gnome-terminal -e URL_http = /usr/bin/firefox %u From 285435eb48ed9ef69e36174ff1d3fd5de1aeea78 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Thu, 12 Nov 2009 16:09:34 +0100 Subject: [PATCH 4/7] add vimperator config file --- .vimperatorrc | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .vimperatorrc diff --git a/.vimperatorrc b/.vimperatorrc new file mode 100644 index 0000000..6ea28b2 --- /dev/null +++ b/.vimperatorrc @@ -0,0 +1,7 @@ +"2.1 (created: 2009/05/21 13:13:06) + +set guioptions=rbm +set runtimepath=/home/mathieu/.vimperator +source! /home/mathieu/.vimperatorrc.local + +" vim: set ft=vimperator: \ No newline at end of file From 0c55b23c1332dc9153fd6f31df47f6e538846ed8 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Fri, 13 Nov 2009 12:00:50 +0100 Subject: [PATCH 5/7] reorganize files. Add a script to link all .* files. Use .zsh directory --- .../openbox/OpenBox-rc.xml | 0 autostart.sh => .config/openbox/autostart.sh | 0 tint2rc => .config/tint2/tint2rc | 0 conkyrc => .conkyrc | 0 gmrunrc => .gmrunrc | 0 .vimrc | 432 ++++++++++++++++++ .zsh/00_basic.zsh | 75 +++ .zsh/host:kirkwood/Env.zsh | 38 ++ .zshrc | 208 ++++----- Desktop | 6 +- install_config.sh | 6 + 11 files changed, 650 insertions(+), 115 deletions(-) rename OpenBox-rc.xml => .config/openbox/OpenBox-rc.xml (100%) rename autostart.sh => .config/openbox/autostart.sh (100%) rename tint2rc => .config/tint2/tint2rc (100%) rename conkyrc => .conkyrc (100%) rename gmrunrc => .gmrunrc (100%) create mode 100644 .vimrc create mode 100644 .zsh/00_basic.zsh create mode 100644 .zsh/host:kirkwood/Env.zsh create mode 100644 install_config.sh diff --git a/OpenBox-rc.xml b/.config/openbox/OpenBox-rc.xml similarity index 100% rename from OpenBox-rc.xml rename to .config/openbox/OpenBox-rc.xml diff --git a/autostart.sh b/.config/openbox/autostart.sh similarity index 100% rename from autostart.sh rename to .config/openbox/autostart.sh diff --git a/tint2rc b/.config/tint2/tint2rc similarity index 100% rename from tint2rc rename to .config/tint2/tint2rc diff --git a/conkyrc b/.conkyrc similarity index 100% rename from conkyrc rename to .conkyrc diff --git a/gmrunrc b/.gmrunrc similarity index 100% rename from gmrunrc rename to .gmrunrc diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..3739df5 --- /dev/null +++ b/.vimrc @@ -0,0 +1,432 @@ +""""""""""""" +" SHORTCUTS " +""""""""""""" +" F1 help +" F2 open file +" F3 search +" F4 open include file +" F5 go to declaration +" F6 go to definition +" F7 go to calls +" F8 view tag list +" S-F8 build ctags/cscope databases +" F9 view changes +" F10 folding ? +" F11 unhighlight search +" F12 paste mode +" C-left/right switch tab +" C-up/down switch window +" M-left/right horizontal size +" M-up/down vertical size + +""""""""""" +" GENERAL " +""""""""""" +" disable vi-compatible mode +set nocompatible + +"""""""" +" SAVE " +"""""""" +" disable backup +set nobackup +" save before compilation +set autowrite +" jump to last known position when reopening a file +if has("autocmd") + autocmd BufReadPost * + \ if line("'\"") > 0 && line("'\"") <= line("$") | + \ execute "normal! g`\"" | + \ endif +endif +" command line history +set history=50 + +""""""""" +" INPUT " +""""""""" +" allow backspacing in insert mode +set backspace=indent,eol,start +" don't use Ex mode, use Q for formatting +map Q gq +" disable mouse +set mouse=a +" key combination timeout +set notimeout +"set timeoutlen=4000 +" set timeout for multicharacter keys codes (like ) +set ttimeout +" set timeout to tenth of a second (could be increased for slow terminals) +set ttimeoutlen=100 +" key event timeout +set updatetime=1000 + +""""""""""" +" DISPLAY " +""""""""""" +" color palette +set t_Co=256 +" syntax highlighting when the terminal has colors +if &t_Co > 2 || has("gui_running") + syntax on + " my colors + set background=dark + highlight clear + if exists("syntax_on") + syntax reset + endif +if &t_Co == 256 + highlight! Normal ctermfg=77 ctermbg=Black + highlight! Statement ctermfg=254 ctermbg=Black + highlight! Comment ctermfg=191 ctermbg=Black + highlight! PreProc ctermfg=200 ctermbg=Black +else + highlight! Normal ctermfg=Green ctermbg=Black + highlight! Statement ctermfg=White ctermbg=Black + highlight! Comment ctermfg=Yellow ctermbg=Black + highlight! PreProc ctermfg=Magenta ctermbg=Black +endif + highlight! Constant ctermfg=Red ctermbg=Black + highlight! def link Structure Statement + highlight! def link StorageClass Statement + highlight! Type ctermfg=Grey ctermbg=Black + highlight! def link Identifier Type + highlight! Todo ctermfg=Black ctermbg=DarkRed + highlight! Search ctermfg=Black ctermbg=Yellow + highlight! def link IncSearch Visual +if &t_Co == 256 + highlight! DiffAdd ctermbg=54 cterm=none + highlight! DiffDelete ctermfg=Black ctermbg=54 cterm=none +else + highlight! DiffAdd ctermbg=DarkMagenta cterm=none + highlight! DiffDelete ctermfg=Black ctermbg=DarkMagenta cterm=none +endif + highlight! def link DiffChange DiffAdd + highlight! DiffText ctermfg=White ctermbg=DarkBlue cterm=none + highlight! def link Folded TabLineSel + highlight! def link FoldColumn Folded + highlight! MatchParen ctermbg=Blue +if &t_Co == 256 + highlight! BadWhitespace ctermbg=235 +elseif &t_Co > 8 + highlight! BadWhitespace ctermbg=DarkGrey +else + highlight! BadWhitespace ctermbg=DarkCyan +endif + highlight! Pmenu ctermfg=Grey ctermbg=DarkBlue +if &t_Co > 8 + highlight! PmenuSel ctermfg=Yellow ctermbg=Blue +else + highlight! PmenuSel ctermfg=Yellow ctermbg=Cyan +endif + highlight! def link PmenuSbar Pmenu + highlight! PmenuThumb ctermbg=DarkMagenta cterm=none +if &t_Co == 256 + highlight! LineNr ctermfg=DarkCyan ctermbg=235 + highlight! CursorLine ctermbg=236 cterm=none +else + highlight! LineNr ctermfg=DarkCyan ctermbg=Black + highlight! CursorLine ctermbg=DarkGrey cterm=none +endif + highlight! def link CursorColumn CursorLine + highlight! Visual ctermfg=White ctermbg=Blue cterm=none + highlight! VertSplit ctermfg=Grey ctermbg=Grey cterm=none + highlight! StatusLine ctermfg=Black ctermbg=Grey cterm=none +if &t_Co > 8 + highlight! StatusLineNC ctermfg=DarkGrey ctermbg=Grey cterm=none +else + highlight! StatusLineNC ctermfg=Cyan ctermbg=Grey cterm=none +endif + highlight! def link TabLine StatusLineNC + highlight! def link TabLineFill TabLine +if &t_Co == 256 + highlight! TabLineSel ctermfg=White ctermbg=235 cterm=none +elseif &t_Co > 8 + highlight! TabLineSel ctermfg=White ctermbg=Black cterm=none +else + highlight! TabLineSel ctermfg=White ctermbg=Black +endif + highlight! ModeMsg ctermfg=DarkCyan ctermbg=Black + highlight! WarningMsg ctermfg=Yellow ctermbg=Black + highlight! ErrorMsg ctermfg=Red ctermbg=Black +endif +" highlight the cursor line +set cursorline +" show the status line +set laststatus=2 +" show the cursor position +set ruler +" show mode +set showmode +" display incomplete commands +set showcmd +" display line number" +set number + +""""""""""""""" +" INDENTATION " +""""""""""""""" +if has("autocmd") + " enable file type detection and do language-dependent indenting + filetype plugin indent on +else + " auto-indent + set autoindent + " smart-indent + set smartindent + " C-indent + "set cindent + " indent-expr + "set indentexpr "" +endif +" tab=4 +set tabstop=4 +set softtabstop=4 +set shiftwidth=4 +" real tabs +set noexpandtab +" use tabs at the start of a line, spaces elsewhere +set smarttab +if has("autocmd") + " python + " autocmd FileType python set tabstop=4|set shiftwidth=4|set expandtab + autocmd BufRead,BufNewFile *.py syntax on + autocmd BufRead,BufNewFile *.py set ai + autocmd BufRead,BufNewFile *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class + set tabstop=4 + set expandtab + set shiftwidth=4 + set softtabstop=4 + set modeline + +endif +" define whitespaces at end of line as bad whitespaces +match BadWhitespace /\s\+$/ +" define extra spaces at the front of the line as bad whitespaces +match BadWhitespace /^\ \+/ +" define redundant whitespaces as bad whitespaces +match BadWhitespace /\s\+$\| \+\ze\t/ + +"""""""""" +" SEARCH " +"""""""""" +" highlight search +set hlsearch +" unhighlight current search +map :nohlsearch +imap a +" highlight search while typing +set incsearch +" show matching brackets +set showmatch +" tenths of a second before blink matching brackets +set mat=5 +" search word and list lines to jump with F3 +map [I:let nr = input("Which one: ") execute "normal " . nr ."[\t" +" go to declaration with F5 +map gd:nohlsearch +imap i +" try to go to definition or declaration with , and go back with ; +function GoToDefinition() + try + execute "cscope find g " . expand("") + catch /:E259:/ + try + execute "tag " . expand("") + catch /:E257:/ + execute "normal! gd" + execute "nohlsearch" + endtry + endtry +endfunction +nmap , :call GoToDefinition() +nmap ; +" plugin taglist +let Tlist_Ctags_Cmd = '/usr/bin/ctags' +let Tlist_Process_File_Always = 1 +let Tlist_Exit_OnlyWindow = 1 +"let Tlist_Close_On_Select = 1 +let Tlist_Auto_Highlight_Tag = 1 +let Tlist_Display_Prototype = 0 +let Tlist_Display_Tag_Scope = 0 +let Tlist_Show_One_File = 1 +let Tlist_Compact_Format = 1 +let Tlist_Enable_Fold_Column = 0 +"let Tlist_File_Fold_Auto_Close = 1 +let Tlist_Inc_Winwidth = 0 +"let Tlist_Use_Horiz_Window = 1 +let Tlist_Use_Right_Window = 1 +" open/close tag list window with F8 +map :TlistToggle +" shown current tag in status bar +set statusline=%<%f\ %h%m%r%=%([%{Tlist_Get_Tagname_By_Line()}]%)%3.(\ %)%-14.(%l,%c%V%)\ %P +" plugin omnicppcomplete +let OmniCpp_ShowAccess = 0 +let OmniCpp_LocalSearchDecl=1 +" if compiled with --enable-cscope +if has("cscope") + " use both cscope and ctag for 'ctrl-]', ':ta', and 'vim -t' + set cscopetag + " use ctags before cscope + set csto=1 + " add any cscope database in current directory + if filereadable("cscope.out") + cscope add cscope.out + " else add the database pointed by environment variable + elseif $CSCOPE_DB != "" + cscope add $CSCOPE_DB + endif + " show message when any other cscope db added + set cscopeverbose + " open include file with F4 and split with shift+F4 + nmap :cscope find f =expand("") + nmap :scscope find f =expand("") + " go to definition with F6 and split with shift+F6 and use ctags with alt+shift+F6 + nmap :cscope find g =expand("") + nmap :scscope find g =expand("") + nmap :tag =expand("") + " go to calls with F7 and split with shift+F7 + nmap :cscope find c =expand("") + nmap :scscope find c =expand("") + " go to ... with 'ctrl+s letter' and go back with ctrl+t + nmap s :cscope find s =expand("") + nmap g :cscope find g =expand("") + nmap c :cscope find c =expand("") + nmap t :cscope find t =expand("") + nmap e :cscope find e =expand("") + nmap f :cscope find f =expand("") + nmap i :cscope find i ^=expand("")$ + nmap d :cscope find d =expand("") + " split to ... with 'ctrl+space letter' + nmap s :scscope find s =expand("") + nmap g :scscope find g =expand("") + nmap c :scscope find c =expand("") + nmap t :scscope find t =expand("") + nmap e :scscope find e =expand("") + nmap f :scscope find f =expand("") + nmap i :scscope find i ^=expand("")$ + nmap d :scscope find d =expand("") + " vertical split to ... with 'ctrl+space ctrl+space letter' + nmap s :vertical scscope find s =expand("") + nmap g :vertical scscope find g =expand("") + nmap c :vertical scscope find c =expand("") + nmap t :vertical scscope find t =expand("") + nmap e :vertical scscope find e =expand("") + nmap f :vertical scscope find f =expand("") + nmap i :vertical scscope find i ^=expand("")$ + nmap d :vertical scscope find d =expand("") + " s symbol find all references to the token under cursor + " g global find global definition of the token under cursor + " c calls find all calls to the function name under cursor + " t text find all instances of the text under cursor + " e egrep egrep search for the word under cursor + " f file open the filename under cursor + " 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 :TagsBuild:cscope reset +else + command! TagsBuild + \ :!echo "building ctags database..." && + \ ctags --c++-kinds=+p --fields=+iaS --extra=+q -R + map :TagsBuild +endif +" close preview window after a completion +if has("autocmd") + autocmd CursorMovedI *.{[hc],cpp} if pumvisible() == 0|pclose|endif + autocmd InsertLeave *.{[hc],cpp} if pumvisible() == 0|pclose|endif +endif + +""""""""" +" PASTE " +""""""""" +" set/unset paste mode with F12/shift+F12 +map :set paste +map :set nopaste +imap :set paste +imap +set pastetoggle= +" paste with reindent with Esc prefix +nnoremap P P'[v']= +nnoremap p p'[v']= + +"""""""""" +" WINDOW " +"""""""""" +" create window below or at right of the current one +set splitbelow +set splitright +" if multiple windows +if bufwinnr(1) + " vertically increase/decrease window size with alt+up/alt+down + map + + map - + imap a + imap a + " horizontally increase/decrease window size with alt+right/alt+left + map > + map < + imap a + imap a + " switch to next/previous tab with ctrl+right/ctrl+left + map gt + map gT + imap a + imap a + " switch to next/previous window with ctrl+down/ctrl+up + map w + map W + imap a + imap a +endif +" open automatically quickfix window +if has("autocmd") + autocmd QuickFixCmdPost * cw +endif +" open a file in the same directory as the current file with F2 and split with shift+F2 +map :tabe =expand("%:h") . "/" +nmap :split =expand("%:h") . "/" + +"""""""" +" HELP " +"""""""" +" allow embedded man page +runtime! ftplugin/man.vim +" show vimrc with shift+F1 +nmap :sview ~/.vimrcgg +imap +" show contextual help with F1 +function Help() + try + execute "Man " . expand("") + catch /:E149:/ + execute "help " . expand("") + endtry +endfunction +nmap :call Help() +imap +" show VIM help with alt+shift+F1 +nmap :help =expand("") +imap + +""""""""" +" TOOLS " +""""""""" +" show current changes with F9 +command! DiffOrig + \ vert new | set bt=nofile | r # | 0d_ | diffthis | wincmd p | diffthis +map :DiffOrig +imap a +" show git diff when committing +let g:git_diff_spawn_mode = 1 +if has("autocmd") + autocmd BufRead,BufNewFile COMMIT_EDITMSG setf git +endif + + diff --git a/.zsh/00_basic.zsh b/.zsh/00_basic.zsh new file mode 100644 index 0000000..a9dab3b --- /dev/null +++ b/.zsh/00_basic.zsh @@ -0,0 +1,75 @@ +# Lines configured by zsh-newuser-install +HISTFILE=~/.histfile +HISTSIZE=1000 +SAVEHIST=1000 +export HISTTIMEFORMAT="%h/%d - %H:%M:%S " +export HISTCONTROL=”ignoredups” +#export HISTIGNORE=”&:ls:[bf]g:exit” +setopt -h histappend +PROMPT_COMMAND='history -a' + +setopt appendhistory autocd extendedglob nomatch +unsetopt beep +#bindkey -v +# End of lines configured by zsh-newuser-install +# The following lines were added by compinstall +zstyle :compinstall filename '/home/mmaret/.zshrc' + +autoload -Uz compinit +compinit +# End of lines added by compinstall + +# Add autocompletion for sudo when command is not in $PATH +zstyle ':completion:*:sudo:*' command-path /usr/local/sbin /usr/local/bin \ + /usr/sbin /usr/bin /sbin /bin /usr/X11R6/bin + +# Completion for bash fonctions +autoload -U bashcompinit +bashcompinit + +# Correct for wrong command like sl +# setopt correctall + +# Activate Prompt +autoload -U promptinit +promptinit +prompt bart green red + +# Crée un cache des complétion possibles +# très utile pour les complétion qui demandent beaucoup de temps +# comme la recherche d'un paquet aptitude install moz +zstyle ':completion:*' use-cache on +zstyle ':completion:*' cache-path ~/.zsh_cache + + +# des couleurs pour la complétion +# faites un kill -9 pour voir :) +zmodload zsh/complist +setopt extendedglob +zstyle ':completion:*:*:kill:*:processes' list-colors "=(#b) #([0-9]#)*=36=31" + +#menu pour la completion +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 ' + +#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 +zsh-mime-setup + diff --git a/.zsh/host:kirkwood/Env.zsh b/.zsh/host:kirkwood/Env.zsh new file mode 100644 index 0000000..3eb242d --- /dev/null +++ b/.zsh/host:kirkwood/Env.zsh @@ -0,0 +1,38 @@ +#export http_proxy="http://grp-horus:3128" +#export https_proxy="http://grp-horus:3128" +#export ftp_proxy="http://grp-horus:3128" + +#Java And Android Env +export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.12 +export ANDROID_HOME=/home/mathieu/Android/android-sdk-linux_x86-1.5_r2 +export PATH=$JAVA_HOME/bin/:$ANDROID_HOME/tools:$PATH + +#Perso Bin +export PATH=$HOME/bin/bin:$HOME/bin:$PATH + +# BitBake Env +export OEBASE=/home/mathieu/OpenEmbedded +export BBPATH=$OEBASE/build:$OEBASE/openembedded +export PATH=$OEBASE/bitbake/bin:$PATH + +# Scratchbox +export PATH=/home/mathieu/bin/sb2/bin:$PATH + + +#emacsAndViKeys +#bindkey -v +#bindkey "^P" vi-up-line-or-history +#bindkey "^N" vi-down-line-or-history +# +#bindkey "^[[1~" vi-beginning-of-line # Home +#bindkey "^[[4~" vi-end-of-line # End +#bindkey '^[[2~' beep # Insert +#bindkey '^[[3~' delete-char # Del +#bindkey '^[[5~' vi-backward-blank-word # Page Up +#bindkey '^[[6~' vi-forward-blank-word # Page Down + + +# make ctrl-r working +#bindkey -M viins '^r' history-incremental-search-backward +#bindkey -M vicmd '^r' history-incremental-search-backward + diff --git a/.zshrc b/.zshrc index e038073..ba6afe6 100644 --- a/.zshrc +++ b/.zshrc @@ -1,113 +1,101 @@ -# Lines configured by zsh-newuser-install -HISTFILE=~/.histfile -HISTSIZE=1000 -SAVEHIST=1000 -setopt appendhistory autocd extendedglob nomatch -unsetopt beep -#bindkey -v -# End of lines configured by zsh-newuser-install -# The following lines were added by compinstall -zstyle :compinstall filename '/home/mmaret/.zshrc' - -autoload -Uz compinit -compinit -# End of lines added by compinstall - -# Add autocompletion for sudo when command is not in $PATH -zstyle ':completion:*:sudo:*' command-path /usr/local/sbin /usr/local/bin \ - /usr/sbin /usr/bin /sbin /bin /usr/X11R6/bin - -# Completion for bash fonctions -autoload -U bashcompinit -bashcompinit - -# Correct for wrong command like sl -# setopt correctall - -# Activate Prompt -autoload -U promptinit -promptinit -prompt bart green red - -# Crée un cache des complétion possibles -# très utile pour les complétion qui demandent beaucoup de temps -# comme la recherche d'un paquet aptitude install moz -zstyle ':completion:*' use-cache on -zstyle ':completion:*' cache-path ~/.zsh_cache - - -# des couleurs pour la complétion -# faites un kill -9 pour voir :) -zmodload zsh/complist -setopt extendedglob -zstyle ':completion:*:*:kill:*:processes' list-colors "=(#b) #([0-9]#)*=36=31" - -#menu pour la completion -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 ' - -#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 -#export http_proxy="http://grp-horus:3128" -#export https_proxy="http://grp-horus:3128" -#export ftp_proxy="http://grp-horus:3128" - -#Java And Android Env -export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.12 -export ANDROID_HOME=/home/mathieu/Android/android-sdk-linux_x86-1.5_r2 -export PATH=$JAVA_HOME/bin/:$ANDROID_HOME/tools:$PATH - -#Perso Bin -export PATH=$HOME/bin/bin:$HOME/bin:$PATH - -# BitBake Env -export OEBASE=/home/mathieu/OpenEmbedded -export BBPATH=$OEBASE/build:$OEBASE/openembedded -export PATH=$OEBASE/bitbake/bin:$PATH - -# Scratchbox -export PATH=/home/mathieu/bin/sb2/bin:$PATH - - - - - -# support des type mimes -> ./toto.pdf -autoload -U zsh-mime-setup -autoload -U zsh-mime-handler -zsh-mime-setup - -#emacsAndViKeys -#bindkey -v -#bindkey "^P" vi-up-line-or-history -#bindkey "^N" vi-down-line-or-history -# -#bindkey "^[[1~" vi-beginning-of-line # Home -#bindkey "^[[4~" vi-end-of-line # End -#bindkey '^[[2~' beep # Insert -#bindkey '^[[3~' delete-char # Del -#bindkey '^[[5~' vi-backward-blank-word # Page Up -#bindkey '^[[6~' vi-forward-blank-word # Page Down - - -# make ctrl-r working -#bindkey -M viins '^r' history-incremental-search-backward -#bindkey -M vicmd '^r' history-incremental-search-backward - # ZEN support. dl http://svn.asyd.net/svn/zsh/tags/zen/0.2/bootstrap/bootstrap.zsh then execute it # -export HISTTIMEFORMAT="%h/%d - %H:%M:%S " +## +## THIS FILE IS NOT INTENDED TO BE MODIFIED ! READ ABOVE... +## +# +# Instead, add/edit your configuration files inside $ZDOTDIR. +# +# If you want to add a file, name it specifically in the form +# +# $ZDOTDIR/??_*.zsh +# +# Where "??" should be a two-digit number. +# With that, file ``10_Toto.zsh'' would be parsed before +# file ``20_Tutu.zsh'', allowing you ordering your scripts. +# +# If you want to make user, host or network specific configurations, +# add your specific scripts to the folders +# - "sys:$(uname -s)" for OS-specific conf, +# - "user:$(whoami)" for user-specific conf, +# - "host:$(hostname -s)" for host-specific conf, +# - "net:$(domainname)" for network-specific conf, +# rename your scripts to the form mentionned above, minus the "??_" +# prefix. An original script prefixed by a two-digits number SHOULD +# be present on the $ZDOTDIR folder, even if empty. +# + +ZDOTDIR=${ZDOTDIR:-~/.zsh} +mkdir -p $ZDOTDIR + +# Useful environment variables which may be used +# at any time - We compute them now to avoid calling +# the required processes each time we'll need. +OSNAME=`uname -s` +USER=${USER:-`whoami`} +UID=${UID:-`id -u`} +HOST=$HOST:r +HOST=${HOST:-$(hostname -s)} +DOMAIN=${DOMAIN:-$(hostname -a | sed 's/^[^\.]*\.\?//')} +DOMAIN=${DOMAIN:-$(hostname -d 2>&-)} +DOMAIN=${DOMAIN:-$(hostname -y 2>&-)} +[ "$DOMAIN" = "" -o "$DOMAIN" = "localdomain" -o "$DOMAIN" = "(none)" ] && DOMAIN=$(grep "^search " /etc/resolv.conf | cut -d' ' -f2) + +DEBUG=${DEBUG:-no} + +export USER HOST DOMAIN UID + +if [ -d $ZDOTDIR ]; then + for script in $ZDOTDIR/??_*.zsh + do + + [ "$DEBUG" = "yes" ] && echo -n "${${script:t:r}/??_/}... " + source $script + [ "$DEBUG" = "yes" ] && echo + + for i in "net:$DOMAIN"\ + "host:$HOST"\ + "sys:$OSNAME"\ + "user:$USER"\ + "user:$SUDO_USER"\ + "net:$DOMAIN/host:$HOST"\ + "net:$DOMAIN/sys:$OSNAME"\ + "net:$DOMAIN/user:$USER"\ + "net:$DOMAIN/user:$SUDO_USER"\ + "net:$DOMAIN/host:$HOST/sys:$OSNAME"\ + "net:$DOMAIN/host:$HOST/user:$USER"\ + "net:$DOMAIN/host:$HOST/user:$SUDO_USER"\ + "net:$DOMAIN/host:$HOST/sys:$OSNAME"\ + "net:$DOMAIN/host:$HOST/sys:$OSNAME/user:$USER"\ + "net:$DOMAIN/host:$HOST/sys:$OSNAME/user:$SUDO_USER"\ + "host:$HOST/sys:$OSNAME"\ + "host:$HOST/user:$USER"\ + "host:$HOST/user:$SUDO_USER"\ + "host:$HOST/sys:$OSNAME/user:$USER"\ + "host:$HOST/sys:$OSNAME/user:$SUDO_USER" + do + specific_script=${script:h}/$i/${${script:t}/??_/} + if test -f $specific_script + then + [ "$DEBUG" = "yes" ] && echo -n "$i/${${specific_script:t:r}/??_/}... "; + source $specific_script + [ "$DEBUG" = "yes" ] && echo + fi + if test -f $specific_script.gpg + then + [ "$DEBUG" = "yes" ] && echo -n "$i/${${specific_script:t:r}/??_/} [CRYPTED]... "; + eval $(gpg --decrypt $specific_script.gpg) + [ "$DEBUG" = "yes" ] && echo + fi + done + done +fi + +# For sudo shells +if [ ! -z "$SUDO_USER" ] +then + export HOME=~$USER + [ "`pwd`" = ~$SUDO_USER ] && cd +fi + diff --git a/Desktop b/Desktop index 6589dbf..d9b6ff6 100644 --- a/Desktop +++ b/Desktop @@ -13,8 +13,7 @@ cd tint2-read-only make make install -mkdir $HOME/.config/tint2/tint2rc -ln -s $NOWHERE/tint2rc $HOME/.config/tint2/tint2rc +ln -s $NOWHERE/.config $HOME/.config #CONKY @@ -28,7 +27,4 @@ ln -s $NOWHERE/gmrunrc $HOME/.gmrunrc #Config openbox #install GSM-openboxTheme.obt dans openbox -mkdir ~/.config/openbox -ln -s $NOWHERE/OpenBox-rc.xml $HOME/.config/openbox/rc.xml -ln -s $NOWHERE/autostart.sh $HOME/.config/openbox/autostart.sh aptitude install network-manager-gnome diff --git a/install_config.sh b/install_config.sh new file mode 100644 index 0000000..3931034 --- /dev/null +++ b/install_config.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +for i in $(ls -lA| awk '{print $9}'| grep -e "^\.") + do + echo "ln -s $PWD/$i $HOME/$i" + done From 92e4d6db41fc991835bc2a4b521fd7c5906aae5b Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Fri, 13 Nov 2009 12:01:32 +0100 Subject: [PATCH 6/7] rename openbox conf file --- .config/openbox/{OpenBox-rc.xml => rc.xml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .config/openbox/{OpenBox-rc.xml => rc.xml} (100%) diff --git a/.config/openbox/OpenBox-rc.xml b/.config/openbox/rc.xml similarity index 100% rename from .config/openbox/OpenBox-rc.xml rename to .config/openbox/rc.xml From 0cbf9e9e0435fe3a02a390144f71fc524f1073ac Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Fri, 13 Nov 2009 16:22:30 +0100 Subject: [PATCH 7/7] correctly set .zsh files --- .zsh/10_Environment.zsh | 0 .zsh/host:kirkwood/{Env.zsh => Environment.zsh} | 6 ++++-- .zshrc | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 .zsh/10_Environment.zsh rename .zsh/host:kirkwood/{Env.zsh => Environment.zsh} (77%) mode change 100644 => 100755 diff --git a/.zsh/10_Environment.zsh b/.zsh/10_Environment.zsh new file mode 100644 index 0000000..e69de29 diff --git a/.zsh/host:kirkwood/Env.zsh b/.zsh/host:kirkwood/Environment.zsh old mode 100644 new mode 100755 similarity index 77% rename from .zsh/host:kirkwood/Env.zsh rename to .zsh/host:kirkwood/Environment.zsh index 3eb242d..e60e107 --- a/.zsh/host:kirkwood/Env.zsh +++ b/.zsh/host:kirkwood/Environment.zsh @@ -4,8 +4,10 @@ #Java And Android Env export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.12 -export ANDROID_HOME=/home/mathieu/Android/android-sdk-linux_x86-1.5_r2 -export PATH=$JAVA_HOME/bin/:$ANDROID_HOME/tools:$PATH +export ANDROID_HOME=/home/mathieu/Android/android-sdk-linux +export ANDROID_SKD=/home/mathieu/Android/android-sdk-linux/platforms/android-1.6/ +export ECLIPSE_HOME=/home/mathieu/Eclipse/eclipse-modeling-galileo +export PATH=$JAVA_HOME/bin/:$ANDROID_HOME/tools:$ANDROID_SKD/tools:$ECLIPSE_HOME:$PATH #Perso Bin export PATH=$HOME/bin/bin:$HOME/bin:$PATH diff --git a/.zshrc b/.zshrc index ba6afe6..06073a0 100644 --- a/.zshrc +++ b/.zshrc @@ -76,7 +76,7 @@ if [ -d $ZDOTDIR ]; then "host:$HOST/sys:$OSNAME/user:$SUDO_USER" do specific_script=${script:h}/$i/${${script:t}/??_/} - if test -f $specific_script + if test -e $specific_script then [ "$DEBUG" = "yes" ] && echo -n "$i/${${specific_script:t:r}/??_/}... "; source $specific_script