# info: C=control, M=meta/alt, s=super, S=shift, H = Hyper # xnest for testing escape grave definekey top s-grave meta definekey top Arabic_dammatan meta set quiet 1 #find files script bind f exec ~/.config/ratpoison/spotlight # set font with unicode support #set font -*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-* set font "DejaVu Sans Mono" # Enable xcb copy/paste source .config/ratpoison/ratpoisonrc.clipboard # Make tab switch to the next screen bind Tab nextscreen #have windows centered set wingravity center # Set name to be title set winname title #Pest control. banish #exec unclutter -idle 1 -jitter 2 -root #warp on #addhook switchwin banish #No more startup message startup_message off #fix mouse exec xsetroot -cursor_name left_ptr #Effects & Background #exec xcompmgr -c -f & #exec nitrogen --restore #Border & Padding alias showpanel set padding 0 27 0 0 alias hidepanel set padding 0 0 0 0 showpanel alias showborder set border 3 alias hideborder set border 0 showborder ###################################### # Panel ###################################### alias barsend exec ~/.config/ratpoison/panel/windows # tell ratpoison to ignore panels unmanage rpbar unmanage bar unmanage stalonetray # hooks addhook switchwin barsend #addhook deletewindow barsend addhook switchframe barsend addhook switchgroup barsend #addhook titlechanged barsend unmanage conky unmanage xfce4-panel unmanage ratbar.pl #------------------------------------------------------------- # Workspaces #------------------------------------------------------------- # Switcher window #alias workspace_menu exec .config/ratpoison/workspace_menu #bind W workspace_menu #Get F-keys to switch windows now in /usr/bin/rpws definekey top F1 exec rpws 1 && echo "D1" > /tmp/panel-fifo && ratpoison -c barsend definekey top F2 exec rpws 2 && echo "D2" > /tmp/panel-fifo && ratpoison -c barsend definekey top F3 exec rpws 3 && echo "D3" > /tmp/panel-fifo && ratpoison -c barsend definekey top F4 exec rpws 4 && echo "D4" > /tmp/panel-fifo && ratpoison -c barsend definekey top F5 exec rpws 5 && echo "D5" > /tmp/panel-fifo && ratpoison -c barsend definekey top F6 exec rpws 6 && echo "D6" > /tmp/panel-fifo && ratpoison -c barsend definekey top F7 exec rpws 7 && echo "D7" > /tmp/panel-fifo && ratpoison -c barsend definekey top F8 exec rpws 8 && echo "D8" > /tmp/panel-fifo && ratpoison -c barsend definekey top F9 exec rpws 9 && printf "D9\nIxlear\n" > /tmp/panel-fifo && ratpoison -c barsend definekey top F10 exec rpws 10 && printf "D10\nIclear\n" > /tmp/panel-fifo & xset -led named "Scroll Lock" & ratpoison -c barsend definekey top F11 exec rpws 11 && echo "D11" > /tmp/panel-fifo && ratpoison -c barsend definekey top F12 exec rpws 12 && echo "D12" > /tmp/panel-fifo && ratpoison -c barsend definekey top s-1 exec rpws 1 && echo "D1" > /tmp/panel-fifo && ratpoison -c barsend definekey top s-2 exec rpws 2 && echo "D2" > /tmp/panel-fifo && ratpoison -c barsend definekey top s-3 exec rpws 3 && echo "D3" > /tmp/panel-fifo && ratpoison -c barsend definekey top s-4 exec rpws 4 && echo "D4" > /tmp/panel-fifo && ratpoison -c barsend definekey top s-5 exec rpws 5 && echo "D5" > /tmp/panel-fifo && ratpoison -c barsend definekey top s-6 exec rpws 6 && echo "D6" > /tmp/panel-fifo && ratpoison -c barsend definekey top s-7 exec rpws 7 && echo "D7" > /tmp/panel-fifo && ratpoison -c barsend definekey top s-8 exec rpws 8 && echo "D8" > /tmp/panel-fifo && ratpoison -c barsend definekey top s-9 exec rpws 9 && printf "D9\nIxlear\n" > /tmp/panel-fifo && ratpoison -c barsend definekey top s-0 exec rpws 10 && printf "D10\nIclear\n" > /tmp/panel-fifo & xset -led named "Scroll Lock" & ratpoison -c barsend definekey top M-F1 rpwsm1 && echo "D1" > /tmp/panel-fifo && ratpoison -c barsend definekey top M-F2 rpwsm2 && echo "D2" > /tmp/panel-fifo && ratpoison -c barsend definekey top M-F3 rpwsm3 && echo "D3" > /tmp/panel-fifo && ratpoison -c barsend definekey top M-F4 rpwsm4 && echo "D4" > /tmp/panel-fifo && ratpoison -c barsend definekey top M-F5 rpwsm5 && echo "D5" > /tmp/panel-fifo && ratpoison -c barsend definekey top M-F6 rpwsm6 && echo "D6" > /tmp/panel-fifo && ratpoison -c barsend definekey top M-F7 rpwsm7 && echo "D7" > /tmp/panel-fifo && ratpoison -c barsend definekey top M-F8 rpwsm8 && echo "D8" > /tmp/panel-fifo && ratpoison -c barsend definekey top M-F9 rpwsm9 printf "D9\nIxlear\n" > /tmp/panel-fifo && ratpoison -c barsend definekey top M-F10 rpwsm10 && printf "D10\nIclear\n" > /tmp/panel-fifo & xset -led named "Scroll Lock" && ratpoison -c barsend definekey top M-F11 rpwsm11 && echo "D11" > /tmp/panel-fifo && ratpoison -c barsend definekey top M-F12 rpwsm12 && echo "D12" > /tmp/panel-fifo && ratpoison -c barsend definekey top S-F1 exec rpws 13 && echo "D13" > /tmp/panel-fifo && ratpoison -c barsend definekey top S-F2 exec rpws 14 && echo "D14" > /tmp/panel-fifo && ratpoison -c barsend definekey top S-F3 exec rpws 15 && echo "D15" > /tmp/panel-fifo && ratpoison -c barsend definekey top S-F4 exec rpws 16 && echo "D16" > /tmp/panel-fifo && ratpoison -c barsend definekey top S-F5 exec rpws 17 && echo "D17" > /tmp/panel-fifo && ratpoison -c barsend definekey top S-F6 exec rpws 18 && echo "D18" > /tmp/panel-fifo && ratpoison -c barsend definekey top S-F7 exec rpws 19 && echo "D19" > /tmp/panel-fifo && ratpoison -c barsend definekey top S-F8 exec rpws 20 && echo "D20" > /tmp/panel-fifo && ratpoison -c barsend definekey top S-F9 exec rpws 21 && echo "D21" > /tmp/panel-fifo && ratpoison -c barsend definekey top S-F10 exec rpws 22 && echo "D22" > /tmp/panel-fifo && ratpoison -c barsend definekey top S-F11 exec rpws 23 && echo "D23" > /tmp/panel-fifo && ratpoison -c barsend definekey top S-F12 exec rpws 24 && echo "D24" > /tmp/panel-fifo && ratpoison -c barsend definekey top S-M-F1 rpwsm13 && echo "D13" > /tmp/panel-fifo && ratpoison -c barsend definekey top S-M-F2 rpwsm14 && echo "D14" > /tmp/panel-fifo && ratpoison -c barsend definekey top S-M-F3 rpwsm15 && echo "D15" > /tmp/panel-fifo && ratpoison -c barsend definekey top S-M-F4 rpwsm16 && echo "D16" > /tmp/panel-fifo && ratpoison -c barsend definekey top S-M-F5 rpwsm17 && echo "D17" > /tmp/panel-fifo && ratpoison -c barsend definekey top S-M-F6 rpwsm18 && echo "D18" > /tmp/panel-fifo && ratpoison -c barsend definekey top S-M-F7 rpwsm19 && echo "D19" > /tmp/panel-fifo && ratpoison -c barsend definekey top S-M-F8 rpwsm20 && echo "D20" > /tmp/panel-fifo && ratpoison -c barsend definekey top S-M-F9 rpwsm21 && echo "D21" > /tmp/panel-fifo && ratpoison -c barsend definekey top S-M-F10 rpwsm22 && echo "D22" > /tmp/panel-fifo && ratpoison -c barsend definekey top S-M-F11 rpwsm23 && echo "D23" > /tmp/panel-fifo && ratpoison -c barsend definekey top S-M-F12 rpwsm24 && echo "D24" > /tmp/panel-fifo && ratpoison -c barsend #definekey top s-F1 exec ratpoison -c 'meta F1' #definekey top s-F2 exec ratpoison -c 'meta F2' #definekey top s-F3 exec ratpoison -c 'meta F3' #definekey top s-F4 exec ratpoison -c 'meta F4' #definekey top s-F5 exec ratpoison -c 'meta F5' #definekey top s-F6 exec ratpoison -c 'meta F6' #definekey top s-F7 exec ratpoison -c 'meta F7' #definekey top s-F8 exec ratpoison -c 'meta F8' #definekey top s-F9 exec ratpoison -c 'meta F9' #definekey top s-F10 exec ratpoison -c 'meta F10' #definekey top s-F11 exec ratpoison -c 'meta F11' #definekey top s-F12 exec ratpoison -c 'meta F12' definekey top S-F12 exec rpws 13 definekey top M-S-F12 rpwsm13 #------------------------------------------------------------- #Bindings #------------------------------------------------------------- alias window_menu exec .config/ratpoison/window_menu bind h focusleft bind l focusright bind j focusdown bind k focusup bind H exchangeleft bind L exchangeright bind J exchangedown bind K exchangeup bind w window_menu bind a exec ratpoison -i -c 'title' && ratpoison -c 'barsend' bind t exec ~/bin/passenter bind T exec ~/bin/passmake definekey top s-l exec ~/.config/ratpoison/lock definekey top s-s exec ~/bin/sus definekey top s-L redisplay bind C exec ~/.config/ratpoison/wp change bind v hsplit bind V hsplit 2/3 bind s vsplit bind S vsplit 2/3 bind d remove bind space exec urxvt bind o only bind semicolon colon bind e exec bind u undo bind x delete bind X kill bind Escape abort bind m exec xfce4-popup-applicationsmenu bind W exec sudo connman_dmenu #Paste goodness bind g exec ~/bin/safeimg bind P exec ~/bin/safepaste alias bordtoggle exec ~/.config/ratpoison/bordtoggle alias bordscript exec ~/.config/ratpoison/borderscript alias paneltoggle exec ~/.config/ratpoison/paneltoggle #addhook key bordscript definekey top s-b bordtoggle definekey top s-p paneltoggle # b : Open url alias browse_cmd exec .config/ratpoison/exec_to_workspace 2 vimb alias browse colon browse_cmd bind b browse # B : open a new firefox tab and browse to the X clipboard selection alias browse_selection exec .config/ratpoison/exec_to_workspace 2 vimb `ratpoison -c getsel` bind B banish # Paste with X selection alias insert_X_selection meta S-Insert bind i insert_X_selection #------------------------------------------------------------- #Application Shortcuts #------------------------------------------------------------- definekey top s-f exec firefox definekey top s-u exec uzbl-browser definekey top s-v exec vimb definekey top s-h exec ~/.config/vimb/history-search #definekey top s-g exec gvim #definekey top s-l exec libreoffice #----------------------------------------------------- # Voice control #----------------------------------------------------- definekey top KP_Enter exec ~/Dropbox/speech/run-duplex.sh #------------------------------------------------------------- # Volume Control #------------------------------------------------------------- # Up alias volup exec amixer -q set Master 5+ && ratpoison -c "echo `$HOME/.config/ratpoison/volind`" & volume -f 'V%i' > /tmp/panel-fifo definekey top XF86AudioRaiseVolume volup definekey top s-Prior volup iefinekey top s-q volup # Down alias voldown exec amixer -q set Master 5- && ratpoison -c "echo `$HOME/.config/ratpoison/volind`" & volume -f 'V%i' > /tmp/panel-fifo definekey top XF86AudioLowerVolume voldown definekey top s-Next voldown definekey top s-a voldown # Mute alias voltoggle exec amixer -D pulse set Master toggle && ratpoison -c "echo Sound: `amixer get Master|awk '/Mono:/ {print $6}'`" definekey top XF86AudioMute voltoggle definekey top s-Pause voltoggle #------------------------------------------------------------- # Brightness Control #------------------------------------------------------------- alias brightup exec xbacklight -inc 10 alias brightdown exec xbacklight -dec 2 definekey top XF86MonBrightnessUp brightup definekey top XF86MonBrightnessDown brightdown definekey top s-Home brightup definekey top s-g brightup definekey top s-End brightdown definekey top s-d brightdown #------------------------------------------------------------- # MPD (Music) Control #------------------------------------------------------------- # Aliases alias playinfo exec ratpoison -c "echo Music: `mpc -h 127.0.0.1 | head -2 | tail -1 | awk '{print $1}'`" alias volinfo exec ratpoison -c "echo `$HOME/.config/ratpoison/mpdvolind`" alias songinfo exec ratpoison -c "echo Music: `mpc -h 127.0.0.1 | head -1`" #alias volinfo exec ratpoison -c "echo `$HOME/.config/ratpoison/cmusvolind`" #alias playinfo exec ratpoison -c "echo Music: `cmus-remote -Q | awk '/status/ {print $2}'`" #alias songinfo exec ratpoison -c "echo Playing:`cmus-remote -Q | awk '/ artist/ {$1=$2=""; print $0}'` - `cmus-remote -Q 2>/dev/null | grep title | awk '{$1=$2=""; print $0}'`" # Play/Pause and Volume definekey top s-space exec mpc -h 127.0.0.1 toggle && ratpoison -c 'playinfo' definekey top s-Right exec mpc -h 127.0.0.1 next && ratpoison -c "songinfo" definekey top s-Left exec mpc -h 127.0.0.1 prev && ratpoison -c "songinfo" definekey top s-Up exec mpc -h 127.0.0.1 volume +5 && ratpoison -c "volinfo" definekey top s-w exec mpc -h 127.0.0.1 volume +5 && ratpoison -c "volinfo" definekey top s-Down exec mpc -h 127.0.0.1 volume -5 && ratpoison -c 'volinfo' definekey top s-r exec mpc -h 127.0.0.1 volume -5 && ratpoison -c "volinfo" # Old cmus controls #definekey top s-space exec cmus-remote -u && ratpoison -c "playinfo" #definekey top s-Right exec cmus-remote -n && ratpoison -c "songinfo" #definekey top s-Left exec cmus-remote -r && ratpoison -c "songinfo" #definekey top s-Up exec cmus-remote -v +5% && ratpoison -c "volinfo" #definekey top s-Down exec cmus-remote -v -5% && ratpoison -c "volinfo" # Show song that is playing definekey top Print songinfo #------------------------------------------------------------- # Unbindings #------------------------------------------------------------- unbind Q unbind C-A unbind C-a unbind C-p unbind C-apostrophe unbind C-i unbind C-Return unbind C-n unbind C-m unbind C-c unbind C-k unbind C-l unbind C-K unbind C-exclam unbind C-grave unbind C-u unbind C-g unbind C-space unbind C-v unbind C-s unbind C-Right unbind C-Up unbind C-Down unbind C-x unbind C-f unbind C-V unbind C-S unbind C-w unbind C-b #------------------------------------------------------------- # Layout saving #------------------------------------------------------------- # bind M-! to store the current frame layout in slot #1 bind M-exclam exec ratpoison -c "setenv fs1 `ratpoison -c 'fdump'`" #bind M-1 to restore the frame layout in slot #1 bind M-1 exec ratpoison -c "frestore `ratpoison -c 'getenv fs1'`" # Do the same for slot #2 and bind it to M-@ and M-2, respectively. bind M-at exec ratpoison -c "setenv fs2 `ratpoison -c 'fdump'`" bind M-2 exec ratpoison -c "frestore `ratpoison -c 'getenv fs2'`" # Give ourselves another slot on M-# and M-3, respectively. bind M-numbersign exec ratpoison -c "setenv fs3 `ratpoison -c 'fdump'`" bind M-3 exec ratpoison -c "frestore `ratpoison -c 'getenv fs3'`"