a terminal client for Lurker, written in Rust


on this page

ui.lua

Layout: what is on screen, how wide it is, and what it is drawn with. This is the ui table in the config, and all of it applies on F5 without a restart.

Style and panels

style string, default "modern"

How the scrollback and status bar are laid out. The panels work the same either way.

Value
"modern" 14:28:07 (avery) morning, with nicks right-aligned in a gutter and a symbol for each kind of event
"classic" [15:44] <avery> morning, in the ircII and BitchX tradition, with *** before every event and a bracketed status bar

"classic" ignores nick_column.

[15:44] *** avery (avery@example.net) has joined #lurker
[15:44] <avery> morning, the new backlog resume landed
[15:45] * kestrel updates the client
[15:46] *** Signoff: rowan (Ping timeout)

theme.lua carries a matching palette of plain ANSI colours, commented out, that follows your terminal's own colours. theme.lua shows it.

panel_style string, default "boxes"

How the panels are separated.

Value
"boxes" A box around each panel with its name set into the top edge. The topic gets a box of its own, and the status bar and prompt share one at the foot
"rules" One rule between neighbouring panels, shared between them

"boxes" is the panelled look, and costs a column and a row on every side of every panel. "rules" is the quieter one.

panel_titles boolean, default true

Name each panel: the buffer list, the buffer you are in, and the member count. The focused panel's name takes the accent colour. With "rules" the names go in a rule across the top, which costs a row. With "boxes" they sit in each box's top edge and cost nothing.

scrollbars string, default "off"

Scrollbars down the right of the scrollback, the sidebar and the member list.

Value
"off" None, and no column given up for one
"auto" A column is kept, and the thumb appears once there is more than fits. Nothing reflows as a buffer grows
"always" The track is drawn whether or not it can move

What is shown

show_sidebar boolean, default true

Show the buffer list on the left. F2 toggles it while running.

show_member_list boolean, default true

Show the member list on the right. F3 toggles it while running.

show_topic boolean, default true

Show the topic bar above the scrollback. F4 toggles it while running.

show_favorites boolean, default true

Show the favorites and friends sections at the top of the sidebar. F8 toggles them while running.

Hiding them only hides them. A favourite is still a favourite, still listed under its network, and still a favourite in the web UI.

startup_banner boolean, default true

Draw a banner in the client log when luir starts. On a pane too narrow for the art, the art is left out and the lines of text beneath it stay.

Which banner to draw, by name, or "random" for a different one on every start. Twelve are bundled: acid, chrome, circuit, fire, graffiti, halftone, inverse, neon, outline, overgrown, scanline and solid.

A name that matches no banner draws a random one instead, and the client log says which name it could not find.

Banners are ANSI art in the sixteen classic colours, and luir draws each colour as the theme colour that plays the same part: blue as the accent, red as the error colour, green as success, with the bright half lightened from them. So a banner follows whichever colour scheme is in force.

Your own banners. Save a .ans file in a banners folder beside the config, such as ~/.config/luir/banners/mine.ans. It joins the random pick, or can be named here as "mine". A file named like a bundled banner replaces that one. Any ANSI editor will do, PabloDraw or Moebius for instance. Files in UTF-8 and in code page 437 both work, a row ends at a line break, and colours beyond the sixteen are ignored.

Sizes

Width of the buffer list, in columns.

member_list_width integer, default 18

Width of the member list, in columns.

message_max_width integer, default 0

The widest message text is allowed to run, in columns, which keeps lines readable on a very wide terminal. 0 uses the whole pane.

line_spacing integer, default 0

Blank rows between messages. 0 packs them together.

nick_column integer, default 14

Right-align nicks into a gutter this many columns wide, so messages start in a straight line. 0 writes each nick inline, just before its message. The classic style ignores this. nick_truncate picks which end of a longer nick is cut.

nick_truncate string, default "start"

Which end of a nick too long for nick_column is cut off. The brackets around it stay either way.

Value Keeps Shows
"start" the end of the nick (…id/ratha.us)
"end" the start of the nick (david/ratha…)

Added in luir 0.4.0. Since an unknown key stops the config loading, earlier versions refuse it.

Messages

timestamp_format string, default "%H:%M:%S"

How timestamps are written, as a chrono strftime pattern.

Pattern Gives
"%H:%M:%S" 14:28:07
"%H:%M" 14:28
"%I:%M %p" 02:28 PM
"" no timestamps

F6 shows or hides timestamps while running.

compact boolean, default true

Leave the nick off consecutive messages from the same person, so a run of lines from one speaker names them once.

show_join_part boolean, default true

Show joins, parts and quits.

show_mode_changes boolean, default true

Show mode changes, such as +o and +b.

nick_colors boolean, default true

Give each nick a colour of its own, picked from the theme's nick_palette. The same nick always gets the same colour.

irc_colors boolean, default true

Draw the mIRC colour codes that some channels use in messages and topics. With false the codes are still stripped out, and bold, italic and underline still apply; only the colours are dropped.

merge_server_row boolean, default true

Draw each network as a single row in the sidebar, such as FXNet (core.fxnet.org), which can be selected and opens the server's own messages. false puts the network name on a heading of its own, with the server buffer as the first row beneath it.

Added in luir 0.2.0. Since an unknown key stops the config loading, 0.1.0 refuses it.

merge_system_row boolean, default true

Fold Lurker's own system buffer into the luir row, so the client log and the server's system messages share one scrollback, in the order they happened. The row shows both their unread counts, and reading it reads both. false gives system a row of its own again.

Added in luir 0.4.0. Since an unknown key stops the config loading, earlier versions refuse it.

buffer_numbers boolean, default false

Show each buffer's number in the sidebar. These are the numbers alt+1 to alt+9 jump to, and the ones the {activity} field of the status bar lists, so turning this on makes both readable at a glance.

How many cells of traffic sparkline to draw beside each channel and direct message: a dot for every minute that had messages in it, placed by how many. Braille fits two minutes into a cell, so 6 covers the last twelve minutes.

A minute with nothing in it is blank, and a buffer with nothing in the window draws nothing. Each buffer is scaled to itself, so a quiet channel still shows its own shape rather than being flattened by the busiest one. 0 turns it off and gives the width back to the names.

Mentions buffer

luir gathers every message that highlights you into a mentions buffer near the top of the sidebar, from every network and channel, and each line says where it was said. Its count goes up while you are somewhere else, and clears when you look.

What counts as a mention is Lurker's call rather than luir's: your nick, plus the highlight rules on your Lurker account, the same ones the web UI uses. Mentions from before luir started come from the server's highlights feed, and scrolling up pages further back through it. A server without that feed still gets the mentions that arrive while luir is connected, and the buffer says so.

Highlight rules

/highlight (or /hilight) lists your rules, numbered, and adds one when given some text. The text matches anywhere in a message, unless a flag says otherwise:

Flag Also written Makes the rule
-full -word Match whole words only
-regexp -regex Treat the text as a regular expression
-matchcase -case Match upper and lower case exactly
-network -net Apply on this network only
-global Apply on every network, the default
-channels #a,#b -channel Apply in those channels only
-mask Treat the text as a nick!user@host pattern, and match on who said it

/unhighlight (or /dehilight) removes a rule, by its number in the list or by its text. The rule for your own nick is Lurker's, and stays. A rule Lurker refuses, such as a regular expression that does not compile, comes back with the server's reason.

/highlight luir
/highlight -full -network deploy
/highlight -mask *!*@example.net
/unhighlight 2
mentions boolean, default true

Keep the mentions buffer near the top of the sidebar. false goes without it.

Added in luir 0.4.0. Since an unknown key stops the config loading, earlier versions refuse it.

mention_jump boolean, default true

In the mentions buffer, with nothing typed, up and down pick a mention and enter goes to where it was said. A click does the same. The channel opens with the mention a third of the way down, under what led up to it.

A mention from further back than the channel has loaded brings in the conversation around it. That stretch is held apart from new messages until you scroll down to them, or ctrl+end goes straight back to the newest.

false leaves the arrows, enter and the mouse as they are everywhere else.

Added in luir 0.4.0. Since an unknown key stops the config loading, earlier versions refuse it.

Rules between panels

borders boolean, default true

Draw the rules between panels at all.

border_style string, default "dashed"

How heavy the rules are. A terminal cell cannot be a fraction of a column wide, so the weight comes from the glyph.

Value Vertical Horizontal Box corners
"hairline" none of its own
"thin" ╭ ╮ ╰ ╯
"dashed" ╭ ╮ ╰ ╯
"thick" ┏ ┓ ┗ ┛
"double" ╔ ╗ ╚ ╝
"solid" ▛ ▜ ▙ ▟
"block"
border_chars list, optional

Set the rule glyphs outright, vertical first and then horizontal. This wins over border_style.

border_chars = { "|", "-" },

With panel_style = "boxes", the corners are drawn with the vertical glyph, since there is no third one to ask for.

border_mirror boolean, default true

Mirror the vertical glyph on a panel's left-hand edge.

The half-block weights, hairline and solid, put ink on one side of the cell and leave the other empty. Drawn the same way down both sides of the scrollback, that leaves a sliver of space beside one rule and none beside the other. Mirroring the left one keeps each rule's ink against its own panel and gives the scrollback the same space on both sides. false draws both alike. It makes no difference to the symmetric weights.

Mouse and bell

mouse boolean, default true

Use the mouse: click a buffer or a nick, and scroll with the wheel. While luir has the mouse, your terminal's own text selection is not available to you.

scroll_lines integer, default 3

How far one step of the mouse wheel scrolls, in lines. The wheel scrolls the member list while the pointer is over it, and the scrollback anywhere else.

bell_on_highlight boolean, default true

Ring the terminal bell when a message mentions you.

padding

Blank space inside each panel, in cells. Every panel that holds text gets a column either side by default, so nothing sits against a rule and everything down the screen starts on the same column. Vertical space stays tight, since rows are scarcer than columns.

padding = {
  sidebar  = 1,
  members  = 1,
  messages = 1,
  topic    = 1,
  input    = 1,
  vertical = 0,
},
padding.sidebar integer, default 1

Columns inside the buffer list, on the left and right.

padding.members integer, default 1

Columns inside the member list.

padding.messages integer, default 1

Columns inside the scrollback.

padding.topic integer, default 1

Columns inside the topic bar.

padding.input integer, default 1

Columns before the prompt, which keeps it lined up under the status bar.

padding.vertical integer, default 0

Blank rows above and below the scrollback.

marks

The characters around nicks, in the event gutter, and beside buffers and networks in the sidebar. Every one is optional.

Leaving a mark out means "follow the layout": the classic style wraps a speaker in <nick> and puts *** before every event, while the modern one writes (nick) and uses a symbol for each kind of event. Setting a mark applies it in both styles, so an explicit join is used in classic too, in place of ***.

marks = {
  nick_prefix = "<",
  nick_suffix = ">",
  join        = "-->",
  part        = "<--",
},

Speakers and events

Key modern classic Marks
nick_prefix ( < Before a speaker's nick
nick_suffix ) > After it
notice_prefix - - Before the sender of a notice
notice_suffix - - After it
action * * The start of a /me line
event not used *** Every server event, in the classic style
join *** Someone joining
part *** Someone leaving a channel
quit *** Someone quitting
kick *** A kick
nick_change ~ *** A change of nick, or of host
mode ± *** A mode change
topic *** A topic change
invite *** An invitation
error ! *** An error
system · *** Any other event

These are empty by default. A channel's name already starts with #, and anything that looks like @ or & beside a nick reads as a channel status the person does not hold.

Key Default Marks
buffer_channel empty A channel
buffer_direct empty A direct message
buffer_server empty A network's server buffer
buffer_system empty The system buffer
buffer_local empty luir's own buffers, such as the client log
buffer_pinned A pinned buffer

Network markers

Beside a network's name, one for each connection state. The colour says the same thing, so setting all three alike still reads.

Key Default Marks
network_connected A connected network
network_connecting A network that is connecting
network_offline A network that is not connected