Introduction
By default, lektra looks for:
~/.config/lektra/config.toml
If the file doesn't exist, lektra falls back to defaults.
You can look at this complete config file for reference: config.toml.
UI
Window
| Key | Type | Description | Default |
fullscreen | bool | Start fullscreen. | false |
menubar | bool | Show menubar. | false |
startup_tab | bool | Show startup tab. | false |
window_title | string | Template string. {} is replaced by base file name. | "{} - lektra" |
Statusbar
| Key | Type | Description | Default |
visible | bool | Show statusbar. | true |
padding | array | Padding [top, right, bottom, left]. | [5, 5, 5, 5] |
show_session_name | bool | Show current session name. | true |
show_file_name | bool | Show current file name. | true |
show_mode | bool | Show current interaction mode. | true |
show_page_number | bool | Show current page number. | true |
show_progress | bool | Show reading progress. | true |
Command Palette
| Key | Type | Description | Default |
show_shortcuts | bool | Display keyboard shortcuts. | false |
height | int | Palette height in pixels. | 400 |
width | int | Palette width in pixels. | 600 |
| Key | Type | Description | Default |
visible | bool | Show LLM widget by default. | false |
panel_width | int | Widget panel width in pixels. | 400 |
Layout
| Key | Type | Description | Default |
mode | string | "single", "top_to_bottom", "left_to_right" | "top_to_bottom" |
initial_fit | string | "none", "width", "height", "window" | "width" |
auto_resize | bool | Fit document to window on resize. | false |
spacing | int | Spacing between pages. | 0 |
Zoom
| Key | Type | Description | Default |
level | float | Default zoom factor. | 1.0 |
factor | float | Factor for zoom in/out. | 1.25 |
Selection
| Key | Type | Description | Default |
drag_threshold | int | Drag threshold in pixels. | 100 |
| Key | Type | Description | Default |
horizontal | bool | Show horizontal scrollbar. | true |
vertical | bool | Show vertical scrollbar. | true |
auto_hide | bool | Auto-hide scrollbars. | true |
search_hits | bool | Show search hits on scrollbar. | true |
size | int | Scrollbar thickness in pixels. | 12 |
hide_timeout | int | Time in ms to hide when auto_hide is true. | 1000 |
Markers
| Key | Type | Description | Default |
jump_marker | bool | Show jump marker. | true |
Links
| Key | Type | Description | Default |
boundary | bool | Show link boundary box. | false |
detect_urls | bool | Detect and create links for URLs in text. | true |
url_regex | string | Regex for URL detection. | (see below) |
Link Hints
| Key | Type | Description | Default |
size | float | Relative scale for link hint labels. | 0.25 |
Tabs
| Key | Type | Description | Default |
visible | bool | Show tab bar. | true |
auto_hide | bool | Hide tab bar when only one tab. | true |
closable | bool | Allow closing tabs. | true |
movable | bool | Allow reordering tabs. | true |
elide_mode | string | "none", "start", "middle", "end" | "middle" |
location | string | "top", "bottom", "left", "right" | "top" |
Outline
| Key | Type | Description | Default |
visible | bool | Show outline by default. | false |
panel_position | string | "left", "right" | "left" |
type | string | "overlay", "dialog", "side_panel" | "overlay" |
panel_width | int | Panel width in pixels. | 300 |
Highlight Search
| Key | Type | Description | Default |
visible | bool | Show highlight search by default. | false |
panel_position | string | "left", "right" | "right" |
type | string | "overlay", "dialog", "side_panel" | "overlay" |
panel_width | int | Panel width in pixels. | 300 |
Colors
All colors are RGBA hex strings.
| Key | Description | Default |
accent | Accent UI color. | #3daee9FF |
background | Background color. | #00000000 |
search_match | Search match highlight. | #55500033 |
search_index | Current search hit highlight. | #55FF0055 |
link_hint_bg | Link hint background. | #000000FF |
link_hint_fg | Link hint foreground. | #ea3ee9FF |
selection | Selection overlay. | #33000055 |
highlight | Highlight color. | #55FF0055 |
jump_marker | Jump marker indicator. | #FF0000FF |
annot_rect | Rectangle annotation color. | #55FF5588 |
annot_popup | Popup annotation background. | #FFFFFFAA |
Rendering
| Key | Type | Description | Default |
dpi | float | Base render DPI. | 72.0 |
dpr | float or map | Device pixel ratio (global or per-output). | 1.0 |
cache_pages | int | How many pages to keep in cache. | 4 |
antialiasing_bits | int | 4=good, 8=high. | 8 |
icc_color_profile | bool | Enable ICC color management. | true |
DPR
Use a map if you run mixed DPI monitors. Use a single float if you don't care.
Behavior
| Key | Type | Description | Default |
initial_mode | string | Startup mode. | "text_select_mode" |
always_open_in_new_window | bool | Open files in a new window. | false |
remember_last_visited | bool | Restore last visited file. | true |
page_history | int | History depth. | 100 |
confirm_on_quit | bool | Ask before quitting. | false |
invert_mode | bool | Invert colors. | false |
auto_reload | bool | Auto reload file when it changes. | true |
recent_files | bool | Track recent files. | true |
num_recent_files | int | Max recent files count. | 25 |
undo_limit | int | Undo history size. | 25 |
synctex_editor_command | string | Editor command using %f and %l. | "zeditor %f:+%l" |
LLM (Optional)
Works only if lektra is compiled with LLM support.
| Key | Type | Description | Default |
provider | string | LLM backend. | "ollama" |
model | string | Provider model name. | "llama3.2:3b" |
max_tokens | int | Response length limit. | 512 |
Theming
Kvantum is a powerful SVG-based theme engine for Qt. It supports dark themes, custom widgets, and integrates well with Qt6.
It is available in the standard repository for your distribution. Once installed, select a theme in
kvantummanager and set:
export QT_STYLE_OVERRIDE=kvantum