Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Theme

Theming allows you to customize the appearance of the Slumber TUI. To start, open up your configuration file and add some theme settings:

theme:
  primary_color: green
  secondary_color: blue

Fields

FieldTypeDescription
primary_colorColorColor of most emphasized content
primary_text_colorColorColor of text on top of the primary color (generally white or black)
secondary_colorColorColor of secondary notable content
success_colorColorColor representing successful events
error_colorColorColor representing error messages
background_colorColorColor of the background of the application
border_colorColorColor for pane and popup borders
disabled_colorColorColor for text and components that are unavailable
text_colorColorColor of regular text
hint_text_colorColorColor for deemphasized text like hints and notes
text_box_background_colorColorBackground color of text boxes
alternate_row_background_colorColorBackground color of alternating table rows
alternate_row_text_colorColorText color of alternating table rows
syntaxObjectVisual configuration for the syntax highlighting (see below)

Syntax Highlighting Fields

FieldTypeDescription
builtin_colorColorColor for builtins
comment_colorColorColor for comments
escape_colorColorColor for escape characters
number_colorColorColor for numbers
special_colorColorColor for special characters
string_colorColorColor for strings

Color Format

Colors can be specified as names (e.g. “yellow”), RGB codes (e.g. #ffff00) or ANSI color indexes. See the Ratatui docs for more details on color deserialization.