| senpai(5) | File Formats Manual | senpai(5) |
NAME
senpai - Configuration file format and settings
DESCRIPTION
A senpai configuration file is a scfg file. See https://git.sr.ht/~emersion/scfg.
Some settings are required, the others are optional.
SETTINGS
address (required)
An optional scheme can be specified (scheme://host[:port]):
- irc:// is the implicit default, TLS is enabled or disabled according to the tls configuration value.
- ircs:// enables TLS.
- irc+insecure:// disables TLS (plain-text IRC).
- ircs+insecure:// enables TLS but skips TLS certificate verification. This protects against passive MITM attacks but not against active MITM attacks.
nickname (required)
realname
username
password
password-cmd command [arguments...]
The command and arguments are already quoted by scfg, so there is no need to additionally quote the whole command string. For example:
password-cmd pass "Messaging/irc"
channel
This directive should not be used when using a bouncer, as the bouncer already remembers and joins senpai to its saved channels automatically.
highlight
By default, senpai will use your current nickname.
on-highlight-beep
pane-widths { ... }
Pane widths are set as sub-directives of the main pane-widths directive:
pane-widths {
nicknames 16
}
nicknames
channels
members
text
tls
typings
mouse
spell-check
colors { ... }
Colors can be set either by name ("red"), by number (from 0 to 255, for the default 256 terminal colors; -1 meaning default), or by RGB hex true color (#rrggbb).
Colors are set as sub-directives of the main colors directive:
colors {
prompt green
}
| Sub-directive | Description |
| prompt <color> | color for ">"-prompt that appears in command mode |
| unread <color> | foreground color for unread buffer names in buffer lists |
| status [...] | foreground color for status event lines (e.g. join, part, nick changes) in buffers, see table below |
| nicks [...] | color scheme for user nicks, see table below |
| status sub-directive | Description |
| status <color> | show status events with the specified color |
| status disabled | hide status events |
| nicks sub-directive | Description |
| nicks base | show nicks with 16 different colors (default) |
| nicks extended | show nicks with 256 different colors |
| nicks fixed [<others>] | show nicks with a fixed color, optionally specifying the colors for other nicks |
| nicks self <self> | show self nick with a fixed specified color (can be added along other directives) |
shortcuts { ... }
Shortcuts are defined by `<key> <action> [<params>...]` subdirectives:
shortcuts {
Alt+k cursor-delete-after
Shift+Alt+Page_Up set-editor "/me slaps OP with a large trout"
}
A custom shortcut will override any default shortcut for that key.
| action | Description |
| none | clears the shortcut, no action |
| quit | clear the editor, or type `/quit` |
| set-editor <text> | set the editor to the passed text, if empty |
| cursor-start | move the cursor to the beginning of the editor |
| cursor-end | move the cursor to the end of the editor |
| redraw | refresh the window |
| scroll-up | go up in the timeline |
| scroll-down | go down in the timeline |
| scroll-next-highlight | go down to the next highlight |
| scroll-previous-highlight | go up to the next highlight |
| buffer-next | go to the next buffer |
| buffer-previous | go to the previous buffer |
| buffer-next-unread | go to the next unread buffer |
| buffer-previous-unread | go to the previous unread buffer |
| cursor-right-word | move the cursor to the next word |
| cursor-left-word | move the cursor to the previous word |
| cursor-right | move the cursor to the next character |
| cursor-left | move the cursor to the previous character |
| cursor-up | scroll back one line in the editor |
| cursor-down | scroll forward one line in the editor |
| cursor-delete-previous-word | delete the previous word in the editor |
| cursor-delete-next-word | delete the next word in the editor |
| cursor-delete-previous | delete the previous character in the editor |
| cursor-delete-next | delete the next character in the editor |
| cursor-delete-before | delete from the cursor to the beginning of the line |
| cursor-delete-after | delete from the cursor to the end of the line |
| search-editor | reverse-search in the editor history |
| auto-complete | open/select the auto-completion dialog/item |
| close-overlay | close any open overlay buffer (e.g. search results) |
| toggle-channel-list | show/hide the vertical channel list |
| toggle-member-list | show/hide the vertical member list |
| send | send the contents of the editor |
| buffer <number>|last | go the 0-indexed numbered buffer, or the last one |
debug
transient
local-integrations
on-highlight-path
If unset, $XDG_CONFIG_HOME defaults to ~/.config/.
Before the highlight script is executed, the following environment variables are populated:
Shell scripts MUST ENSURE VARIABLES appear QUOTED in the script file, OR YOU WILL BE OPEN TO SHELL INJECTION ATTACKS. Shell scripts must also ensure characters like '*' and '?' are not expanded.
| Environment variable | Description |
| BUFFER | buffer where the message appeared |
| HERE | equals 1 if BUFFER is the current buffer, 0 otherwise |
| MESSAGE | content of the message |
| SENDER | nickname of the sender |
To get around this, you can double the backslash with the following snippet:
#!/bin/sh
escape() {
printf "%s" "$1" | sed 's#\\#\\\\#g'
}
notify-send "[$BUFFER] $SENDER" "$(escape "$MESSAGE")"
EXAMPLES
A minimal configuration file to connect to Libera.Chat as "Guest123456":
address irc.libera.chat nickname Guest123456
A more advanced configuration file that fetches a password from an external program, changes the width of some panes, and enables more colors for user nicks:
address irc.libera.chat
nickname Guest123456
username senpai
realname "Guest von Lenon"
password-cmd gopass show irc/guest # use your favorite CLI password solution here
channel "#rahxephon"
pane-widths {
nicknames 10
channels 16
members 16
}
colors {
nicks extended
}
shortcuts {
Alt+k cursor-delete-after
}
SEE ALSO
| 2026-06-02 |