-
Notifications
You must be signed in to change notification settings - Fork 6
UIOverview
Irssi is deliberately designed to allow most of the actual text and formatting to be customised by themes and scripts. This is achieved by a combination of expandable markup templates, and special escape codes to generate colour and other formatting features.
-
Internals documents the underlying mechanism for how these features are implemented, but this page in intended to give an overview for people looking to write or customise their theme files.
-
Irssi::UI::Theme also contains details of the functions available to script writers who wish to use themes and formats within their code.
-
Formats describes the various markup syntax used within the theme templates for colour and other formatting.
-
Complete Format List categorises the available internal formats and themes in a way that can be easily searched for those trying to customise a specific aspect.
Templates are the main workhorse of Irssi the display customisations.
In use, they take the form '{template_name arg1 arg2 ...}, or are used in the [[printformat $msg_level, $format, @params`|Irssi#Printing]]
In construction, they are typically written as
# bold the first argument, followed by a space and then all subsequent args.
some_format = "%_$0%_ $1-";Named arguments are not possible, they exand only based on positional arguments, so it is often necessary to read the code or comments surrounding them to determine the positional value of each argument.
They are subject to various rules of expansion before display, as will be outlined below.
Replaces are a special case of "not-quite-templates", but rather global mappings which are applied to rendered templace once everything else is complete.
By default, their only function is to darken the [] brace characters, as
shown by the line in Format List#Replacements.
Abstracts are the major contents of each theme file, and define the basic templates which are built upon by formats.
Formats are special flavours of templaates, in that they are exposed to the
use via the /FORMAT <module> <key> <value> command.
Much of the content on these pages is taken from original Irssi documentation and is Copyright © 2000-2010 The Irssi project. Formatting and additional documentation, examples, etc by Tom Feist and the other editors of this wiki. This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. Please see http://creativecommons.org/licenses/by-sa/2.5/ for details.