################################################################################ ## ~/.ratpoisonrc ## ┬─┐┬─┐┬─┐┬─┐o┐ │ ┬┌ ┬─┐┐ ┬ ## │─┘│┬┘├─ ├─ │┌┼┘ ├┴┐├─ └┌┘ ## │ │└┘┴─┘│ ││ └ │ ┘┴─┘ │ ################### PREFIX KEY escape s-x ## ┬─┐┐ ┬┬─┐ ┌─┐┬─┐┌┐┐┬─┐┐ ┬ ## ├─ └┌┘├─ │ │─┤││││ │└┌┘ ## ┴─┘ │ ┴─┘ └─┘┘ │ └┘┴─┘ │ ################### EYE CANDY # Use the name of the program rather than the title in the window list # (nw|w|sw|n|c|s|ne|e|se) defwinname name gravity c set border 0 set barinpadding 1 set barborder 0 set barpadding 4 0 set bargravity se set padding 0 0 0 0 set bgcolor #a8a8a8 set fgcolor black set bwcolor #a8a8a8 set font "Monospace-14" msgwait 6 set inputwidth 251 set resizeunit 1 startup_message on ## ┐─┐┌┐┐┬─┐┌┐┐o┌─┐ ┬┌ ┬─┐┐ ┬┐─┐ ## └─┐ │ │─┤ │ ││ ├┴┐├─ └┌┘└─┐ ## ──┘ │ ┘ │ │ │└─┘ │ ┘┴─┘ │ ──┘ ###################### STATIC KEYS definekey top XF86Launch1 exec slock # Fn F9 definekey top C-s-l nextscreen definekey top C-s-h prevscreen definekey top s-j focus definekey top s-k focusprev definekey top XF86AudioRaiseVolume exec ~/s/scripts/rat-volume.sh +5% definekey top XF86AudioLowerVolume exec ~/s/scripts/rat-volume.sh -5% definekey top XF86AudioMute exec ~/s/scripts/rat-volume.sh definekey top XF86TouchpadToggle exec ~/s/scripts/rat-tptoggle.sh ## ┬┌ ┬─┐┐ ┬┬─┐o┌┐┐┬─┐o┌┐┐┌─┐┐─┐ ## ├┴┐├─ └┌┘│─││││││ ││││││ ┬└─┐ ## │ ┘┴─┘ │ ┴─┘│ └┘┴─┘│ └┘└─┘──┘ #################### KEYBINDINGS # Terminal alias xterm exec xterm alias term exec urxvt -bg "black" -fg "#aaaaaa" # "rgb:fc/ef/ba" alias termblue exec urxvt -bg "#000077" # 294c4a 0000aa 0000b2 alias termorange exec urxvt -bg darkorange2 alias termlblue exec urxvt -fg "#99ddff" alias termlgray exec urxvt -fg "#eeeeee" alias termgreen exec urxvt -fg "#33CC00" alias termgreen2 exec urxvt -fg "#39E600" alias termgreen3 exec urxvt -fg "#40FF00" alias termamber exec urxvt -fg "#FFBF00" alias yeah exec yeahconsole bind Return term unbind C-exclam # Change the date unbind a alias date exec ratpoison -c "echo `date +'%a %m/%d %I:%M%p %Y'`" bind d date # Put a calendar #unbind c #alias calendar exec ratpoison -c "echo $(DAY=$( date +%e ); cal -h | sed -e "s,\( $DAY \),<$DAY>,")" #bind c calendar # For executing some stuff from colon in statusbar alias echobar colon exec #ratpoison -c "echo $(" # pkill alias killapp exec pkill $(ratpoison -c "prompt Kill app: ") # Display usefull informations with conky unbind c alias conkybar exec ratpoison -c "echo $(conky)" alias conkybartz exec ratpoison -c "echo $(conky -c ~/.conkyrc-tz)" bind c conkybar bind x conkybartz # TODO alias todo exec ratpoison -c "echo $(todo.sh -p ls)" alias todolsc exec ratpoison -c "echo $(todo.sh -p ls $(ratpoison -c "prompt todo tag: "))" alias todoa exec todo.sh a $(ratpoison -c "prompt todo add: ") alias tododel exec todo.sh -f del $(ratpoison -c "prompt todo del: ") alias todopri exec todo.sh pri $(ratpoison -c "prompt todo pri: ") alias tododepri exec todo.sh depri $(ratpoison -c "prompt todo depri: ") newkmap super-t definekey super-t l todo definekey super-t t todolsc definekey super-t a todoa definekey super-t d tododel definekey super-t p todopri definekey super-t u tododepri definekey top s-t readkey super-t bind t todo # TEL alias telephones exec rattel.sh $(ratpoison -c "prompt Name: ") bind T telephones # Print screen in a image file alias screenshot exec ratpoison -c "echo Screenshot: $(date +%s)_scrot.png printed in ~/b/" && scrot ~/b/$(date +%s)_scrot.png bind Print screenshot # lock alias lock exec slock bind l lock # Reload bind dollar restart # Store and restore frames layout bind F1 exec ratpoison -c "setenv fs1 `ratpoison -c 'fdump'`" bind ampersand exec ratpoison -c "frestore `ratpoison -c 'getenv fs1'`" bind F2 exec ratpoison -c "setenv fs2 `ratpoison -c 'fdump'`" bind eacute exec ratpoison -c "frestore `ratpoison -c 'getenv fs2'`" bind F3 exec ratpoison -c "setenv fs3 `ratpoison -c 'fdump'`" bind quotedbl exec ratpoison -c "frestore `ratpoison -c 'getenv fs3'`" # Just restore my default layout bind M-ampersand exec ratpoison -c "frestore $(cat ~/.ratpoison_env3)" # uptime alias uptime exec ratpoison -c "echo $(uptime)" # Mails alias gmail exec ratpoison -c "echo $(sh ~/e/gmail.sh)" # Battery infos alias battery exec ratpoison -c "echo $(thinkpad_smapi.sh -b0)" # Phunz alias randomfunfacts exec ratpoison -c "echo $(wget -q -O - http://randomfunfacts.com |grep strong | sed -e 's/<[^>]*>//g' -e 's/^\s*//' -e 's/\..\ \;/./' | fold -w 70)" bind M-b randomfunfacts # More phunz alias fortunes exec ratpoison -c "echo $(fortune 20% $HOME/.fortunes/chalkboard_nb 20% $HOME/.fortunes/fgump $HOME/.fortunes/xfiles $HOME/.fortunes/house-fr | sed -e 's/^\s*//')" bind M-c fortunes # Droit fortune cookies (?!) alias droit exec ratpoison -c "echo $(fortune $HOME/.fortunes/droit | sed -e 's/^\s*//')" bind M-d droit # Fukung phunz alias fukung exec feh -F "$(wget -q -O - http://fukung.net/ | grep "media.fukung.net" | head -n 1 | cut -d"\"" -f 4)" bind M-f fukung # Always phunz alias bonjourmadame exec feh -F $(wget -q -O - http://www.bonjourmadame.fr | grep -Eo "(http://www.bonjourmadame.fr/photo/[^\"]+)|(http://[0-9]+.media.tumblr.com/tumblr[^\"]+)" | head -n 1) bind M-x bonjourmadame # Infinite phunz alias xkcd exec feh -F $(lynx -nolist -dump http://xkcd.com/|grep "imgs.xkcd.com/comics/") bind M-v xkcd # RMS phunz alias rrmsfacts exec ratpoison -c "echo $(wget -q -O - http://stallmanfacts.com/random |grep Permalink |sed -e 's/<[^>]*>//g' | sed -e 's/^\s*//' | sed -e 's/ \#.*$//')" # My fucking weather alias fuckingweather exec ~/e/rp_fuckingweather.sh caen bind M-w fuckingweather ## ┬─┐┬─┐┬─┐ ┬ ┬─┐┬ ┐┌┐┐┌─┐┬ ┬┬─┐┬─┐┐─┐ ## │─┤│─┘│─┘ │ │─┤│ │││││ │─┤├─ │┬┘└─┐ ## ┘ ││ │ └─┘┘ │└─┘ └┘└─┘│ ┴┴─┘│└┘──┘ ########################### APP LAUNCHERS # emacs alias emacsd exec if [ "$(pidof emacs)" ]; then ratpoison -c "echo emacs deamon already launched"; else emacs --daemon && ratpoison -c "echo emacs daemon launched"; fi #alias emacs exec emacsclient -c alias emacsk exec if [ "$(pidof emacs)" ]; then emacsclient -e '(kill-emacs)' && ratpoison -c "echo emacs deamon killed successfully"; else ratpoison -c "echo emacs daemon not launched"; fi bind e emacsd bind E emacsk # web browsers # alias firefox exec icecat # bind f firefox unbind m alias palemoon exec palemoon-bin bind m palemoon # Doom and Duke alias doom exec prboom -iwad ~/x/IWADs/DOOM/DOOM.WAD alias doom2 exec prboom -iwad ~/x/IWADs/DOOM2/DOOM2.WAD alias tnt exec prboom -iwad ~/x/IWADs/TNT/TNT.WAD alias plutonia exec prboom -iwad ~/x/IWADs/PLUTONIA/PLUTONIA.WAD alias freedoom exec prboom -iwad ~/x/IWADs/FREEDOOM/FREEDOOM.WAD alias chex3 exec zdoom -iwad ~/x/IWADs/CHEX3/CHEX3.WAD alias hexen exec zdoom -iwad ~/x/IWADs/HEXEN/HEXEN.WAD alias heretic exec zdoom -iwad ~/x/IWADs/HERETIC/HERETIC.WAD alias action2 exec zdoom -iwad ~/x/IWADs/ACTION2/ACTION2.WAD alias harmony exec zdoom -iwad ~/x/IWADs/HARMONY/HARM1.WAD alias strife exec zdoom -iwad ~/x/IWADs/STRIFE/STRIFE1.WAD alias duke3d exec sh /usr/local/bin/duke3d # armagetronad alias tron exec armagetronad # Mame alias mame exec advmame alias lsmame exec ratpoison -c "echo $(ls -1 ~/x/ROM/mame/)" # chess alias chess exec xboard -fcp "gnuchess depth 1 --easy --xboard" # ebook reader alias ereader exec /opt/calibre/ebook-viewer unbind f bind f ereader # dillo alias dillo exec dillo ## ┬─┐┌┐┐ ┐─┐┌┐┐┬─┐┬─┐┌┐┐ ## │─┤ │ └─┐ │ │─┤│┬┘ │ ## ┘ │ │ ──┘ │ ┘ ││└┘ │ ################# AT START banish exec ~/s/scripts/rpws.pl init 3 -k