[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RP] Scripting question - or two...
From: |
Mike Meyer |
Subject: |
Re: [RP] Scripting question - or two... |
Date: |
Sat Oct 6 12:40:01 2001 |
Gergely Nagy <address@hidden> types:
> Thus spoke Mike Meyer <address@hidden> on 2001-10-05 04:42:27:
> > This wouldn't really add any new functionality - assuming the thing
> > about getting windows to appear in the frame I want them in is
> > possible - it would make writing scripts to drive things much, much
> > easier. For example, a ratmenu-like popup that lists "workspaces", and
> > lets you change between them, reconfiguring the frames and putting
> > different windows where you want them would be straightforward.
> The CVS version has focus{ip,down,left,right} which helps a lot with
> this, and a sample script in contrib/.
I'm running it, and have looked at that script. The problem is getting
windows to open where I want them. The execd command returns
immediately, and the following focusX commands happen before the first
window opens. It's getting those synchronized that's the problem.
> > Reactions? Rotten tomatoes?
> AFAIK, there was a todo item to make some commands return stuff, when
> they are called without arguments, so they could be parsed and used
> later. If that is implemented, I think you could do everything with
> a CORBA-less ratpoison, albeit, you'll have to call a binary (I can't
> really imagine scripting ratpoison from anything other than shell, so
> I don't consider this a big disadvantage).
Yup, you can do everything without the CORBA interface. That's
possible even for conventional window managers, as there is a suite of
shell tools for manipulating windows in any conventional window
manager, and those can probably be adopted for use with ratpoison. But
having a real programming language is handy. My favorite window
manager script tiled a selected set of windows. Not useful in
ratpoison, I admit.
As for the shell - I'd be interested in a shell version of the
ratwinmenu.py script I just posted. The loop part done with corba
would look something like:
import ratpoison
for win in ratpoison.manager.windows():
args.append('%s%s%s:ratpoison -c select %s"' %
(win.number, win.status, win.name.replace(':', '!'), win.number)
Putting ratmenu in the middle makes things interesting.
> Another thing against CORBA is that it adds a dependency on the CORBA
> libs, and ratpoison depended only on libc and the X libs so far, and
> avoided other libs.
> However, I'd be interested in seeing CORBA support, as a compile-time
> option maybe, it should be fun :)
Yup. That's how I did it last time. make -DCORBA to get the CORBA
version, otherwise you get the plain version.
Of course, I've got more important problems - like getting the "meta"
command to work! - first. I've built the debugging version, and meta
is getting run; the XSendEvent doesn't work :-(.
<mike
--
Mike Meyer <address@hidden> http://www.mired.org/home/mwm/
Q: How do you make the gods laugh? A: Tell them your plans.
- [RP] Scripting question - or two..., Mike Meyer, 2001/10/05
- Re: [RP] Scripting question - or two...,
Mike Meyer <=
- Re: [RP] Scripting question - or two..., Gergely Nagy, 2001/10/06
- Re: [RP] Scripting question - or two..., Martin Samuelsson, 2001/10/06
- Re: [RP] Scripting question - or two..., Mike Meyer, 2001/10/06
- Re: [RP] Scripting question - or two..., eichin-ratp, 2001/10/07
- Re: [RP] Scripting question - or two..., Martin Samuelsson, 2001/10/27
- Re: [RP] Scripting question - or two..., Ryan Yeske, 2001/10/28
- Re: [RP] Scripting question - or two..., eichin-ratp, 2001/10/28