Next: Window commands, Up: Customization [Contents][Index]
By default, the ID of each tracked window is displayed as a mode line
lighter. This behavior is controlled by swsw-display-lighter
.
Additionally, (custom) display functions could be added to
swsw-mode-hook
. These functions should enable ID display when
swsw-mode
is enabled, and disable ID display when
swsw-mode
is disabled. They can also make use of
swsw-before-command-hook
and swsw-after-command-hook
(see See Window commands) to display IDs only during window
selection. See the description and implementation of
swsw-mode-line-display-function
and
swsw-mode-line-conditional-display-function
below for more
information.
It is also possible to use swsw-format-id
directly in
e.g. mode-line-format
, although details vary depending on how
and where you want the IDs to be displayed.
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.
Hook run when enabling or disabling swsw-mode
.
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.
Format an ID string (according to swsw-id-format
) for WINDOW.
Reference implementation of a “simple” display function, displaying
window IDs at the beginning of the mode line. Display window IDs if
swsw-mode
is enabled, and disable displaying window IDs if
swsw-mode
is disabled. This display function respects
swsw-id-format
.
Reference implementation of a conditional display function, displaying
window IDs at the beginning of the mode line during window selection.
Add a hook to swsw-before-command-hook
which displays window
IDs on the mode line and add a hook to swsw-after-command-hook
which hides window IDs from the mode line if swsw-mode
is
enabled, and remove those hooks if swsw-mode
is disabled. This
display function respects swsw-id-format
.
Next: Window commands, Up: Customization [Contents][Index]
Copyright © Daniel Semyonov 2020-2022