Table of Contents

# $EPIC: window.txt,v 1.9 2007/03/28 22:26:59 jnelson Exp $

Synopsis:

window <refnum> <command> [<arguments> …]

About Servers:

Windows are portals to irc servers. Through your windows, you send and receive data from the irc servers you are connected to. Each open server has one (or more) windows “attached” to it. This association is so strong that a server is connected to when the first window is attached and a server is disconnected when the last window is detached.

About Screens:

Screens are the portal between you and your windows. When you are typing text, you are actually talking to the screen, and the screen sends your commands on to the current window, who then talks to its associated server. Windows can be visible (assigned to a screen) or hidden (not assigned to a screen), and this does not affect their operation.

Description:

The WINDOW command allows you to manipulate your windows. You can perform roughly 7 types of operations:

Type 1 -- Servers

The primary duty of every window is to act as a portal to a server, to hold output between you and the server. These operations allow you to assign or de-assign a window's connection with servers

DISCON (Deprecated) Disassociate window with server
NOSERV Force the window not to belong to any server
SERVER Associate window with server

Type 2 -- Message routing

Each server can have multiple windows, and you may want to sort the output from a server and send it to various windows based on different criteria. An example of this is having a separate window for each channel or query. These operations allow you to tell what window gets what otuput.

ADD Associate nick/target with this window
CHANNEL Make channel this window's current channel
ECHO Output a message to this window
LEVEL Associate output levels with this window
QUERY Set a window's default message target
REJOIN Join a channel on this window's server
REMOVE Disassociate nick/target with this window

Type 3 -- Screen management

Each window can either be visible (assigned to a screen) or hidden (not assigned to a screen), and can have be in any position and of any size. These operations allow you to manage the placement and composition of your windows on your screens.

BACK Do a window refnum_or_swap to the window that was previously the current window on this screen.
BALANCE On a split screen, make all windows on this screen the same size
CREATE Create a new physical screen and new window on it
DELETE Destroy the current screen (cannot destroy the first screen)
FIXED Toggle value: ON means the window's size cannot be changed implicitly.
GOTO On a split screen, switch to the Nth window (1 == top window)
GROW On a split screen, increase this window's size
HIDE On a split screen, make this window invisible (disassociate it from the window)
HIDE_OTHERS On a split screen, make all other windows on this screen invisible
KILL Irreversibly destroy this window. See link – this has several side effects!
KILL_ALL_HIDDEN Irreversibly destroy all windows that are not on a screen (“invisible”)
KILL_OTHERS Irreversibly destroy all other windows, visible or invisible
KILLSWAP Atomically window swap and window kill this window.
LAST On a split screen, Do a window refnum to the window that was previously the current window on this screen. If that would fail, do a window goto 1
MOVE On a split screen, move a window up or down in order.
MOVE_TO On a split screen, move a window to a certain place in the order.
NEW Split the screen, creating a new visible window. Other windows are resized to make room.
NEW_HIDE Create a new window not associated with any screen. Usually you window swap it in.
NEXT Do a window swap with the hidden window that has the next higher refnum than this window's refnum.
POP Do a window refnum on the last window you did window push in. If the window is hidden, window show it first. If the window has been destroyed, do nothing.
PREVIOUS Do a window swap with the hidden window that has the next smaller refnum than this window's refnum.
PUSH
REFNUM On a split screen, switch to the window with the specific refnum. Fails if the window does not exist or is invisible.
REFNUM_OR_SWAP
SHOW Associate another (invisible) window with this window's screen. Fails if the other window is not invisible. Windows are resized to make room
SHOW_ALL Do a window show on each hidden window.
SHRINK On a split screen, reduce the size of the window
SIZE On a split screen, make this window a certain size.
SKIP Toggle value: ON means the window cannot be made the current window except by an explicit window refnum. A window where FIXED == OFF and SKIP == OFF does not count as a visible window, even if it is visible.
STACK Display the window push stack, removing any stale entries
SWAP Atomically do a window hide on the current window and window show on another window. If either operation would fail (ie, if the other window is not invisible), do nothing.
SWAPPABLE Toggle value: OFF means the window's visibility cannot be changed (if visible, cannot be hidden, if invisible, cannot be shown)

Type 4 -- View management

Each window has three “views” which control what you see in your window. These views are the Normal View, the Hold Mode View, and the Scrollback View. All three views operate independantly of the other two, and epic automatically decides which view is being used. These operations allow you to control the three views, and what they show.

CLEAR Advance the Normal View so all of the lines on it are blank.
FLUSH Irreversibly delete everything below what is visible in the Hold Mode View. The Normal View is reset to the Hold Mode View.
HOLD_INTERVAL Integer value: The number of “held lines” are truncated down to multiples of this number (to prevent excessive redrawing of the status bar)
HOLD_MODE Boolean value: When first set ON, the Hold Mode View is reset to the Normal View, and is advanced every time the bind send_line keybinding is invoked.
HOLD_SLIDER Integer value: This is the percentage of the screen size that the Hold Mode View is advanced each time you invoke the bind send_line keybinding. The default value is 100.
INDENT Set text indent on a per-window basis.
SCROLL_BACKWARD This moves the Scrollback View back towards the older part of the scrollback buffer.
SCROLL_END This cancels the Scrollback View, returning you to either the Hold Mode View, or the Normal View.
SCROLL_FORWARD This moves the Scrollback View towards the newer part of the scrollback buffer. When the Scrollback View reaches the same place as the Normal View, the Scrollback View is cancelled.
SCROLL_START This moves the Scrollback View to the oldest item in the scrollback buffer.
SCROLLADJ Toggle value: When ON, when a window increases in size, the Normal View is moved back so lines that have recently scrolled off are made visible again. When OFF, the Normal View is unchanged, so blank lines are visible on the bottom of the window.
SCROLLBACK Integer Value: Sets the minimum-maximum size of the scrollback buffer. The scrollback buffer may grow larger than this value, but when it is truncated, it always retains this many items.
SEARCH_BACK Reset the Scrollback View so the top of the window contains the next older line that matches a regex pattern.
SEARCH_FORWARD Reset the Scrollback View so the top of the window contains the next newer line that matches a regex pattern.

Type 5 -- Status bar

Every window has a status bar, which shows one or two lines of meta information about the window and its associated server. These operations allow you to manage the window's status bar

DOUBLE Toggle value: When ON, the window will show two status bars. When OFF, the window will show one status bar.
KILLABLE Toggle value: When ON, one is able to destroy the window. When OFF, /window kill produces no effect.
NOTIFY Toggle value: When ON, when the window is hidden and “notifiable” output occurs to it, the window's refnum will appear in the %F status bar expando on the current window's status bar.
NOTIFY_LEVEL The output levels that are considered “notifiable”
NOTIFY_NAME What should appear in %F when this window is “notifying” (defaults to the window's refnum).
STATUS_FORMAT What should appear in the window's status bar when window double is off.
STATUS_FORMAT1 What should appear in the window's lower status bar when window double is on.
STATUS_FORMAT2 What should appear in the window's upper status bar when window double is on.
STATUS_SPECIAL What should appear in %. in this window's status bar.

Type 6 -- Others

These are the operations that don't fit nicely in the other categories.

BEEP_ALWAYS Toggle value: When OFF, beeps to this window are ignored when the window is hidden. When ON, beeps to this window are sounded even when hidden.
DESCRIBE Give more detailed information about this window.
LIST Summarize all windows, visible and invisible.
LASTLOG Integer value: Sets the maximum size of the lastlog buffer. This many logical lines of output are retained for use by the lastlog command.
LASTLOG_LEVEL Logical lines of output whose output level is not one of these levels will not show up in the lastlog command.
LOG Toggle value: When ON, all logical lines of output to this window are saved to a logfile.
LOGFILE The filename where the log should be saved.
NAME The name of the window.
NUMBER The refnum of the window.
PROMPT XXX I think this is unused XXX
REFRESH Force screens to be updated/redrawn, even if it's not time for it yet. This may cause flicker.
TOPLINE Change a window topline.
TOPLINES Change how many window toplines are visible.

Type 7 -- Deprecated

These operations used to have some function in the past, but they will either be removed, or made useless in the future.

BIND (Deprecated) Force this channel to be the current channel after a reconnect+rejoin. EPIC5 does not have reconnect+rejoin.
UNBIND (Deprecated) Stop forcing this channel to be the current channel after a reconnect+rejoin. EPIC5 does not have reconnect+rejoin.
SCRATCH (Deprecated) Toggle value: When ON, arbitrary lines on the window may be overwritten. In EPIC5, all windows are scratch windows.
SCROLL (Deprecated) Toggle value: When OFF, output to a window wraps around from the bottom to the top, instead of scrolling old output up and off the top of the window. In EPIC5, all windows are scrolling windows.

Syntax:

The WINDOW command breaks down into a stream of operations of the form:

WINDOW <refnum> <operation> <operation-arguments>

The <refnum> is the target of the <operation>. The <refnum> is optional. The default <refnum> for the first operation is the current server, and the default <refnum> for subsequent operations is the window from the previous operation. This allows you to chain multiple operations together in one window.

If any <operation> fails, the window command fails immediately and any further operations are NOT performed.

If any <refnum> does not exist, the window command fails immediately and any further operations are NOT performed.

History:

The WINDOW command was already present in ircII2.1.5g. Many of the WINDOW operations are EPIC extensions.