Skip to content

Latest commit

 

History

History
257 lines (183 loc) · 6.93 KB

ratpoison.org

File metadata and controls

257 lines (183 loc) · 6.93 KB

My window manager configuration

images/ratpoison.png

Disable “Welcome” message.

I disabled the default welcome message on start up RP.

startup_message off

Unmanaged windows.

List of unmanaged windows.

unmanage xmessage

Appearance.

set font "Anonymous Pro-13"
set bgcolor LightGray
set bargravity ne
set barpadding 5 0
set winliststyle row
set winfmt [%n] %s %t
set winname class
set wingravity c
set maxsizegravity c

RP “The best wm for smaller screens!”

I use Ratpoison on tiny 10 inch screen. So I disabled borders/panels etc..

set padding 0 0 0 0
set barborder 0
set border 0

Other commands.

Don’t change the cursor into a square when waiting for a key.

set waitcursor 0

I like 3 seconds for messages.

msgwait 3

Rudeness.

# Rudeness is a bitwise or of the following values:
# 1 Transient windows may raise.
# 2 Normal windows may raise.
# 4 New transient windows end up in the foreground.
# 8 New normal windows end up in the foreground.
rudeness 12

Hooks.

  1. Warp the rat to corner of the screen every time you press a top level bound key.
  2. Display information about the current window when you switch to a different window.
  3. Display information about the current window when you switch to a different frame.
addhook key banish
addhook switchwin info [%n] %t
addhook switchframe info [%n] %t

Key bindings.

Ratpoison Escape key

escape C-a

Groups/Windows/Frames

bind z windows
bind o only
bind u undo
bind d dedicate
bind g groups

GnuScreen like keys for split frames

bind s hsplit
bind C-s hsplit
bind S split
bind C-S split

Using Other Window Manager

Use at your own risk ☠!!!

Temporarily gives control over to Calavera window manager and regains control once it has terminated. I use this when I have to play with floating windows.

bind W tmpwm calavera-wm

Run-or-raise

Emulate stumpwm run-or-raise with ratpoison.

Get the run-or-raise script form here.

  1. C-t c run-or-raise to the Urxvt inside running Screen session. Set window 0 for default shell in your ~/.screenrc config.
  2. C-t E run-or-raise Emacs GUI
  3. C-t e run-or-raise to the Emacs inside running Screen session. Set window 1 for emacs in your ~/.screenrc config.
  4. C-t w run-or-raise Conkeror
bind c exec screen -X select 0; exec ~/bin/ratpoison/rp-run-or-raise.sh URxvt 'urxvt'
alias emacs exec ~/bin/ratpoison/rp-run-or-raise.sh Emacs 'emacsclient -ca emacs'
bind E emacs
alias escreen exec screen -X select 1; exec ~/bin/ratpoison/rp-run-or-raise.sh URxvt 'urxvt'
bind e escreen
alias conkeror exec ~/bin/ratpoison/rp-run-or-raise.sh Conkeror 'conkeror'
bind w conkeror

Function

Open man pages from RP.

bind m exec ratpoison -c "exec urxvt -e man $(ratpoison -c "prompt Manpage:")"

Show Dropbox status.

bind D exec ratpoison -c "echo `dropbox status`"

Displays the date with a calendar indicating today.

The script comes in the RP contrib dir (here).

alias time exec /usr/share/ratpoison/ratdate.sh
bind t time

Show info script.

Get the ratpoison-info script from here.

bind I exec ~/bin/ratpoison/rat_info.sh

Toggle on|off energy saving.

Get the script from here.

alias screensaver exec ~/bin/system/dpms-toggle.sh
bind Pause screensaver

Toggle on|off touchpad.

Get the script from here.

alias toggletouchpad exec ~/bin/system/touchpad_toggle
bind BackSpace toggletouchpad

Take a screenshot.

alias ratshot exec import -window root png:$HOME/Pictures/Screenshots/ratpoison-$(date +%s)$$.png && ratpoison -c "echo Ratshot saved!"
definekey top Print ratshot

Other.

Abort keystrokes.

definekey root Escape abort

Prevent accidental closes.

unbind k

Multimedia keys.

Audio/Volume keys.

definekey top XF86AudioRaiseVolume exec amixer -q set PCM 5+ unmute; ratpoison -c "echo RaiseVolume +5"
definekey top XF86AudioLowerVolume exec amixer -q set PCM 5- unmute;  ratpoison -c "echo LowerVolume -5"
definekey top XF86AudioMute exec amixer -q set PCM toggle; ratpoison -c "echo [ MUTE ]"

Control EMMS (emacs multimedia system)

definekey top XF86AudioPlay exec urxvt -e emacsclient -e "(emms-pause)"; ratpoison -c "echo toggle EMMS"
definekey top XF86AudioPrev exec urxvt -e emacsclient -e "(emms-previous)"; ratpoison -c "echo EMMS << Previous song"
definekey top XF86AudioNext exec urxvt -e emacsclient -e "(emms-next)"; ratpoison -c "echo EMMS >> Next song"

Aliases.

  1. Edit the ratpoison(rc) config file (requiere emacs).
  2. Quickly checks if I have new (g)mail (requiere xmessage).
  3. Run skype with GSPCA webcams video support.
  4. Create Note (requiere emacs-deft-mode).
  5. Start shutdown/reboot menu (requiere xmessage).

Get the scripts (2) gmail.sh, (3) run-skype, (5) poweroff.sh

alias edit exec emacs $HOME/.ratpoisonrc
alias mail exec ~/bin/mail/gmail.sh
alias skype exec ~/bin/system/run-skype.sh
alias enote exec emacsclient -c --eval '(deft)'
alias poweroff exec ~/bin/system/poweroff.sh

Initial commands.

List of programs that start when ratpoison starts.

exec urxvt -e screen -RD
exec conkeror