diff --git a/bashrc b/bashrc new file mode 100644 index 0000000..63fbeef --- /dev/null +++ b/bashrc @@ -0,0 +1,132 @@ +#####POUR PAS S'ECRIRE DESSUS +shopt -s checkwinsize + +#set -o vi +export EDITOR="vim" +#####ON DEFINIT LES COULEURS +red='\033[31m' +RED='\033[31m\033[01m' +blue='\033[34m' +BLUE='\033[34m' +cyan='\033[36m' +CYAN='\033[36m' +magenta='\033[35m' +DFT='\033[0m' +white='\033[37m' +#####ON DEFINIT LE TITRE DE LA FENETRE PAR LE REP EN COURS +case "$TERM" in +xterm*|rxvt*) + PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"' + ;; +*) + ;; +esac + + +#####ON MET LA COULEUR POUR ls +if [ "$TERM" != "dumb" ]; then + eval "`dircolors -b`" + alias ls='ls --color=auto' +fi + +#####LA COULEUR DU SHELL +#PS1="$RED\u$DFT$white@$magenta\h $DFT>>$CYAN\w $DFT" +#PS1="\u@\h >>\w " +#PS1="\[$RED\u$DFT$white@$magenta\h $DFT>>$CYAN\w $DFT\]" +#PS1="\[$RED\]\u\[$DFT$white\]@\[$magenta\]\h \[$DFT\]>>\[$CYAN\]\w \[$DFT\]" +#PROMPT_COMMAND='history -a;echo -en "\033[m\033[38;5;2m"$(( `sed -nu "s/MemFree:[\t ]\+\([0-9]\+\) kB/\1/p" /proc/meminfo`/1024))"\033[38;5;22m/"$((`sed -nu "s/MemTotal:[\t ]\+\([0-9]\+\) kB/\1/Ip" /proc/meminfo`/1024 ))MB"\t\033[m\033[38;5;55m$(< /proc/loadavg)\033[m"' + PS1='\[\e[0;36m\] \T \[\e[1;30m\][\[\e[1;34m\]\u@\H\[\e[1;30m\]\[\e[0;32m\]\[\e[1;30m\]] \[\e[1;37m\]\w\[\e[0;37m\] \n$ ' + + + +#####LES ALIAS UTILES +alias ..='cd ..' +alias rm='rm -i' +alias cp='cp -i' +alias mv='mv -i' +alias vm='mv -i' +alias df='df -khT' +alias free='free -m' +alias shred='shred -n 35 -z -u -v -f' +alias sl='ls' +alias la='ls -lah' +alias vf='cd' +alias xs='cd' +alias BSI2='cd ~/Documents/UniGE/BSI2*/' + +alias sudp='sudo' #fuck tpyos :p +alias sudpo='sudo' + +#alias pacman='pacman-color' +alias pacmacn='pacman' +#alias mkdir='mkdir $1; cd $1' +#alias mkdir='mkdir $0; cd $0' +alias ..='cd ..' +alias grep='grep --color' +alias b+='xbacklight -inc 10%' +alias b-='xbacklight -dec 10%' +alias svim='sudo vim' +alias bim='vim' +alias vi='vim' +alias gl='git log --graph --abbrev-commit --pretty=oneline --decorate' +alias gitst='git status' +#ou alors tig +alias poule='git pull' +alias makew='make' +#alias 'make celan'='make clean' + +export PYTHONPATH=/usr/local/lib/python2.7/dist-packages +export CC=clang + + +export DEVKITPRO=/opt/devkitpro +export DEVKITARM=$DEVKITPRO/devkitARM +export PATH=$PATH:$DEVKITARM/bin +export MANPATH=$MANPATH:$DEVKITARM/man + +#####LES FONCTIONS UTILES +#chope l'adresse IP publique +function IP() +{ +echo -e "TON IP: $RED" +wget -O - -q http://www.monip.net | grep -i "Your IP is" | awk '{print $4}' +echo -e "$DFT" +} + +function cd() +{ + if [ $# -eq 0 ]; then + builtin cd ~ && ls + else + builtin cd "$*" && ls + fi +} + +#change la couleur du load f(sa valeur) +function load { + Load=`cat /proc/loadavg | awk '{print $1}'` + IntLoad=`echo $Load | cut -f1 -d.` + if [ $IntLoad -le 0 ] ; then + LoadColor= + elif [ $IntLoad -le 1 ] ; then + LoadColor=$BLUE + elif [ $IntLoad -le 4 ] ; then + LoadColor=$RED + else + LoadColor=$DFT + fi + + echo -e " + [$LoadColor$Load$DFT] +" +} + + +function logs { + tail -f $1 | ccze -A +} + +function mkcd() { + mkdir -p "$@" + cd "$@" +} diff --git a/vimrc b/vimrc new file mode 100644 index 0000000..04e7f15 --- /dev/null +++ b/vimrc @@ -0,0 +1,118 @@ +" Ma conf vim - Frank + +"set grepprg=grep\ -nH\ $* +"let g:tex_flavor = "latex" + +syntax on + +"set nocompatible "fuck you !. impossible de backspace, sinon +"set backspace=indent,eol,start + +"set ruler +set number +set ts=8 "Un tab, huit espaces +set noexpandtab "On veut pas remplacer tab -> espace +"set mouse=a +set wrap "Une grande ligne continue à la ligne + +set hlsearch "On souligne les mots cherchés +set incsearch "recherche peu à peu +set ignorecase + +set foldmethod=marker + +"set cul "souligner la ligne actuelle + +color desert +"color darkblue +set cursorline +hi CursorLine term=bold cterm=bold guibg=Grey40 + +set showcmd "on affiche la commande qu'on écrit +set laststatus=2 +set statusline= +set statusline +=%5*%{&ff}%* "file format +set statusline +=%3*%y%* "file type +set statusline +=%4*\ %<%F%* "full path +set statusline +=%2*%m%* "modified flag +set statusline +=%1*%=%5l%* "current line +set statusline +=%2*/%L%* "total lines +set statusline +=%1*%4v\ %* "virtual column number +set statusline +=%2*0x%04B\ %* "character under cursor + +hi User1 guifg=#eea040 guibg=#222222 +hi User2 guifg=#dd3333 guibg=#222222 +hi User3 guifg=#ff66ff guibg=#222222 +hi User4 guifg=#a0ee40 guibg=#222222 +hi User5 guifg=#eeee40 guibg=#222222 + + +"filetype plugin indent on + +noremap <Up> "" +noremap! <Up> <Esc> +noremap <Down> "" +noremap! <Down> <Esc> +noremap <Left> "" +noremap! <Left> <Esc> +noremap <Right> "" +noremap! <Right> <Esc> + +noremap <S-Space> <Esc> + +noremap j gj +noremap k gk + +"inoremap { {}<Left> +"inoremap {<CR> {<CR>}<Esc>O +"inoremap {{ { +"inoremap /* /**/<Left><Left> +"inoremap /*<Space> /*<Space><Space>*/<Left><Left><Left> +"inoremap /*<CR> /*<CR> */<Esc>O +"inoremap // // +"ab #d #define +"ab #i #include +"inoremap #d #define<space> +"inoremap #in #include <.h><left><left><left> +"inoremap #i" #include ".h"<left><left><left> +"inoremap #i< #include <.h><left><left><left> +"inoremap #ifn #ifndef<space> + +cmap Q q + +"nnoremap . : + +set list +"set listchars=tab:▸\ +set listchars=tab:▸\ ,eol:¬ + +"inoremap jj <ESC> +"inoremap syso System.out.println +"Deux j en mode insert -> normal + +set history=500 +set undolevels=500 + +set title "titre du terminal + +set autoindent +autocmd CursorMoved * exe printf('match IncSearch /\V\<%s\>/', escape(expand('<cword>'), '/\')) + +"match ErrorMsg '\%>80v.\+' +"syntax match Search /\%<81v.\%>77v/ + + +autocmd BufWinEnter * call matchadd('ErrorMsg', '\%>80v.\+', -1) + + +"highlight OverLength ctermbg=red ctermfg=white guibg=#592929 +"match OverLength /\%81v.\+/ +"set cc=80 +"execute "set colorcolumn=" . join(range(81,335), ',') +"highlight ColorColumn guibg=#000000 +"highlight ColorColumn ctermbg=blue + + +"MAKEFILES +map <F5> :make +"TIPS : :copen :cclose :cw