Merge branch 'master' of vi-di.fr:dotfiles

This commit is contained in:
Frank Villaro-Dixon (frank_mail) 2015-02-25 10:38:36 +01:00
commit ab43ca7a2c
25 changed files with 867 additions and 85 deletions

1
TO_INSTALL Normal file
View file

@ -0,0 +1 @@
xbindkeysrc

32
Utils/BTC_stats.sh Executable file
View file

@ -0,0 +1,32 @@
#!/bin/bash
file=/dev/shm/btc_stats
fileURL=http://api.bitcoincharts.com/v1/weighted_prices.json
function update_file {
wget --quiet $fileURL -O $file
#echo WILL_WGET
}
if [ -s $file ]; then
#update if older than 1h
age=`stat -c %Y $file`;
now=`date +%s`;
diff=$(($now - $age));
if [ $diff -gt 3600 ]; then
update_file & #Do not hang the result
fi;
#Fucking ugly, but works
content=`cat $file | python -mjson.tool | grep -A3 EUR | tail -n3 | cut -d':' -f2 | cut -d'"' -f2`;
p24h=`echo "$content" | sed -n 1p | cut -d. -f1`
p7d=`echo "$content" | sed -n 3p`
p30d=`echo "$content" | sed -n 2p`
graph=`sparklines $p30d $p7d $p24h`
echo $graph [$p24h] #dont want sparklines newline
else
update_file & #Will surely wait for iface
fi

211
Utils/fix-htmldoc-utf8 Executable file
View file

@ -0,0 +1,211 @@
#!/usr/bin/env python2
# coding: utf-8
#
# Name : fix-htmldoc-utf8
# Summary: Program to fix UTF-8 characters that HTMLDOC has messed
# Author : Aurelio Jargas www.aurelio.net/soft
# License: BSD
# Release: April, 2008
#
# HTMLDOC has no Unicode support, so when you try to use it in a UTF-8 file,
# all the special characters (not ASCII) will be incorrect in the resulting HTML.
# This program fixes this, restoring the original UTF-8 characters.
#
# Just use it as a filter (reads STDIN, results to STDOUT) or use the -w option
# fix the file in place.
#
# Examples:
# cat myfile.html | fix-htmldoc-utf8 > myfile-ok.html
# fix-htmldoc-utf8 myfile.html > myfile-ok.html
# fix-htmldoc-utf8 -w myfile.html
#
import sys
# You can add new chars to this mapping, if needed.
# The first set are the ISO-8859-1 extended chars.
# The second set are the Unicode chars I've found on my keyboard.
#
mapping = """
¡ ¡
¢ ¢
£ £
¤ ¤
¥ Â¥
¦ ¦
§ §
¨ ¨
© ©
ª ª
« «
¬ ¬
® ®
¯ ¯
° °
± ±
² ²
³ ³
´ ´
µ Âμ
¶ ¶
· ·
¸ ¸
¹ ¹
º º
» »
¼ ¼
½ ½
¾ ¾
¿ ¿
À Ã\x80
Á Ã\x81
 Ã\x82
à Ã\x83
Ä Ã\x84
Å Ã\x85
Æ Ã\x86
Ç Ã\x87
È Ã\x88
É Ã\x89
Ê Ã\x8a
Ë Ã\x8b
Ì Ã\x8c
Í Ã\x8d
Î Ã\x8e
Ï Ã\x8f
Ð Ã\x90
Ñ Ã\x91
Ò Ã\x92
Ó Ã\x93
Ô Ã\x94
Õ Ã\x95
Ö Ã\x96
× Ã\x97
Ø Ã\x98
Ù Ã\x99
Ú Ã\x9a
Û Ã\x9b
Ü Ã\x9c
Ý Ã\x9d
Þ Ã\x9e
ß Ã\x9f
à à
á á
â â
ã ã
ä ä
å Ã¥
æ æ
ç ç
è è
é é
ê ê
ë ë
ì ì
í í
î î
ï ï
ð ð
ñ ñ
ò ò
ó ó
ô ô
õ Ãμ
ö ö
÷ ÷
ø ø
ù ù
ú ú
û û
ü ü
ý ý
þ þ
ÿ ÿ
 
™ â\x84¢
€ â\x82¬
æ æ
Œ Å\x92
≤ â\x89¤
≠ â\x89 
≥ â\x89¥
fi ï¬\x81
fl ï¬\x82
∞ â\x88\x9e
• â\x80¢
â\x81\x84
≈ â\x89\x88
◊ â\x97\x8a
∑ â\x88\x91
∏ â\x88\x8f
π Ï\x80
∂ â\x88\x82
∆ â\x88\x86
ƒ Æ\x92
Ω Î©
√ â\x88\x9a
∫ â\x88«
† â\x80 
‡ â\x80¡
ı ı
â\x80º
˚ Ë\x9a
˙ Ë\x99
ˇ Ë\x87
˝ Ë\x9d
˛ Ë\x9b
â\x80\x98
â\x80\x99
â\x80\x9a
“ â\x80\x9c
” â\x80\x9d
„ â\x80\x9e
… â\x80¦
— â\x80\x94
â\x80\x93
CHARSET=utf-8 CHARSET=iso-8859-1
CHARSET=utf-8 CHARSET=iso-iso-8859-1
"""
# Just a standard search & replace
def fixit(text):
for pair in mapping.split('\n'):
if not pair: continue
repl, patt = pair.split('\t')
text = text.replace(patt.strip(), repl.strip())
return text
# User wants to save the file in place or not?
write_file = False
if len(sys.argv) > 1 and sys.argv[1] == '-w':
write_file = True
sys.argv.pop(1)
# The input files (if any)
files = sys.argv[1:]
if files:
# Fix input files one by one
for this_file in files:
try:
# Read and fix
f = open(this_file, 'r')
fixed = fixit(f.read())
f.close()
# Save the file or show on STDOUT
if write_file:
f = open(this_file, 'w')
f.write(fixed)
f.close()
print "Fixed", this_file
else:
print fixed,
except:
print "Error fixing", this_file
sys.exit(1)
else:
# No input file, read from STDIN and send results to STDOUT
print fixit(sys.stdin.read()),

View file

@ -43,7 +43,7 @@ while true; do
echo "lt 56"
REFRESH=5
elif [ $TEMP -lt 66 ]; then
set_fan 2
set_fan 3
echo "lt 66"
REFRESH=4
elif [ $TEMP -lt 70 ]; then

View file

@ -34,18 +34,20 @@ case $1 in
;;
"audio")
#so that '$0 refresh' will be up2date (song didn't change after)
mpc_cmd='mpc --wait'
case $2 in
"toggle")
mpc toggle
$mpc_cmd toggle
;;
"pause")
mpc pause
$mpc_cmd pause
;;
"next")
mpc next
$mpc_cmd next
;;
"prev")
mpc prev
$mpc_cmd prev
;;
esac
$0 refresh
@ -92,6 +94,7 @@ case $1 in
--output $VGA --auto --same-as $LVDS
;;
"off")
sleep 0.1
xset dpms force off
;;
esac
@ -99,26 +102,32 @@ case $1 in
;;
"refresh")
DATE=`date +"%A %d, %Hh%M - %s"`
DATE=`date +"%a %e %Hh%M"`
BATT_PCT=$(acpi -b | cut -d, -f2 | cut -d" " -f2)
BATT_TIME=$(acpi -b | cut -d, -f3 | cut -d" " -f2)
#BATT=$( acpi -b | sed 's/.*[charg.|], \([0-9]*\)%.*/\1/gi' )
VOLUME=`/usr/bin/amixer get Master | grep "%" | cut -d' ' -f7 | head -n1`
## VOLUME=`amixer get Master | grep '\[' | cut -d' ' -f6`
SONG=`mpc | head -n 1 | cut -d. -f1`
maxSL=22
if [ ${#SONG} -gt $maxSL ]; then
SONG=`echo $SONG | cut -c1-$maxSL`.
fi
BTC=`BTC_stats.sh`
if [ -n `mpc | grep paused` ]; then
STAT=">"
STAT=""
else
STAT="||"
STAT=""
fi;
MEMFREE=`awk '/MemFree/ {printf( "%.0f", $2 / 1024 )}' /proc/meminfo`
MEMCACHED=`awk '/Cached/ {printf( "%.0f", $2 / 10240 )}' /proc/meminfo`
MEMFT=`echo "$MEMFREE + $MEMCACHED" | bc`
BEAT_TIME=`beat -v`
xsetroot -name "Vol $VOLUME :: [$STAT $SONG] :: $MEMFT Mb Free :: Bat $BATT_PCT $BATT_TIME :: $DATE (@$BEAT_TIME)" || true
xsetroot -name "$VOLUME [$STAT $SONG] :: Bat $BATT_PCT $BATT_TIME :: $BTC :: $DATE" || true
$0 conf-ifaces
;;
@ -152,6 +161,7 @@ case $1 in
$0 init-ethernet &
$0 init-mouse
$0 wallpaper
echo 0 | sudo tee ./devices/platform/thinkpad_acpi/leds/tpacpi::power/brightness
;;
"init-mouse")
@ -177,11 +187,11 @@ case $1 in
"lock")
slock &
xset dpms force off
$0 monitor off
;;
"print")
sudo systemctl start cups
sudo systemctl start org.cups.cupsd #fucking name changes…
;;
esac

View file

@ -14,6 +14,6 @@ echo $INVERSE | sudo tee $LIGHT
sleep .1
echo $STATE | sudo tee $LIGHT
sleep .1
echo $INVERSE | sudo tee $LIGHT
sleep .1
echo $STATE | sudo tee $LIGHT
#echo $INVERSE | sudo tee $LIGHT
#sleep .1
#echo $STATE | sudo tee $LIGHT

20
bashrc
View file

@ -1,6 +1,8 @@
shopt -s checkwinsize #Pour pas s'écrire dessus
shopt -s histappend
shopt -s autocd #No more cd xx
shopt -s cdspell #drain bramage
shopt -s dirspell
##shopt -s autocd #Like zsh
PROMPT_COMMAND='history -a'
@ -114,6 +116,7 @@ alias bim='vim'
alias vi='vim'
alias VIM='vim'
alias ivm='vim'
alias vmi='vim'
alias gl='git log --graph --abbrev-commit --pretty=oneline --decorate'
alias gitst='git status'
@ -125,11 +128,12 @@ alias push='git push'
alias makew='make'
alias mkae='make'
alias mak='make'
alias amek='make'
alias BSI2='cd ~/Documents/Studies/BSI2*/'
BSI3_PATH='/home/frank/Documents/Studies/BSI3 - 2013-2014/'
alias BSI3='cd "$BSI3_PATH"'
UNI_STUDY_PATH='/home/frank/Documents/Studies/MUSE1/'
alias BSI3='cd "$UNI_STUDY_PATH"'
OCTOPUS=~/.my_utils/octopus.sh
alias dual='$OCTOPUS monitor dual'
@ -287,14 +291,14 @@ function study #{{{
if [ -z $1 ]; then
STUDY_PATH=''
else
if [ -d "$BSI3_PATH$1" ]; then
if [ -d "$UNI_STUDY_PATH$1" ]; then
STUDY_PATH="$1"
else
STUDY_PATH=''
fi
fi
builtin cd "$BSI3_PATH$STUDY_PATH"
builtin cd "$UNI_STUDY_PATH$STUDY_PATH"
if [ -e calendar ]; then
echo -e "$RED WORK TO DO SOON:$BLUE"
calendar -A10
@ -311,7 +315,7 @@ _StudyCompletion()
cur=${COMP_WORDS[COMP_CWORD]}
_STUDY_ACTUAL_DIR=`pwd`
builtin cd "$BSI3_PATH"
builtin cd "$UNI_STUDY_PATH"
ALL_POSSIBLE_WORDS=(*)
builtin cd "$_STUDY_ACTUAL_DIR"
@ -507,6 +511,12 @@ function op
"html")
firefox "$1"
;;
"odt")
libreoffice "$1"
;;
"png"|"jpg"|"jpeg")
eog "$i"
;;
*)
xdg-open "$1"
;;

View file

@ -4,7 +4,12 @@
/* appearance */
//static const char font[] = "-*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*";
//static const char font[] = "-*-dejavu sans-medium-r-*-*-14-*-*-*-*-*-*-*";
static const char font[] = "-misc-fixed-medium-r-semicondensed--13-100-100-100-c-60-iso8859-1";
//static const char font[] = "-misc-fixed-medium-r-semicondensed--13-100-100-100-c-60-iso8859-1";
//static const char font[] = "-*-terminusmod-medium-r-normal-*-12-*-*-*-*-*-*-*";
//
//
static const char font[] = "-*-fixed-medium-r-normal-*-13-*-*-*-*-*-*-*";
//static const char font[] = "-*-terminus-medium-*-*-*-14-*-*-*-*-*-iso10646-1";
static const char normbordercolor[] = "#444444";
static const char normbgcolor[] = "#222222";
static const char normfgcolor[] = "#bbbbbb";
@ -43,6 +48,7 @@ static const Rule rules[] = {
{ "Gimp", NULL, NULL, 0, True, -1 },
{ "Firefox", NULL, NULL, 1 << 0, False, -1 },
{ "Thunderbird", NULL, NULL, 1 << 1, False, -1 },
{ "Spotify", NULL, NULL, 2, True, -1 },
{ "Profanity", NULL, NULL, 1 << 14, False, -1 },
{ "pdfpc", "pdfpc", NULL, 0, True, -1 },
};
@ -90,6 +96,7 @@ 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};
static const char *lockcmd[] = {"octopus.sh", "lock", NULL};
static const char *monoff[] = {"octopus.sh", "monitor", "off", NULL};
static const char *audioplay[] = {"octopus.sh", "audio", "toggle", NULL};
static const char *audionext[] = {"octopus.sh", "audio", "next", NULL};
static const char *audioprev[] = {"octopus.sh", "audio", "prev", NULL};
@ -104,13 +111,14 @@ static Key keys[] = {
// { MODKEY|ShiftMask, XK_t, spawn, {.v = mailcmd } },
{ MODKEY|ShiftMask, XK_m, spawn, {.v = muttcmd } },
{ MODKEY|ShiftMask, XK_l, spawn, {.v = lockcmd } },
{ MODKEY, XK_m, spawn, {.v = monoff } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } }, /* change window focus */
{ MODKEY, XK_k, focusstack, {.i = -1 } }, /* idem */
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} }, /* ratio droite/gauche */
{ MODKEY, XK_m, setmfact, {.f = +0.05} }, /* idem */
{ MODKEY, XK_l, setmfact, {.f = +0.05} }, /* idem */
{ MODKEY, XK_Return, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY|ShiftMask, XK_c, killclient, {0} },

View file

@ -1,4 +1,6 @@
#set editing-mode vi
#set keymap vi
set completion-ignore-case on
set show-all-if-ambiguous on
#set completion-map-case on
#set show-all-if-ambiguous on
set colored-stats on

View file

@ -23,6 +23,7 @@ function deploy_for_desktop()
{ # {{{
cd ~
ln -s $WAI/xinitrc ./.xinitrc
ln -s $WAI/xbindkeysrc ./.xbindkeysrc
ln -s $WAI/inputrc ./.inputrc
ln -s $WAI/Xmodmap ./.Xmodmap
ln -s $WAI/octaverc ./.octaverc

View file

@ -1,4 +1,4 @@
image/*; feh %s
image/*; eog %s
#text/html; lynx -display_charset=utf-8 -dump %s; nametemplate=%s.html; copiousoutput
text/html; firefox %s
audio/*; vlc %s

View file

@ -1,20 +0,0 @@
set from="aei-cui@unige.ch"
set use_from
set realname="Association des Étudiants en Informatique"
set folder="imaps://aei@outlook.unige.ch:993/"
#set imap_user="aei"
set postponed="+Drafts"
set spoolfile="+INBOX"
#set record = "+Sent"
set record = "+Éléments envoyés"
set signature="~/.mutt/signature.aei"
set smtp_url="smtp://aei@outlook.unige.ch:587"
my_hdr X-URL: http://aei.unige.ch
my_hdr X-Author: Frank
set smtp_pass=$my_aei_stmp_pass
set imap_pass=$my_aei_imap_pass
# vim: filetype=muttrc

View file

@ -8,17 +8,13 @@
macro index <f2> '<change-folder>imaps://frank_mail@villaro-dixon.eu<enter>'
macro index <f3> '<change-folder>imaps://aei@outlook.unige.ch<enter>'
folder-hook 'frank_mail@villaro-dixon.eu' 'source ~/.mutt/account.frank'
folder-hook 'aei@outlook.unige.ch' 'source ~/.mutt/account.aei'
# switch to default account on startup
source ~/.mutt/account.frank
set my_frank_smtp_pass=`~/.mutt/unlock-pass.sh frank_smtp`
set my_frank_imap_pass=`~/.mutt/unlock-pass.sh frank_imap`
set my_aei_smtp_pass=`~/.mutt/unlock-pass.sh aei_smtp`
set my_aei_imap_pass=`~/.mutt/unlock-pass.sh aei_imap`
### MOTS DE PASSE
@ -125,9 +121,4 @@ set index_format="%2C | %Z [%d] %-30.30F (%-4.4c) %s"
set sleep_time=0
#set mime_forward=yes
#set mime_forward_rest=yes
#
#
#
macro attach 'V' "<pipe-entry>cat > /dev/shm/mail.html && firefox /dev/shm/mail.html && rm /dev/shm/mail.html<enter>"

View file

@ -75,6 +75,10 @@ VACATION="no"
* ^From:.*Masterstudies.com.*
$DEVNULLBOX
:0
* ^To:.*masterstudies@vi-di.fr.*
$DEVNULLBOX
:0
* ^To:.*contact@vi-di.fr.*
* ^Subject:.*VIDI.*
@ -214,6 +218,16 @@ VACATION="no"
* deposit
$SPAMBOX
:0 B
* Dear
* illion
* lottery
* immediately
* information
* contact
* fund
$SPAMBOX
#Out texas
:0 B
@ -269,6 +283,10 @@ VACATION="no"
* ^To: .*bit_flipping@villaro-dixon.eu.*
$BITFLIPBOX
:0
* ^From:.*MailCleaner.*
$DEVNULLBOX
#Mailing lists mal foutues
#{{{
:0

View file

@ -3,6 +3,9 @@ IdentityFile ~/.ssh/id_rsa.auth
IdentityFile ~/.ssh/id_rsa.git
IdentityFile ~/.ssh/id_dsa
#Host *
# KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256
###Compression yes
host vi-di.fr

View file

@ -14,17 +14,20 @@
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{microtype}
\usepackage[french]{babel}
%\usepackage[Sonny]{fncychap} % Lenny, Conny ,Bjarne, Rejne, Glenn, Sonny
% Lenny, Conny ,Bjarne, Rejne, Glenn, Sonny, PetersLenny, Bjornstrup
\usepackage[Lenny]{fncychap}
%\usepackage{fancyhdr}
\usepackage{fancyhdr}
\pagestyle{fancyplain}
%\usepackage{fancyhdr}
%\pagestyle{fancyplain}
\usepackage{sistyle}
\SIthousandsep{'} %to use with \num{1337}
\usepackage{siunitx}
\usepackage{indentfirst}
\setlength{\parindent}{1cm}

View file

@ -0,0 +1,99 @@
%%
%% This is file `french.sty' generated
%% on <1991/5/21> with the docstrip utility (v1.1l test).
%%
%% The original source file was `french.doc'.
%%
%%
%% Copyright (C) 1989, 1990, 1991
%% by Johanes Braams. All rights reserved.
%%
%% IMPORTANT NOTICE:
%%
%% You are not allowed to change this file. You may however copy this file
%% to a file with a different name and then change the copy.
%%
%% You are NOT ALLOWED to distribute this file alone. You are NOT ALLOWED
%% to take money for the distribution or use of this file (or a changed
%% version) except for a nominal charge for copying etc.
%%
%% You are allowed to distribute this file under the condition that it is
%% distributed together with all files mentioned below.
%%
%% If you receive only some of these files from someone, complain!
%%
%% Error Reports in case of UNCHANGED versions to
%%
%% J. Braams
%% PTT Research, dr Neher Laboratorium
%% P.O. box 421
%% 2260 AK Leidschendam
%% The Netherlands
%% Internet: <JL_Braams@pttrnl.nl>
%%
\def\filename{french.doc}
\def\fileversion{3.0}
\def\filedate{23 april 1991}
\def\docdate{23 april 1991}
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%% Digits \0\1\2\3\4\5\6\7\8\9
%% Exclamation \! Double quote \" Hash (number) \#
%% Dollar \$ Percent \% Ampersand \&
%% Acute accent \' Left paren \( Right paren \)
%% Asterisk \* Plus \+ Comma \,
%% Minus \- Point \. Solidus \/
%% Colon \: Semicolon \; Less than \<
%% Equals \= Greater than \> Question mark \?
%% Commercial at \@ Left bracket \[ Backslash \\
%% Right bracket \] Circumflex \^ Underscore \_
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
{\def\format{plain}
\ifx\fmtname\format
\expandafter\ifx\csname @ifundefined\endcsname\relax
\gdef\next{latexhax.sty}
\aftergroup\input\aftergroup\next
\fi
\fi}
\ifcat/@ \makeatletter\let\resetat\makeatother
\else\let\resetat\relax\fi
\@ifundefined{captionsfrench}{}{\endinput}
\wlog{Style option `French' version \fileversion\space<\filedate>}
\wlog{English documentation <\docdate>}
\ifx\undefined\babel@core@loaded\input babel.sty\fi
\def\captionsfrench{%
\gdef\refname{R\'ef\'erences}%
\gdef\abstractname{R\'esum\'e}%
\gdef\bibname{Bibliographie}%
\gdef\chaptername{Chapitre}%
\gdef\appendixname{Annexe}%
\gdef\contentsname{Table des mati\`eres}%
\gdef\listfigurename{Liste des figures}%
\gdef\listtablename{Liste des tableaux}%
\gdef\indexname{Index}%
\gdef\figurename{Figure}%
\gdef\tablename{Tableau}%
\gdef\partname{Partie}%
\gdef\enclname{P.~J.}%
\gdef\ccname{Copie \`a}%
\gdef\headtoname{A}
\gdef\headpagename{Page}}%
\def\datefrench{%
\gdef\today{\ifnum\day=1\relax 1\/$^{\rm er}$\else
\number\day\fi \space\ifcase\month\or
janvier\or f\'evrier\or mars\or avril\or mai\or juin\or
juillet\or ao\^ut\or septembre\or octobre\or novembre\or d\'ecembre\fi
\space\number\year}}
\def\extrasfrench{}
\def\noextrasfrench{}
\@ifundefined{l@french}{\adddialect\l@french0}{}
\@ifundefined{originalTeX}{\let\originalTeX\relax}{}
\setlanguage{french}
\resetat
\endinput
%%
%% End of file `french.sty'.

View file

@ -0,0 +1,283 @@
%%
%% This is file `mcode.sty'
%%
%% It is supposed to help you easily include MATLAB source code
%% into LaTeX document, but have it nicely highlighted, using
%% the great listings package.
%%
%% PLEASE NOTE that this package does nothing but save you from
%% figuring out some configurations in setting up the LISTINGS
%% package. ALL the work is done by that package! Thus, please
%% refer your questions to the listings package documentation.
%%
%% Usage: You have three ways of including your MATLAB code. As
%% environment, as inline object and directly from an external
%% file.
%%
%% 1) Environment:
%%
%% \begin{lstlisting}
%% YOUR CODE HERE
%% \end{lstlisting}
%%
%%
%% 2) Inline object:
%%
%% Bla bla \mcode{CODEFRAGMENT} bla bla.
%%
%%
%% 3) Include external file (in environment form)
%%
%% \lstinputlisting{YOUR-FILE.m}
%%
%%
%% For your convenience this package has the following options:
%%
%% - bw if you intend to print the document (highlighting done
%% via text formatting (bold, italic) and shades of gray)
%%
%% - numbered if you want line numbers
%%
%% - autolinebreaks if you want the package to automatically
%% wrap your code. This is buggy as it may well break
%% break syntax and it doesn't work well with comments.
%% You REALLY should wrap your code manually.
%%
%% - useliterate if you want some characters / relations in
%% your code to be replace with something more readable.
%% Example: ~= becomes $\neq$, >= becomes $\geq$, delta
%% becomes $\delta$ and so on.
%%
%% - framed if you want a frame around the source code blocks
%%
%% - final if you have ``gloablly'' set the draft option, the
%% listings package will not output the code at all. to
%% force it to do so anyway, load this package with the
%% final option (passes the ``final'' on to listings).
%%
%% For example, you may use \usepackage[numbered,framed]{mcode}
%% in your document preamble.
%%
%% Note: Inside code blocks you can escape to LaTeX text mode
%% using §...§. For ex. §text and some math: $x^2$§, which is
%% especially useful in comments for putting nicely typeset
%% equations etc. To get the same colour/style as in the rest
%% of the comment use \mcommentfont, i.e. §\mcommentfont $x^2$§
%%
%% To change the font used, edit the first line in the "custo-
%% mise below" section. And feel free to edit other things as
%% well. Refer to the documentation of the listings package to
%% see what else you could do. If an extra small font is re-
%% quired, use {\fontfamily{pcr}\fontsize{3}{4.6}\selectfont}
%% in the definition of \lstbasicfont.
%%
%% Author:
%% Florian Knorn | florian@knorn.org | www.florian-knorn.com
%%
%% Version history:
%% 2.3 -- More keywords (thanks Dominik Wild!)
%% 2.2 -- Bugfix (thanks Willi Gerbig!)
%% 2.1 -- Finally automatic detection between end and end
%% 2.0 -- New options for line breaking and literate prog.
%% 1.8 -- Fixed typo in documentation regarding §...§
%% 1.7 -- Added MATLAB block comment syntax %{ ...... %}
%% 1.6 -- Added some infos, dealing with keyword ``end''
%% 1.5 -- Tweaked check to see wether textcomp is loaded
%% 1.4 -- Fixed misconfig (mathescape now set to false)
%% 1.3 -- Purely cosmetic (tabs replaced by spaces)
%% 1.2 -- Added \lstset{showstringspaces=false}
%% 1.1 -- Added \mcode command and [final] option
%% 1.0 -- Release
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% D O N ' T T O U C H T H I S %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\fileversion{2.3}
\def\filedate{2012/08/31}
\typeout{-- Package: `mcode' \fileversion\space <\filedate> --}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mcode}[\filedate\space\fileversion]
% for bw-option
\newif\ifbw
\DeclareOption{bw}{\bwtrue}
% numbered option
\newif\ifnumbered
\DeclareOption{numbered}{\numberedtrue}
% final option
\newif\iffinal
\DeclareOption{final}{\finaltrue}
% autolinebreaks option
\newif\ifautolinebreaks
\DeclareOption{autolinebreaks}{\autolinebreakstrue}
% literate programming (replace certain characters/relations
\newif\ifuseliterate
\DeclareOption{useliterate}{\useliteratetrue}
% framed option
\newif\ifframed
\DeclareOption{framed}{\framedtrue}
\DeclareOption*{% default
\PackageWarning{mcode}{Unknown option `\CurrentOption' !}%
}
\ProcessOptions
\ifbw\typeout{ - settings optimized for printing (bw formating)}
\else\typeout{ - settings optimized for display (colour formating)}\fi
\ifnumbered\typeout{ - line numbering enabled}\else\fi
\ifuseliterate\typeout{ - literate programming (character replacements) enabled}\else\fi
\ifautolinebreaks\typeout{ - automatic line breaking enabled (careful, buggy!)}\else\fi
\ifframed\typeout{ - framed listings}\else\fi
% This command allows you to typeset syntax highlighted Matlab
% code ``inline''. The font size \small seems to look best...
\newcommand{\mcode}[1]{\lstinline[basicstyle=\lstbasicfont\small]|#1|}
% check if color command exists
\ifx\color\undefined%
\RequirePackage{xcolor}%
\fi
% check if listings has been loaded
\ifx\lstset\undefined%
\iffinal
\RequirePackage[final]{listings}
\else
\RequirePackage{listings}
\fi
\fi
% Check if textcomp has been loaded (this package is needed for
% upright quotes '' (instead of typographic ones `´)...
\ifx\textquotesingle\undefined%
\RequirePackage{textcomp}%
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% C U S T O M I S E B E L O W %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ---------------------------------------------------------------------------------
% default font
\def\lstbasicfont{\fontfamily{pcr}\selectfont\footnotesize}
% ---------------------------------------------------------------------------------
% matlat languate definition
\lstdefinelanguage{matlabfloz}{%
alsoletter={...},%
morekeywords={% % keywords
break,case,catch,continue,elseif,else,end,%
for,function,global,if,otherwise,persistent,%
return,switch,try,while,methods,properties,%
events,classdef,...},%
comment=[l]\%, % comments
morecomment=[l]..., % comments
morecomment=[s]{\%\{}{\%\}}, % block comments
morestring=[m]' % strings
}[keywords,comments,strings]%
% ---------------------------------------------------------------------------------
% general definitions
\lstset{%
basicstyle={\lstbasicfont}, % set font
showstringspaces=false, % do not emphasize spaces in strings
tabsize=4, % number of spaces of a TAB
mathescape=false,escapechar=§, % escape to latex with §...§
upquote=true, % upright quotes
aboveskip={1.5\baselineskip}, % a bit of space above listings
columns=fixed % nice spacing
}
% ---------------------------------------------------------------------------------
% define colours and styles
\ifbw % use font formating and gray 'colors'
\def\mcommentfont{\color[gray]{.75}\itshape} %comments light gray and italic
\lstset{language=matlabfloz, % use our version of highlighting
keywordstyle=\bfseries, % keywords in bold
commentstyle=\mcommentfont, % comments
stringstyle=\color[gray]{0.5} % strings darker gray
}
\else% notbw => use colors : )
\def\mcommentfont{\color[rgb]{.133,.545,.133}} %comments in green
\lstset{language=matlabfloz, % use our version of highlighting
keywordstyle=\color[rgb]{0,0,1}, % keywords in blue
commentstyle=\mcommentfont, % comments
stringstyle=\color[rgb]{.627,.126,.941} % strings in purple
}
\fi%bw
% ---------------------------------------------------------------------------------
% automatic line breaking --- warning, this is buggy and
% doesn't break comments correctly!
\ifautolinebreaks
\newsavebox{\lbreakdots}\sbox{\lbreakdots}{\lstbasicfont\mcommentfont...}
\lstset{breaklines=true,breakatwhitespace=true,prebreak=\usebox{\lbreakdots}}
\fi
% ---------------------------------------------------------------------------------
% literate replacements
% the following is for replacing some matlab relations like >= or ~=
% by the corresponding LaTeX symbols, which are much easier to read ...
\ifuseliterate
\lstset{%
literate=%
{~}{{$\neg$}}1 % \neg
{<=}{{\tiny$\leq$}}1 % \leq
{>=}{{\tiny$\geq$}}1 % \geq
{~=}{{\tiny$\neq$}}1 % \neq
{delta}{{\tiny$\Delta$}}1 % \Delta
{(end)}{\lstbasicfont (end)}{5} % black ``end'' when indexing last vector element
{({ }end)}{\lstbasicfont ({ }end)}{6}
{(end{ })}{\lstbasicfont (end{ })}{6}
{({ }end{ })}{\lstbasicfont ({ }end{ })}{7}
{:end}{\lstbasicfont :end}{4}
{:{ }end}{\lstbasicfont :{ }end}{5}
{end:}{\lstbasicfont end:}{4}
{end{ }:}{\lstbasicfont end{ }:}{5}
{,end}{\lstbasicfont ,end}{4}
{,{ }end}{\lstbasicfont ,{ }end}{5}
}
\else
\lstset{%
literate=%
{(end)}{\lstbasicfont (end)}{5} % black ``end'' when indexing last vector element
{({ }end)}{\lstbasicfont ({ }end)}{6}
{(end{ })}{\lstbasicfont (end{ })}{6}
{({ }end{ })}{\lstbasicfont ({ }end{ })}{7}
{:end}{\lstbasicfont :end}{4}
{:{ }end}{\lstbasicfont :{ }end}{5}
{end:}{\lstbasicfont end:}{4}
{end{ }:}{\lstbasicfont end{ }:}{5}
{,end}{\lstbasicfont ,end}{4}
{,{ }end}{\lstbasicfont ,{ }end}{5}
}
\fi%literates
% ---------------------------------------------------------------------------------
% line numbering
\ifnumbered% numbered option
\lstset{%
numbersep=3mm, numbers=left, numberstyle=\tiny, % number style
}
\fi
\ifframed% framed option
\lstset{%
frame=single, % frame
}
\ifnumbered%
\lstset{%
framexleftmargin=6mm, xleftmargin=6mm % tweak margins
}
\fi
\fi
\endinput
%% End of file `mcode.sty'.

View file

@ -0,0 +1,65 @@
%%% ====================================================================
%%% @LaTeX-style-file{
%%% author = "Mario Wolczko",
%%% version = "2",
%%% date = "21 May 1992",
%%% time = "20:55:01 BST",
%%% filename = "boxedminipage.sty",
%%% email = "mario@acm.org",
%%% codetable = "ISO/ASCII",
%%% keywords = "LaTeX, minipage, framebox",
%%% supported = "no",
%%% docstring = "LaTeX document-style option which defines
%%% the boxedminipage environment -- just like minipage, but with
%%% a box around it.",
%%% }
%%% ====================================================================
%
% This file is in the public domain
%
% The thickness of the rules around the box is controlled by
% \fboxrule, and the distance between the rules and the edges of the
% inner box is governed by \fboxsep.
%
% This code is based on Lamport's minipage code.
%
% Fixed, 7 Jun 89 by Jerry Leichter
% Leave \fboxsep worth of separation at top and bottom, not just at
% the sides!
%
\def\boxedminipage{\@ifnextchar [{\@iboxedminipage}{\@iboxedminipage[c]}}
\def\@iboxedminipage[#1]#2{\leavevmode \@pboxswfalse
\if #1b\vbox
\else \if #1t\vtop
\else \ifmmode \vcenter
\else \@pboxswtrue $\vcenter
\fi
\fi
\fi\bgroup % start of outermost vbox/vtop/vcenter
\hsize #2
\hrule\@height\fboxrule
\hbox\bgroup % inner hbox
\vrule\@width\fboxrule \hskip\fboxsep \vbox\bgroup % innermost vbox
\vskip\fboxsep
\advance\hsize -2\fboxrule \advance\hsize-2\fboxsep
\textwidth\hsize \columnwidth\hsize
\@parboxrestore
\def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@
\let\@footnotetext\@mpfootnotetext
\let\@listdepth\@mplistdepth \@mplistdepth\z@
\@minipagerestore\@minipagetrue
\everypar{\global\@minipagefalse\everypar{}}}
\def\endboxedminipage{%
\par\vskip-\lastskip
\ifvoid\@mpfootins\else
\vskip\skip\@mpfootins\footnoterule\unvbox\@mpfootins\fi
\vskip\fboxsep
\egroup % ends the innermost \vbox
\hskip\fboxsep \vrule\@width\fboxrule
\egroup % ends the \hbox
\hrule\@height\fboxrule
\egroup% ends the vbox/vtop/vcenter
\if@pboxsw $\fi}

View file

@ -5,9 +5,6 @@ UTC
init
i
printf
connectique
recontacte
m'enfin
Debian
keysigning
NSA
@ -23,31 +20,28 @@ mutex
batchs
csv
Battelle
superlinéaires
superlinéaire
parsé
despotiste
ventilo
l'ordi
skippé
stacktrace
mouhahahhahahha
mouhahahahahha
circlip
BrainFuck
Multinôme
microcontroleurs
séquentiellement
encapsule
désinscrire
L'État
lémanique
OpenStreetMap
crevard
permission/!
nargout
nargin
isfield
rmfield
elseif
TEAP
Pfankuch
Evolène
Ferpècle
desdites
Sion
Cryosphère
hydrobiologie
piétonisation
CADéco
genevoises
Évolène
Optionnellement
Milankovitch

View file

@ -8,6 +8,48 @@ exams
proba
stranger
should
connectique
superlinéaires
microcontroleurs
crevard
permission/!
Écologisme
écologue
éconologique
éconologiques
énergétiquement
méthanisation
hyporhéique
nommage
instancier
Cryosphère
agravant
privatisables
Ferpècle
courantomètre
l'Environnement
conductimètre
dégraveur
journalièrement
maintenable
cryosphère
solarimère
cryosphériques
Evolène
séquentiellement
encapsule
désinscrire
L'État
lémanique
superlinéaire
parsé
despotiste
ventilo
l'ordi
skippé
stacktrace
recontacte
m'enfin
to
read
our
@ -18,3 +60,14 @@ EDF
RDV
subsection
bachelor
Multidisciplinarité
nommage
Shannon
Hamming
Viterbi
Channel
géodatabases
géodatabase
Transdisciplinarité
transdisciplinarité
multidisciplinarité

Binary file not shown.

View file

@ -11,8 +11,8 @@ hi SpellBad cterm=underline,bold ctermfg=lightblue
set spell
set spelllang=en,fr
set viminfo+=n~/Private/.viminfo
set directory=~/Private/.vim/
"set viminfo+=n~/Private/.viminfo
"set directory=/dev/shm/vimfr
"set nocompatible "fuck you !. impossible de backspace, sinon
set backspace=indent,eol,start
@ -160,11 +160,12 @@ inoremap ¸ <esc>/<+.\{-1,}+><return>c/+>/e<return>
"CF. limit of 74 for when ">>>" ;)
au BufRead /dev/shm/mutt-* set tw=74 fo+=aw noautoindent
autocmd BufRead,BufNewFile *.tex set tw=80 fo+=aw
autocmd BufRead,BufNewFile *.markdown set tw=80 fo+=aw
autocmd BufRead,BufNewFile *.latex set tw=80 fo+=aw
autocmd BufRead,BufNewFile *.tex set filetype=tex tw=80 fo+=aw
autocmd BufRead,BufNewFile *.latex set tw=80 fo+=aw ts=4
autocmd BufRead,BufNewFile *.lista set filetype=lisp
autocmd BufRead,BufNewFile *.xml set ts=4 sw=4
autocmd BufRead,BufNewFile *.md set filetype=markdown tw=80 fo+=aw
"autocmd BufRead,BufNewFile *.m set nospell
@ -174,14 +175,21 @@ autocmd BufNewFile,BufRead *.py set keywordprg=pydoc
autocmd BufNewFile,BufRead *.php set ts=4 sw=4 keywordprg=~/.vim/scripts/doc.php.sh
autocmd BufNewFile,BufRead *.R set ts=4 sw=4 keywordprg=~/.vim/scripts/doc.R.sh
autocmd BufNewFile,BufRead *.m set ts=4 sw=4 keywordprg=~/.vim/scripts/doc.octave.sh
"Yeah, well, fuck you !
autocmd BufNewFile,BufRead *.rs set noexpandtab
"Merci Nemolivier ;)
vmap ,w :<C-U>!firefox "http://fr.wikipedia.org/wiki/<cword>" >& /dev/null<CR><CR>
vmap ,W :<C-U>!firefox "http://en.wikipedia.org/wiki/<cword>" >& /dev/null<CR><CR>
vmap ,c :<C-U>!firefox "http://www.leconjugueur.com/php5/index.php?v=<cword>" >& /dev/null<CR><CR>
vmap ,d :<C-U>!firefox "http://fr.wiktionary.org/wiki/<cword>" >& /dev/null<CR><CR>
vmap ,D :<C-U>!firefox "http://en.wiktionary.org/wiki/<cword>" >& /dev/null<CR><CR>
"JAVA
iabbr syso System.out.println
iabbr env. environnement
iabbr envale environnementale
iabbr enval environnemental
if bufwinnr(1)
@ -206,5 +214,6 @@ noremap! <Left> <Esc>
noremap <Right> ""
noremap! <Right> <Esc>
noremap A<Enter> iSale Con <Esc>
"Languagetool - :LanguageToolCheck

3
xbindkeysrc Normal file
View file

@ -0,0 +1,3 @@
"synclient TouchpadOff=$(synclient -l | grep -ce TouchpadOff.*0)"
m:0x0 + c:199
XF86TouchpadToggle

12
xinitrc
View file

@ -19,6 +19,8 @@ wmname LG3D
#Keyboard setup +compose key for "ŭ" (Win-b u) for esperanto
setxkbmap -model pc104 -layout ch -variant fr -option compose:lwin
xbindkeysrc &
#My pinkie hurts :'(
if [ -s ~/.Xmodmap ]; then
@ -33,16 +35,19 @@ if [ $? -eq 1 ]; then
mpd &
fi;
#The status bar
while true; do
$OCTOPUS refresh
sleep 50
done &
#The wallpaper
while true; do
sleep 240
$OCTOPUS wallpaper
done &
#The mouse
while true; do
sleep 120
$OCTOPUS init-mouse
@ -52,13 +57,14 @@ done &
#xautolock -time 60 -locker "systemctl suspend" &
redshift -l 46:6 || true &
#WTF is wrong with it always forgetting the playlist !?
#WTF is wrong with it always forgetting the fucking playlist !?
mpc ls | mpc add
mpc random
mpc random on
#ssh-agent -t 10 /home/frank/Programmation/dotfiles/dwm/dwm
/home/frank/Programmation/dotfiles/dwm/dwm
bash
# exec gnome-session