screen-users
[Top][All Lists]
Advanced

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

Re: action upon re-attach


From: John Davidorff Pell
Subject: Re: action upon re-attach
Date: Fri, 24 Sep 2004 15:06:11 -0700

Thanks a bunch. This is perfect. :-) I was hoping that this would be done soon, but for the life of me I can't seem to find anything but the full release tar balls online. Is there a CVS somewhere?

What about the possibility of running arbitrary commands? Specifically, I would like to run a few setenv commands upon reattach (based on the attach-from environment).

About this patch, shouldn't the last line be "FindNiceWindow(fore, NULL)" or "FindNiceWindow(fore, '\0')"? I've noticed that the screen code really likes to use just plain 0 where it means NULL, or '\0', or "". Would patches to fix this be accepted?

Thanks again,
JP

On 24 Sep 2004, at 07:17, Michael Schroeder wrote:

On Fri, Sep 24, 2004 at 02:18:40AM -0700, John Davidorff Pell wrote:
Anyone out there want to offer some tips... or code? :-D

Creating new windows when attaching is not hard, the next screen
version will support it if you use '-p +'. Here's the part of
the code:

socket.c, in FinishAttach:

  if (*m->m.attach.preselect)
    {
      if (!strcmp(m->m.attach.preselect, "="))
        fore = 0;
      else if (!strcmp(m->m.attach.preselect, "-"))
        {
          fore = 0;
          noshowwin = 1;
        }
      else if (!strcmp(m->m.attach.preselect, "+"))
        {
          struct action newscreen;
          char *na = 0;
          newscreen.nr = RC_SCREEN;
          newscreen.args = &na;
          DoAction(&newscreen, -1);
        }
      else
        fore = FindNiceWindow(fore, m->m.attach.preselect);
    }
  else
    fore = FindNiceWindow(fore, 0);

Cheers,
  Michael.

--
Michael Schroeder           address@hidden
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}




--
"NOTICE: This E-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution or copying of this communication is strictly prohibited, Please reply to the sender that you have received the message in error, then delete it. Thank you."





reply via email to

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