saaiov0.3.1

Guides

Themes

#Introduction

Out of the box, saaio draws in your terminal's own colors, so it fits whatever theme your terminal already has. When you want saaio's own look, or colors of your own, you set them in theme.toml, next to config.toml (~/.config/saaio/theme.toml by default).

A theme extends another one and changes only the colors you name:

extends = "saaio"

[ui]
accent = "#d9825b"

[state]
ended = "faint"

[phase]
merge-request = "#d08ad6"

A key you leave out keeps the color of the extended theme. The UI repaints within a second of saving theme.toml or a theme it extends, so you can try colors while it runs. saaio's mark is always ▚▄▞, drawn with block characters in the accent color.

#The built-in themes

saaio comes with three themes:

ThemeColors
terminal (default)the terminal's own colors, fixed shades for panel, selection, accent and phases
saaiosaaio's dark colors
saaio-lightsaaio's light colors

To switch to one, a single line is enough:

extends = "saaio-light"

#The file

You don't have to start from an empty file. The UI writes theme.toml on its first run, with every setting commented out at its default (the terminal theme). To set one, remove the # in front of it. The same content is in examples/theme.toml, and an edited file is never overwritten.

#Colors

Every color key takes one of these values:

ValueMeans
"#rrggbb"hex color, such as "#d9825b"
0 to 255ANSI color index. 0 to 15 are the terminal's sixteen colors (4 blue, 8 gray) and follow its palette.
"default"the terminal's foreground or background
a key's namethat key's color, such as "faint", from this file or the extended theme

A [phase] color can name a [ui] or [state] key, but no key can name a phase color.

#Top-level keys

Two keys stand above the tables:

KeyDefaultEffect
extends"terminal"base theme: "terminal", "saaio", "saaio-light", or a file name in themes/ next to theme.toml, without .toml
phase_colors"off"how much of a working flow takes its phase's color, see below

#Phase colors

By default, a flow is drawn in the color of its state. With phase_colors, a working flow can show the color of its phase instead, so you see at a glance which flows are planning and which are in review:

phase_colors = "steps"
phase_colorsA working flow shows its phase color in
"off"nothing. State colors only. The current step dot takes the state color.
"steps"the current step dot. Spinner, label, rail and title row keep the state color.
"full"the current step dot, spinner, label, rail and title row

At every level, finished steps are plain in the sidebar and a ✓ in the done color in the board's detail, and a waiting, blocked or done flow keeps its state color. Before its first phase, a flow takes the working color. phase_colors comes from the nearest file that sets it, so theme.toml wins over the themes it extends.

#[ui]

The [ui] table colors saaio's frame:

KeyColorsterminalsaaiosaaio-light
backgroundthe ground everything is drawn on"default"#141418#f6f5f1
panelthe title row above the pane235#1f1f26#ecebe5
selectionthe row the keys go to: the selected session, field or card236#26262e#e2e0d8
rulelines and borders8#34343d#cfcdc4
textordinary text"default"#c8c8d0#2b2b30
strongnames and titles, drawn bold"default"#f0f0f4#111114
mutedquieter text: idle sessions, what a flow is doing7#9a9aa6#5d5d66
faintthe quietest text: key hints, headings, counts8#6c6c78#73737c
accentsaaio's ▚▄▞ mark and the bar beside the selected row173#e07a52#b8532f

#[state]

The [state] table colors a flow by where it stands:

KeyColors a flow thatterminalsaaiosaaio-light
workingis at work4#7aa7ff#2f5fd0
waitingneeds you3#e5b45a#9a6a00
blockedis blocked or not responding1#f0717f#c2283f
doneis finished2#93c46d#3d7a22
endedended8#6c6c78#73737c

#[phase]

The keys of [phase] are the phase names of your workflow. A phase without a color takes the color of its place:

PlaceBuilt-in phaseterminalsaaiosaaio-light
1stplan141#b392f0#7a4fc9
2ndimplement75#7aa7ff#2f5fd0
3rdreview80#56c2c2#13807f
4thmerge-request176#e07fd0#b0399c

The terminal theme uses indexes above 15, since terminals often repaint their own blue, magenta and cyan.

Note

Phase colors show only with phase_colors set to "steps" or "full".

#Themes of your own

A theme of your own is a file in ~/.config/saaio/themes/<name>.toml, with the same keys as theme.toml, and extends = "<name>" names it. It can extend another theme in turn, up to four files deep counting theme.toml.

This is how another tool can write saaio's colors. Here is a Noctalia template, rendered on every theme change. Save it as ~/.config/noctalia/templates/saaio.toml:

# saaio theme, written by Noctalia on every theme change.
extends = "terminal"

[ui]
background = "{{colors.surface.default.hex}}"
panel      = "{{colors.surface_container.default.hex}}"
selection  = "{{colors.surface_container_high.default.hex}}"
rule       = "{{colors.outline_variant.default.hex}}"
text       = "{{colors.on_surface.default.hex}}"
strong     = "{{colors.on_surface.default.hex}}"
muted      = "{{colors.outline.default.hex | lighten 0.2}}"
faint      = "{{colors.outline.default.hex}}"
accent     = "{{colors.primary.default.hex}}"

[state]
working = "#7aa7ff"

Then add it to Noctalia's user templates:

[theme.templates.user.saaio]
input_path = '~/.config/noctalia/templates/saaio.toml'
output_path = '~/.config/saaio/themes/noctalia.toml'

And finally point theme.toml at it:

extends = "noctalia"

#Errors

A broken theme never leaves you with a broken screen: saaio keeps the last working colors. The title row shows the file, the line where there is one, and the reason until the file reads again. The error also goes to server.log:

theme: ~/.config/saaio/theme.toml:3: accent belongs in [ui], not [state]

The other messages follow the file and the line where there is one, with the key first for a color (theme.toml:3: accent: #d9825 is no #rrggbb color):

  • #d9825 is no #rrggbb color
  • 300 is no ANSI index (0-255)
  • clay is no color and no key
  • [ui] has no key acent
  • unknown key acent
  • extends must be a theme's name
  • Build is no phase name
  • ~/.config/saaio/themes/gone.toml does not exist
  • ~/.config/saaio/theme.toml extends more than 4 themes deep
  • phase_colors is off, steps or full
  • accent, muted name each other