Make your first configuration

Create the file

Run tessera config init to create a starter file without overwriting an existing one. Tessera uses ~/.config/tessera/config.sgl. If you set XDG_CONFIG_HOME, use $XDG_CONFIG_HOME/tessera/config.sgl instead. Tessera reads this Sigil file when it starts. Its last expression must produce a configuration.

Start with this file to choose your terminal and keyboard layout while keeping the stock palette, wallpaper, bar and bindings. config changes only the fields you name. A configuration file needs no imports or explicit base.

(config
  terminal: '("foot")
  keyboard: (keyboard layout: "us" options: "ctrl:nocaps"))

Copy the whole example into your file. The configuration loader supplies the usual configuration helpers, including keyboard, output, layout constructors and bar sections. Import another module only when you use a helper outside that vocabulary.

Reload and check

Save the file and press Mod+Shift+c. Your windows stay open and keep their places. You can also run the following from a terminal inside Tessera:

tessera config reload
tessera problems

A successful reload applies the file. A failed reload keeps the previous configuration and reports the error in the log and error strip. If the file fails at startup, Tessera starts with defaults. To try another file at startup, set TESSERA_CONFIG to its absolute path.

Add a binding

Use add-keys: to keep the stock bindings and add your own. keys pairs each chord with an action. run takes a program followed by separate arguments.

(config
  add-keys: (keys "Mod+F12" (run "foot" "-D" "/tmp")))

Mod is Super in a login session and Alt in a nested session. Marking an action locked permits it while locked, for example a media key. Use that only for actions you want available without unlocking.

Derive a configuration

Most files need only config. Use based-on: when you deliberately derive a configuration from another record, keeping that record's settings.

(define base (config terminal: '("foot")))

(config based-on: base metrics: (metrics inner-gap: 10))

The lower-level config-with also copies a record with selected fields changed. It is useful in reusable configuration code and in the REPL; it doesn't choose a stock base for you.

(define base (config terminal: '("foot")))

(config-with base metrics: (metrics inner-gap: 10))

For a temporary change to the running configuration, use:

tessera eval '(apply-config! (config-with (current-config) metrics: (metrics inner-gap: 10)))'