Ratpoison config

Submitted by ormiret on Thu, 08/02/2007 - 00:37.

I have now got ratpoison working almost perfectly. There is a bit of a hack to get the initial layout as ratpoison was running my .ratpoisonrc quickly enough that all the apps ended up in the final frame rather than the one that was focused when I called the exec line to start them. The hack is that I do the laying out by running the commands in .rat_layout after the apps have finished loading with C-t l

.ratpoisonrc:

# For the benefit of emacs users: -*- shell-script -*-
# .ratpoisonrc
# Basic syntax: a bunch of commands to ratpoison to get things setup
# exec runs things
# bind sets up keys 


# Start xbindkeys
exec xbindkeys

# Make messages appear in the middle of the screen:
set bargravity c

# set window borders to 0
set border 0

# switch off the startup message
startup_message off

# 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'`"


# make a display a calendar for the current month.
bind a exec ratpoison -d :0.0 -c "echo `date +'%r - %A %n    %D - %B'`  `cal | tail -n +2 | sed -e 's/^Su/\n\n Su/' -e 's/.*/ & /' -e \"s/\ $(date +%e)\ /\/\"`"

# Start some default apps:
exec xfce4-panel
exec urxvt
exec emacs
exec iceweasel
exec sylpheed-claws-gtk2
exec nm-applet
exec gaim
exec gnome-power-manager
exec gmpc

# Make some frames:
vsplit 30
focus
hsplit 370

bind l source .rat_layout

.rat_layout:

# -*- shell-script -*- 


# empty each of the frames so I can use select to put windows in
# frames without worrying about switching frames:
fselect 0
select -
fselect 1
select -
fselect 2
select -

# Go through the frames again and put the right windows in them, and
# lock the pannel
fselect 0
dedicate 0
select Xfce Panel
dedicate 1
fselect 1
select ormiret@eligeto: ~
fselect 2
select Iceweasel

# Save the current layout to slot 1
setenv fs1 `ratpoison -c 'fdump'`

( categories: )