On Sat, Dec 20, 2014 at 09:14:13AM -0800, kario tay <[email protected]> wrote:
> I wanted to know if there are any resources
> available for understanding and using
> the 'term' class.

I don't see any reference for "term class", unless you mean "urxvt::term
class" which is clearly described in the urxvtperl manpage.

I am afraid you need to ask a much more specific question.

> 1. How exactly is $term defined?

rxvt-unicode is free software, you cna look at the exact deifnition by
downloading the source code. wherever you got the binary is also the
place to get the corresponding source code.

>   $term = new urxvt::term $envhashref, $rxvtname, [arg...]
> 
> I've used "my $env = $self->env;" to define the
> $envhashref. So I suppose that the existing terminal's
> environment variables are used for the new terminal.
>
> I suppose this corresponds directly to the environment
> variables themselves, since the following reproduces
> those variables...

The env hash ref is indeed a hashref that contains the environment for the
terminal (env is short for environment), and using $self->env is a common
idiom in existing extensions to inherit the environment from the current
terminal.

> ...and the following creates a reference to the 'envv' hash:
> my @envv = $self->envv;

No, that simply returns all environment variables by value.

> Is this correct? It seems odd to have to explicitly declare
> the environment if that setting will remain unchanged in the
> vast majority of cases.

What would be the alternative?

> 2. How should $rxvtname be set? Setting it to a name of my
> choice results in two windows opening rather than one.
> That behavior is odd... what is the correct way to define
> the $rxvtname variable?

Really, same thing as in system(perl) or execve(2), the program
name. Without looking at your code, I can't say why you get two windows,
but urxvt will not open two terminals just because you use a different
name.

> What exactly does ", [arg...]" refer to?

[] signifies optional arguments, and ... indicates one or more.

> 3. How is $term itself used? It apparently isn't
> a reference to the new terminal window. What is its
> purpose and how do you use it? An example would
> probably be extremely useful here.

It certainly should be a reference to the new terminal object, what made you
think it isn't?

> 4. How can $term->exec_async ($cmd) send a command
> to the new terminal window?

Not at all.

> Is there a better way to send commands to a new window? Examples?

Urxvt only knows the single command it starts within the terminal window,
it cannot start additional commands (it would be technically possible, but
almost cetrainly very undesirable).

> 5. Is there a way to specify which desktop a terminal
> window should appear in?

Very likely, but since desktops are a window manager construct, you need
to consult the documentation of your window manager to find out how to
make it do it - in X11, applications do not open windows themselves, they
merely ask the wm to open one for them, which then choses desktop etc.

> FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
> Check it out at http://www.inbox.com/earth

Please don't advertise proprietary windows software on this list.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      [email protected]
      -=====/_/_//_/\_,_/ /_/\_\

_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode

Reply via email to