dsemy.com [Up]

4.1 ID display

By default, the ID of each tracked window is displayed as a mode line lighter. This behavior is controlled by wincom-display-lighter.

Additionally, (custom) display functions could be added to wincom-mode-hook. These functions should enable ID display when wincom-mode is enabled, and disable ID display when wincom-mode is disabled. They can also make use of wincom-before-command-hook and wincom-after-command-hook (See Window commands) to display IDs only during window selection. See the description and implementation of wincom-display-mode-line and wincom-display-mode-line-conditional below for more information.

It is also possible to use wincom-format-id directly in e.g. mode-line-format, although details vary depending on how and where you want the IDs to be displayed.

User Option: wincom-display-lighter

Whether or not to show a mode line lighter. A non-nil value means show a mode line lighter. A value of nil means don’t show a mode line lighter. By default, t is used.

User Option: wincom-mode-hook

Hook run when enabling or disabling wincom-mode.

User Option: wincom-id-format

Format string for the window ID. Used in the mode line lighter, and display functions may use this format string to display the ID, but they can also ignore it. The string should contain a single occurrence of %s, which will be replaced by the ID. By default, " <%s>" is used.

Function: wincom-format-id window

Format an ID string (according to wincom-id-format) for WINDOW.

Function: wincom-display-mode-line

Reference implementation of a “simple” display function, displaying window IDs at the beginning of the mode line. Display window IDs if wincom-mode is enabled, and disable displaying window IDs if wincom-mode is disabled. This display function respects wincom-id-format.

Function: wincom-display-mode-line-conditional

Reference implementation of a conditional display function, displaying window IDs at the beginning of the mode line during window selection. Add a hook to wincom-before-command-hook which displays window IDs on the mode line and add a hook to wincom-after-command-hook which hides window IDs from the mode line if wincom-mode is enabled, and remove those hooks if wincom-mode is disabled. This display function respects wincom-id-format.