Skip to content
This repository has been archived by the owner on Jun 20, 2020. It is now read-only.

Latest commit

 

History

History
48 lines (34 loc) · 1.33 KB

idsession.asciidoc

File metadata and controls

48 lines (34 loc) · 1.33 KB

idsession.kak

The default name for a new session is the process ID of the server, which makes it difficult to differentiate one session from another. The idsession command fixes that by renaming the current session into a name that’s human-readable (hyphen separated adjective/noun pair).

Commands

idsession

Rename the current session. The current session name is expected to be a number to use as a seed, which is the case in a new session (the process ID of the server is the session name). If the session name is not a number, 0 will be used as a seed.

The seed is subsequently used to pick an adjective and a noun that will make up the resulting session name. The selection is a simple modulo, which makes the outcome of this function deterministic for the same seed.

To automatically rename new sessions, call this command from a hook:

hook global KakBegin .* idsession

Variables

idsession_adjectives

List of adjectives that will make up the first part of the adjective/noun pair.

The default list of adjectives contain words that start with the letter k, e.g. "katari".

idsession_names

List of nouns that will make up the second part of the adjective/noun pair.

The default list of nouns contain words that start with the letter k, e.g. "kettle".