ratpoison-devel
[Top][All Lists]
Advanced

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

Re: [RP] Patch to stop shells from being left around


From: Doug Kearns
Subject: Re: [RP] Patch to stop shells from being left around
Date: Wed Oct 10 05:54:13 2001
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20010917

Mike Meyer wrote:

Doug Kearns <address@hidden> types:

Mike Meyer wrote:

That's why I wrote the "ratpoison-get-a" script, to find a foo if I've
got it running, and if not to run a foo. I tend to have a lot of
things running at one time. Which is why the patch after the next was
going to be one to do something about the bar for "windows". I find
that it's frequently wider than my screen.

If your still keen something similar to the new 'windowlist' command in screen-3.9.11beta1 would be great :)


Nah - ratmenu will does the trick with a little scripting.

Yeah, that's what I've been doing but I'm not sure it's quite as flexible as screen's windowlist command. Although, I haven't really played with that much yet and probably shouldn't comment.

I tried
writing it as a shell command - then a script - and kept getting bit
by backtick parsing not recognizing quotes :-(. So I gave up and wrote
it in Python. Apologies to anyone who uses it and has to change the
paths.


<snip>

Well, here's the little hack that I've been using for a while.
It's probably even less portable than a python script, and a _whole_ lot uglier :)
It does, however, use the current value of defwinfmt for the ratmenu labels.

#v+
#!/bin/bash

# NOTE: need to replace ratmenu delimiter : with # in label names

RATMENU="ratmenu -style dreary -bg black -fg yellow"
eval "$RATMENU $( paste -d: <( ratpoison -c windows | tr ':' "#" | sed 's/"/\\"/g' ) \
                           <( ratpoison -c 'windows %n' ) \
| sed "s/:\([0-9]\+\)$/:ratpoison -c 'select \1'/;s/^\(.*\)$/\"\1\"/" \
                           | tr '\n' ' ' )"
#v-

Now, if I only I could find the time to patch ratmenu so that we can escape ':' characters in the label.

Regards,
Doug





reply via email to

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