| 1 |
# Alloy schema for rio.toml |
| 2 |
# |
| 3 |
# Target file: ~/.config/rio/config.toml |
| 4 |
# Alloy ships defaults at etc/skel/.config/rio/config.toml. |
| 5 |
# |
| 6 |
# Format: schema-format v1. See docs/CONSOLE.md#the-schema-format for |
| 7 |
# the DSL reference. `alloy config <path>` renders a form from this |
| 8 |
# schema, edits values in place via toml_edit, and preserves any keys |
| 9 |
# not covered here (unknown_keys = "preserve"). |
| 10 |
|
| 11 |
[schema] |
| 12 |
target = "rio.toml" |
| 13 |
target_tool = "rio" |
| 14 |
target_version = ">=0.2" |
| 15 |
schema_version = "1" |
| 16 |
unknown_keys = "preserve" |
| 17 |
|
| 18 |
# ------------------------------------------------------------------- |
| 19 |
# UI sections — the form renders one collapsible pane per section, |
| 20 |
# ordered as declared here. Fields fall into a section by path prefix. |
| 21 |
# ------------------------------------------------------------------- |
| 22 |
|
| 23 |
[[section]] |
| 24 |
path = "navigation" |
| 25 |
description = "Rio tab / split behavior. Alloy runs Sway for tiling, so the default disables both." |
| 26 |
|
| 27 |
[[section]] |
| 28 |
path = "window" |
| 29 |
description = "Window frame, opacity, and decorations." |
| 30 |
|
| 31 |
[[section]] |
| 32 |
path = "renderer" |
| 33 |
description = "GPU backend and render performance." |
| 34 |
|
| 35 |
[[section]] |
| 36 |
path = "fonts" |
| 37 |
description = "Font family, weights, and size." |
| 38 |
|
| 39 |
[[section]] |
| 40 |
path = "cursor" |
| 41 |
description = "Cursor shape and blink." |
| 42 |
|
| 43 |
[[section]] |
| 44 |
path = "colors" |
| 45 |
description = "ANSI palette and semantic colors. Presets swap the whole palette in one action." |
| 46 |
|
| 47 |
[[section]] |
| 48 |
path = "bindings" |
| 49 |
description = "Rio-scoped keybindings. Empty by default; Sway owns global binds." |
| 50 |
|
| 51 |
# ------------------------------------------------------------------- |
| 52 |
# Fields — navigation |
| 53 |
# ------------------------------------------------------------------- |
| 54 |
|
| 55 |
[[field]] |
| 56 |
path = "navigation.mode" |
| 57 |
type = "enum" |
| 58 |
default = "Plain" |
| 59 |
description = "Rio-native tab and split behavior." |
| 60 |
values = [ |
| 61 |
{ value = "Plain", label = "Plain", description = "No tabs, no splits. Recommended under Sway." }, |
| 62 |
{ value = "CollapsedTab", label = "Collapsed tabs", description = "Rio-drawn tab strip, collapsed." }, |
| 63 |
{ value = "BottomTab", label = "Bottom tabs", description = "Rio-drawn tabs at the bottom." }, |
| 64 |
{ value = "TopTab", label = "Top tabs", description = "Rio-drawn tabs at the top." }, |
| 65 |
] |
| 66 |
|
| 67 |
# ------------------------------------------------------------------- |
| 68 |
# Fields — window |
| 69 |
# ------------------------------------------------------------------- |
| 70 |
|
| 71 |
[[field]] |
| 72 |
path = "window.background-opacity" |
| 73 |
type = "float" |
| 74 |
range = [0.0, 1.0] |
| 75 |
default = 1.0 |
| 76 |
description = "Window background opacity (0 = transparent, 1 = opaque)." |
| 77 |
|
| 78 |
[[field]] |
| 79 |
path = "window.decorations" |
| 80 |
type = "enum" |
| 81 |
default = "Disabled" |
| 82 |
description = "Client-side decorations. Alloy runs Sway with server-side frame-off; leave Disabled." |
| 83 |
values = [ |
| 84 |
{ value = "Enabled", label = "Enabled", description = "Rio draws its own title bar." }, |
| 85 |
{ value = "Disabled", label = "Disabled", description = "No decorations (recommended under Sway)." }, |
| 86 |
{ value = "Transparent", label = "Transparent", description = "Frameless with transparency." }, |
| 87 |
] |
| 88 |
|
| 89 |
# ------------------------------------------------------------------- |
| 90 |
# Fields — renderer |
| 91 |
# ------------------------------------------------------------------- |
| 92 |
|
| 93 |
[[field]] |
| 94 |
path = "renderer.performance" |
| 95 |
type = "enum" |
| 96 |
default = "High" |
| 97 |
description = "Render-loop performance target. Lower reduces GPU load on battery." |
| 98 |
values = ["High", "Low"] |
| 99 |
|
| 100 |
[[field]] |
| 101 |
path = "renderer.backend" |
| 102 |
type = "enum" |
| 103 |
default = "Automatic" |
| 104 |
description = "GPU backend. Automatic lets wgpu pick vulkan / gl / metal per platform." |
| 105 |
values = ["Automatic", "Vulkan", "GL", "Metal", "DX12"] |
| 106 |
|
| 107 |
[[field]] |
| 108 |
path = "renderer.disable-unfocused-render" |
| 109 |
type = "bool" |
| 110 |
default = false |
| 111 |
description = "Skip rendering while the window is unfocused. Saves power at the cost of stale content flashes on refocus." |
| 112 |
|
| 113 |
# ------------------------------------------------------------------- |
| 114 |
# Fields — fonts |
| 115 |
# ------------------------------------------------------------------- |
| 116 |
|
| 117 |
[[field]] |
| 118 |
path = "fonts.size" |
| 119 |
type = "float" |
| 120 |
range = [6.0, 48.0] |
| 121 |
default = 12.0 |
| 122 |
description = "Font size in points. 12 at 1080p; 13-14 on HiDPI or larger panels." |
| 123 |
|
| 124 |
[[field]] |
| 125 |
path = "fonts.family" |
| 126 |
type = "string" |
| 127 |
default = "IosevkaTerm Nerd Font" |
| 128 |
description = "Default font family. Alloy ships IosevkaTerm Nerd Font per docs/STACK.md#fonts." |
| 129 |
|
| 130 |
# Weight/style variants: repeating tables with the same shape. |
| 131 |
# Written out per variant because the paths are literal keys, not a list. |
| 132 |
|
| 133 |
[[field]] |
| 134 |
path = "fonts.regular.family" |
| 135 |
type = "string" |
| 136 |
default = "IosevkaTerm Nerd Font" |
| 137 |
description = "Regular-variant family." |
| 138 |
|
| 139 |
[[field]] |
| 140 |
path = "fonts.regular.style" |
| 141 |
type = "enum" |
| 142 |
values = ["Normal", "Italic"] |
| 143 |
default = "Normal" |
| 144 |
description = "Regular-variant style." |
| 145 |
|
| 146 |
[[field]] |
| 147 |
path = "fonts.regular.weight" |
| 148 |
type = "int" |
| 149 |
range = [100, 900] |
| 150 |
default = 400 |
| 151 |
description = "Regular-variant weight (100-900, 400 = normal)." |
| 152 |
|
| 153 |
[[field]] |
| 154 |
path = "fonts.bold.family" |
| 155 |
type = "string" |
| 156 |
default = "IosevkaTerm Nerd Font" |
| 157 |
description = "Bold-variant family." |
| 158 |
|
| 159 |
[[field]] |
| 160 |
path = "fonts.bold.style" |
| 161 |
type = "enum" |
| 162 |
values = ["Normal", "Italic"] |
| 163 |
default = "Normal" |
| 164 |
description = "Bold-variant style." |
| 165 |
|
| 166 |
[[field]] |
| 167 |
path = "fonts.bold.weight" |
| 168 |
type = "int" |
| 169 |
range = [100, 900] |
| 170 |
default = 600 |
| 171 |
description = "Bold-variant weight." |
| 172 |
|
| 173 |
[[field]] |
| 174 |
path = "fonts.italic.family" |
| 175 |
type = "string" |
| 176 |
default = "IosevkaTerm Nerd Font" |
| 177 |
description = "Italic-variant family." |
| 178 |
|
| 179 |
[[field]] |
| 180 |
path = "fonts.italic.style" |
| 181 |
type = "enum" |
| 182 |
values = ["Normal", "Italic"] |
| 183 |
default = "Italic" |
| 184 |
description = "Italic-variant style." |
| 185 |
|
| 186 |
[[field]] |
| 187 |
path = "fonts.italic.weight" |
| 188 |
type = "int" |
| 189 |
range = [100, 900] |
| 190 |
default = 400 |
| 191 |
description = "Italic-variant weight." |
| 192 |
|
| 193 |
[[field]] |
| 194 |
path = "fonts.bold-italic.family" |
| 195 |
type = "string" |
| 196 |
default = "IosevkaTerm Nerd Font" |
| 197 |
description = "Bold-italic-variant family." |
| 198 |
|
| 199 |
[[field]] |
| 200 |
path = "fonts.bold-italic.style" |
| 201 |
type = "enum" |
| 202 |
values = ["Normal", "Italic"] |
| 203 |
default = "Italic" |
| 204 |
description = "Bold-italic-variant style." |
| 205 |
|
| 206 |
[[field]] |
| 207 |
path = "fonts.bold-italic.weight" |
| 208 |
type = "int" |
| 209 |
range = [100, 900] |
| 210 |
default = 600 |
| 211 |
description = "Bold-italic-variant weight." |
| 212 |
|
| 213 |
# ------------------------------------------------------------------- |
| 214 |
# Fields — cursor |
| 215 |
# ------------------------------------------------------------------- |
| 216 |
|
| 217 |
[[field]] |
| 218 |
path = "cursor.shape" |
| 219 |
type = "enum" |
| 220 |
values = ["block", "underline", "beam"] |
| 221 |
default = "block" |
| 222 |
description = "Cursor shape." |
| 223 |
|
| 224 |
[[field]] |
| 225 |
path = "cursor.blinking" |
| 226 |
type = "bool" |
| 227 |
default = false |
| 228 |
description = "Whether the cursor blinks." |
| 229 |
|
| 230 |
# ------------------------------------------------------------------- |
| 231 |
# Group — colors |
| 232 |
# |
| 233 |
# All 25 palette slots share type = color, format = hex. The group |
| 234 |
# expands to one field per entry at `colors.<key>`. Presets below |
| 235 |
# swap the whole palette in one action. |
| 236 |
# ------------------------------------------------------------------- |
| 237 |
|
| 238 |
[[group]] |
| 239 |
path = "colors" |
| 240 |
type = "color" |
| 241 |
format = "hex" |
| 242 |
description = "Terminal palette. The Akari Dawn preset is the shipped default; individual slots can be tuned or another preset applied." |
| 243 |
entries = [ |
| 244 |
{ key = "background", default = "#e4ded6", description = "Surface background." }, |
| 245 |
{ key = "foreground", default = "#1a1816", description = "Primary text." }, |
| 246 |
{ key = "cursor", default = "#1a1816", description = "Cursor color." }, |
| 247 |
{ key = "selection-background", default = "#dad2c7", description = "Selected-text background (border-subtle)." }, |
| 248 |
{ key = "selection-foreground", default = "#1a1816", description = "Selected-text foreground." }, |
| 249 |
|
| 250 |
# Normal ANSI 0-7 |
| 251 |
{ key = "black", default = "#1a1816", description = "ANSI 0 — text-primary." }, |
| 252 |
{ key = "red", default = "#6a2828", description = "ANSI 1 — accent-error." }, |
| 253 |
{ key = "green", default = "#3a5830", description = "ANSI 2 — accent-ok." }, |
| 254 |
{ key = "yellow", default = "#b07840", description = "ANSI 3 — accent-warn." }, |
| 255 |
{ key = "blue", default = "#304050", description = "ANSI 4 — accent-info." }, |
| 256 |
{ key = "magenta", default = "#806080", description = "ANSI 5 — accent-syntax." }, |
| 257 |
{ key = "cyan", default = "#222d38", description = "ANSI 6 — text-secondary (Alloy has no cyan accent)." }, |
| 258 |
{ key = "white", default = "#ede7de", description = "ANSI 7 — surface-raised." }, |
| 259 |
|
| 260 |
# Dim / bright ANSI 8-15 |
| 261 |
{ key = "dim-black", default = "#222d38", description = "ANSI 8 — text-secondary." }, |
| 262 |
{ key = "dim-red", default = "#6a2828", description = "ANSI 9." }, |
| 263 |
{ key = "dim-green", default = "#3a5830", description = "ANSI 10." }, |
| 264 |
{ key = "dim-yellow", default = "#b07840", description = "ANSI 11." }, |
| 265 |
{ key = "dim-blue", default = "#304050", description = "ANSI 12." }, |
| 266 |
{ key = "dim-magenta", default = "#806080", description = "ANSI 13." }, |
| 267 |
{ key = "dim-cyan", default = "#514b45", description = "ANSI 14 — text-muted." }, |
| 268 |
{ key = "dim-foreground", default = "#514b45", description = "Dim foreground fallback." }, |
| 269 |
|
| 270 |
{ key = "light-black", default = "#514b45", description = "Bright ANSI 8 — text-muted." }, |
| 271 |
{ key = "light-red", default = "#6a2828", description = "Bright ANSI 9." }, |
| 272 |
{ key = "light-green", default = "#3a5830", description = "Bright ANSI 10." }, |
| 273 |
{ key = "light-yellow", default = "#b07840", description = "Bright ANSI 11." }, |
| 274 |
{ key = "light-blue", default = "#304050", description = "Bright ANSI 12." }, |
| 275 |
{ key = "light-magenta", default = "#806080", description = "Bright ANSI 13." }, |
| 276 |
{ key = "light-cyan", default = "#222d38", description = "Bright ANSI 14 — text-secondary." }, |
| 277 |
{ key = "light-foreground", default = "#1a1816", description = "Bright foreground." }, |
| 278 |
] |
| 279 |
|
| 280 |
# ------------------------------------------------------------------- |
| 281 |
# Presets — grouped-swap UX. |
| 282 |
# |
| 283 |
# Applying a preset writes every listed path in one atomic edit |
| 284 |
# (single dirty state, one undo entry). Alloy currently ships one: |
| 285 |
# Akari Dawn (Alloy's default light theme). A dark-mode counterpart |
| 286 |
# (Akari Night, see MNW/shared/themes/akari-night.toml) lands as a |
| 287 |
# second preset once the dark-mode ANSI mapping is worked in real use. |
| 288 |
# ------------------------------------------------------------------- |
| 289 |
|
| 290 |
[[preset]] |
| 291 |
name = "Akari Dawn (light)" |
| 292 |
description = "Alloy's default light theme. Warm-clay paper in lantern light — based on Shu Kutsuzawa's Akari (MIT). Source: MNW/shared/themes/akari-dawn.toml." |
| 293 |
values = { |
| 294 |
"colors.background" = "#e4ded6", |
| 295 |
"colors.foreground" = "#1a1816", |
| 296 |
"colors.cursor" = "#8a4530", |
| 297 |
"colors.selection-background" = "#dad2c7", |
| 298 |
"colors.selection-foreground" = "#1a1816", |
| 299 |
"colors.black" = "#1a1816", |
| 300 |
"colors.red" = "#6a2828", |
| 301 |
"colors.green" = "#3a5830", |
| 302 |
"colors.yellow" = "#b07840", |
| 303 |
"colors.blue" = "#304050", |
| 304 |
"colors.magenta" = "#806080", |
| 305 |
"colors.cyan" = "#222d38", |
| 306 |
"colors.white" = "#ede7de", |
| 307 |
"colors.dim-black" = "#222d38", |
| 308 |
"colors.dim-red" = "#8a4530", |
| 309 |
"colors.dim-green" = "#3a5830", |
| 310 |
"colors.dim-yellow" = "#b07840", |
| 311 |
"colors.dim-blue" = "#304050", |
| 312 |
"colors.dim-magenta" = "#806080", |
| 313 |
"colors.dim-cyan" = "#514b45", |
| 314 |
"colors.dim-foreground" = "#514b45", |
| 315 |
"colors.light-black" = "#514b45", |
| 316 |
"colors.light-red" = "#8a4530", |
| 317 |
"colors.light-green" = "#3a5830", |
| 318 |
"colors.light-yellow" = "#b07840", |
| 319 |
"colors.light-blue" = "#304050", |
| 320 |
"colors.light-magenta" = "#806080", |
| 321 |
"colors.light-cyan" = "#222d38", |
| 322 |
"colors.light-foreground" = "#1a1816", |
| 323 |
} |
| 324 |
|
| 325 |
# ------------------------------------------------------------------- |
| 326 |
# Fields — bindings (list of tables) |
| 327 |
# ------------------------------------------------------------------- |
| 328 |
|
| 329 |
[[field]] |
| 330 |
path = "bindings.keys" |
| 331 |
type = "list" |
| 332 |
default = [] |
| 333 |
description = "Rio-scoped keybindings. Empty by default — Sway owns global binds; add entries here only for rio-internal actions (e.g. tab navigation if you turn navigation.mode on)." |
| 334 |
element = { type = "table", fields = [ |
| 335 |
{ path = "key", type = "string", required = true, description = "Keychord in rio syntax (e.g. \"ctrl+shift+t\")." }, |
| 336 |
{ path = "action", type = "string", required = true, description = "Action to invoke (e.g. \"CreateTab\")." }, |
| 337 |
{ path = "mode", type = "string", required = false, description = "Optional: restrict to a rio mode." }, |
| 338 |
] } |
| 339 |
|