On 26-Feb-2002 Jamin W. Collins wrote: > Here's an update to the previous script based on the feedback received. > I've attempted to make the script somewhat more shell neutral. Please let > me know of any problems you encounter. I didn't mean to start a > shell-war, I simply coded the script for the shell I was using (that > appears to have been a bit of a mistake). > > Here's a short snippet of the changes in this version. > > 2/26/02 - v0.02 > - adjust script to run under ash (per user feedback) > - removed extranious IFS variable setting > - removed shell header comment from created bbsession file > - added check for temp file creation programs > > Jamin W. Collins
Not a bad first cut. It currently fails on any X app which uses a controlling unmapped window (aka netscape, probably acroread, etc). I have netscape on workspace 4 and xlsclients lists the controller and not the real window. Since netscape never maps the controller this window is missing any blackbox hints. I think the long term solution will involve querying the window manager. Only it can return the definitive list of known windows. I gutted bblaunch and started a bbsession program. This is about an hour's worth of coding, so do not expect too much (-: And yes it has its own issues. The command for netscape is set on the unmapped controller. So the code needs to query for the client_leader and get the command from there. My thought is to store the clients in a map and only store a client if it does not have a leader. This will also prevent bbsession from getting confused if you run it while composing an email (which I did, and it did get confused). No offense intended Jamin, I just do not feel a shell script will get us to the goal.
bbsession.c
Description: bbsession.c