Keys and rules
These pages show how to change what Tilde does with a key press and with a message that arrives. Keys are bound in Lua, in keybind.lua and init.lua, and the rules for mail and for chat are written in init.lua. Neither needs more than a few lines. Start with a key if you use tt, or with the rules if you want your mail sorted. To try the rules on real mail use tcli rules, and to see them fire use tcli watch.
| Page | What it answers |
|---|---|
| Change a key | How do I rebind a key, remove one or add one, and what if keybind.lua has an error? |
| Key notation and contexts | How do I write Ctrl-d, a sequence or the leader, what is a context, and what do leader and timeout_ms do? |
| Rules for mail | How do I mark, flag or move the mail that arrives, and call a function on it? |
| Rules for chat | How do I mark a conversation read or react to a mention or a direct message? |