Documentation

Introduction to Multiple Windows

If you connect to more than one account or more than one server (using the File/New Connection menu command or the Sessions toolbar button), TeSSH will put each session into a different window. This allows you to control multiple session at once.

The commands that you type in the command line are sent to the session window that currently has the focus. This is usually the window on top. You can change the currently focused window in several ways: select the window from the list given in the Window menu, or just click on the window caption when more than one window is open. You can also cycle through the open windows using the Ctrl-N or Ctrl-Tab keys.

Each window has a name associated with it. The default name for a window is the Title of your server session. You can change this name using the #NAME command, or by renaming the window in the Package Editor.

Multiple Windows

The #WINDOW can be used to create a new window, or to switch to an existing window with a given name. For example, typing:

#WINDOW Errors

will create a new window called "Errors". If you add text to the #WINDOW command, the text is displayed in the window (but not executed):

#WINDOW Errors "This is an error message"

will display "This is an error message" in the window that we just created. But the keyboard focus will remain in the current window in this case.

To send commands to a different window, precede your command with name: where name is the name of the window you wish to get focus, and : is the focus character (which can be changed in the Preferences). The indicated window will be brought to the top and focused, and the command will be sent to that character. To send a command to a different window without changing the focus, precede your command with :name: where name is the name of the window you want to command sent to. In this case, your current window will be unchanged. To send a command to all windows, use * for the window name, or use the #ALL command.

When referring to windows by name, you don't have to spell out the entire name, just use enough characters to uniquely determine the window. For example, if you have a window named "Errors", then typing err:test is enough to send test to the Errors window. You can also give a list of window names separated by commas. For example, z,a:hi would send hi to the window starting with 'z' and the window starting with 'a'.

Finally, you can use tab completion to change window focus without sending any commands to the window. Typing Error: and pressing <TAB> will give the Errors window focus and bring it to the top. The command buffer will then be cleared, awaiting commands to be sent to this window.

Capturing text and sending it to another window

One of the most common uses of multiple windows is to capture text from the main server window and then send it to another window. For example, your main server window can often get cluttered with various text. If you want to ensure that you never miss a line with an error, you could create this trigger:

#TRIGGER {Error} {#CAPTURE Errors}

The #CAPTURE command will create the window if it doesn't exist, and will then send the last line received in the main window to the named window. In this example, any line that contains "Error" will be displayed in the "Errors" window. If you also wanted to remove this line from the main window, then you could add the #GAG command to the trigger.

Window Layout

TeSSH will normally try to automatically save your window layout for your session. If you create multiple windows and dock them in some way, TeSSH will save this docking layout and restore it the next time you open the session.

However, if you open multiple sessions, TeSSH will not save your layout (it doesn't want to overwrite your saved layout for each session). If you want to save the layout of multiple sessions, use the File/Save Session As menu command to create a new "composite" session that will automatically load both sessions that are currently open. This will add a third icon to your session screen that can be used to open both sessions at once and restore the window layout that you are using.

Window Activity

When you have more than one window open, you can use the Tabbed Layout to display each window name in a tab bar. To bring a window to the front, just click on a tab. This is the same as clicking on the window itself, or selecting it from the list in the Window menu.

To the left of the window name in each tab is an activity indicator. When the indicator is an empty circle, that indicates the current window that has focus. Other status indicators include:

red dot
session has been disconnected
green dot
session has received new text since the last time it was active
yellow dot
session has disconnected, but was able to automatically reconnect
yellow bolt
session is connecting

Add comment

Login or register to post comments