ratpoison-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RP] suggestions for sample.ratpoisonrc


From: Joe Corneli
Subject: [RP] suggestions for sample.ratpoisonrc
Date: Mon Feb 2 23:42:00 2004

OK, I figured out a satisfactiory answer to my keymap question when
Ryan asked me to explain it better (the answer was "root").

(I was trying to figure out what <escape> ? was bound to.)

The reason I couldn't use <escape> ?  to figure this out was that my
.ratpoison had some extra long lines, newly imported from the
sample.ratpoisonrc.

I'd like to suggest revising the sample.ratpoisonrc so that it reads
something like this:

# Here's a hack from John Meacham (requires GNU sed): 

alias calendar exec /usr/bin/ratpoison -d :0.0 -c "echo `/bin/date +'%r - %A %n 
   %D - %B'` `/usr/bin/cal | /usr/bin/tail +2 | /usr/bin/sed -e 's/^ S/\n\n &/' 
-e 's/.*/ & /' -e \"s/\ $(/bin/date +%e)\ /\<$(/bin/date +%e)\>/\"`"

# hack to store the current frame layout in slot #1

alias insertframe exec /usr/bin/ratpoison -c "setenv fs1 `/usr/bin/ratpoison -c 
'fdump'`"

# hack to restore the frame layout in slot #1

alias useframe exec /usr/bin/ratpoison -c "frestore `/usr/bin/ratpoison -c 
'getenv fs1'`"

# define additional framesets as needed...

# alias insertframetwo exec /usr/bin/ratpoison -c "setenv fs2 
`/usr/bin/ratpoison -c 'fdump'`"
# alias useframetwo exec /usr/bin/ratpoison -c "frestore `/usr/bin/ratpoison -c 
'getenv fs2'`"
# alias insertframethree exec /usr/bin/ratpoison -c "setenv fs3 
`/usr/bin/ratpoison -c 'fdump'`"
# alias useframethree exec /usr/bin/ratpoison -c "frestore `/usr/bin/ratpoison 
-c 'getenv fs3'`"

bind i insertframe
bind u useframe
bind a calendar

This way the help system doesn't get thrown off by the long
commands.  It might be good to put a caveat in the documentation
somewhere -- maybe in the sample.ratpoison file -- that says why one
should use aliases for extra long commands.

Joe

PS. I made a couple of modifications to John's calendar to get it to
work on my system (I of course have all the usr's as sw's). In
addition to depending on the version of sed, it seems to depend on
the version of cal (I have a BSD version right now, and I'm not sure
where to get the GNU version).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]