senpai(5)
π senpai(5) β File Formats Manual π
β¨ NAME β¨
senpai β Configuration file format and settings. π
π¦ DESCRIPTION π¦
Okay so a senpai configuration file is a scfg file. See https://git.sr.ht/~emersion/scfg. Some settings are required, the others are optional β yes bestie, you gotta clock which is which. π«Ά
π SETTINGS π
address(required) β The address (host[:port]) of the IRC server.senpaiuses TLS connections by default unless you specify thetlsoption to befalse. TLS connections default to port6697, plain-text use port6667.
An optional scheme can be specified (scheme://host[:port]):
irc://is the implicit default, TLS is enabled or disabled according to thetlsconfiguration 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. So like, it's not a full shield, bestie β know the difference.
nickname(required) β Your nickname, sent with aNICKIRC message. It mustn't contain spaces or colons (:). No cap, that's literally the rule. πrealnameβ Your real name, or actually just a field that will be available to others and may contain spaces and colons. Sent with theUSERIRC message. By default, the value ofnickis used.usernameβ Your username, sent with theUSERIRC message and also used for SASL authentication. By default, the value ofnickis used.passwordβ Your password, used for SASL authentication. See alsopassword-cmd.password-cmd command [arguments...]β Alternatively to providing your SASL authentication password directly in plaintext, you can specify a command to be run to fetch the password at runtime. This is useful if you store your passwords in a separate (probably encrypted) file usinggpgor a command line password manager such aspassorgopass. If apassword-cmdis provided, the value ofpasswordwill be ignored and the first line of the output ofpassword-cmdwill be used for login.
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β A space separated list of channel names thatsenpaiwill automatically join at startup and server reconnect. This directive can be specified multiple times.
This directive should not be used when using a bouncer, as the bouncer already remembers and joins senpai to its saved channels automatically. iykyk β don't double up, bestie.
highlightβ A space separated list of keywords that will trigger a notification and a display indicator when said by others. This directive can be specified multiple times.
By default, senpai will use your current nickname.
on-highlight-beepβ Enable sending the bell character (BEL) when you are highlighted. Defaults to disabled.pane-widths { ... }β Configure the width of various UI panes.
Pane widths are set as sub-directives of the main pane-widths directive:
pane-widths {
nicknames 16
}
This directive supports the following sub-directives:
nicknamesβ The number of cells that the column for nicknames occupies in the timeline. By default,14.channelsβ The number of cells that the column for channels occupies on screen. By default,16. Use special value0to make the channel list horizontal. If the value is negative, the channel list will be horizontal by default and will take the positive (opposite) width value when toggled with F7.membersβ The number of cells that that the column for the list of channel members occupies on screen. By default,16. Use special value0to disable. If the value is negative, the member list will be disabled by default and will take the positive (opposite) width value when toggled with F8.textβ The maximum message text line width for messages, in number of cells. By default, the value is zero, which means that there is no maximum. Useful for keeping a readable line width on large screens.
tlsβ Enable TLS encryption. Defaults totrue.typingsβ Send typing notifications which let others know when you are typing a message. Defaults totrue.mouseβ Enable or disable mouse support. Defaults totrue.spell-checkβ Enable spell checking usingharper-ls. Requiresharper-lsto be installed. English only for now. Defaults tofalse.colors { ... }β Settings for colors of different UI elements.
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
}
prompt <color>β color for">"-prompt that appears in command modeunread <color>β foreground color for unread buffer names in buffer listsstatus [...]β foreground color for status event lines (e.g. join, part, nick changes) in buffers, see table belowstatus <color>β show status events with the specified colorstatus disabledβ hide status events
nicks [...]β color scheme for user nicks, see table belownicks baseβ show nicks with 16 different colors (default)nicks extendedβ show nicks with 256 different colorsnicks fixed [<others>]β show nicks with a fixed color, optionally specifying the colors for other nicksnicks self <self>β show self nick with a fixed specified color (can be added along other directives)
shortcuts { ... }β Settings for custom keyboard 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"
}
Keys are optional modifiers (Control/Shift/Alt/Super) and a key name, which can either be a literal character (e.g. k) or a name for that key, taken from the XKB key names (on Linux, see wev for finding key names, e.g. Page_Up, XF86AudioPlay).
A custom shortcut will override any default shortcut for that key. So yeah β your custom keybind ate, periodt.
okay bestie, before we get into the actual settings β here's the whole entire menu of actions you can glue onto a key. this is the good stuff. every single one, no gatekeeping π
noneβ clears the shortcut, no action. literally does nothing, iconically.quitβ clear the editor, or type/quitset-editor <text>β set the editor to the passed text, if emptycursor-startβ move the cursor to the beginning of the editorcursor-endβ move the cursor to the end of the editorredrawβ refresh the windowscroll-upβ go up in the timelinescroll-downβ go down in the timelinescroll-next-highlightβ go down to the next highlightscroll-previous-highlightβ go up to the next highlight
buffer-nextβ go to the next bufferbuffer-previousβ go to the previous bufferbuffer-next-unreadβ go to the next unread bufferbuffer-previous-unreadβ go to the previous unread buffer
now the cursor squad, aka the ones you'll bind to Ctrl-something and never think about again π«Ά
cursor-right-wordβ move the cursor to the next wordcursor-left-wordβ move the cursor to the previous wordcursor-rightβ move the cursor to the next charactercursor-leftβ move the cursor to the previous charactercursor-upβ scroll back one line in the editorcursor-downβ scroll forward one line in the editorcursor-delete-previous-wordβ delete the previous word in the editorcursor-delete-next-wordβ delete the next word in the editorcursor-delete-previousβ delete the previous character in the editorcursor-delete-nextβ delete the next character in the editorcursor-delete-beforeβ delete from the cursor to the beginning of the linecursor-delete-afterβ delete from the cursor to the end of the line
search-editorβ reverse-search in the editor history. going back in time but for your own messages π°οΈauto-completeβ open/select the auto-completion dialog/itemclose-overlayβ close any open overlay buffer (e.g. search results)toggle-channel-listβ show/hide the vertical channel listtoggle-member-listβ show/hide the vertical member listsendβ send the contents of the editorbuffer <number>|lastβ go the 0-indexed numbered buffer, or the last one
ok real talk, that 0-indexed thing? yes, counting starts at zero. she's a programmer, she's not gonna pretend otherwise π
and back to the settings, two advanced ones left, both super chill by default:
debugβ Advanced. Dump all sent and received data to the home buffer, useful for debugging. Defaults tofalse.transientβ Advanced. Run an ephemeral instance without disk reads/writes (except for the initial configuration). Can be useful for public instances. Defaults tofalse.
ngl, transient is giving main character who refuses to leave a trace β perfect for when you're hopping on a public instance and don't wanna leave footprints β¨
local-integrationsβ Advanced. Enables integrations with the local system (e.g. notifications through DBus). Can be useful to disable on systems planned to be used through SSH. Defaults totrue.on-highlight-pathβ Advanced. senpai will notify you by default without the need for a custom highlight script. This is an alternative path to a shell script to be executed when you are highlighted. By default, senpai looks for a highlight shell script at$XDG_CONFIG_HOME/senpai/highlight. If no file is found at that path, and an alternate path is not provided, highlight command execution is disabled.
If unset, $XDG_CONFIG_HOME defaults to ~/.config/.
Before the highlight script is executed, the following environment variables are populated:
BUFFERβ buffer where the message appearedHEREβ equals1ifBUFFERis the current buffer,0otherwiseMESSAGEβ content of the messageSENDERβ nickname of the sender
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. π
Note: when passing those to notify-send(1), some notification daemons use \ for escape sequences in the body, which causes \ to disappear from the message or triggers unintended side-effects (like newlines).
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 π«Ά
π okay that's a wrap on senpai(5), bestie β source/version senpai(5), dated 2026-10-14 β now go make your config absolutely iconic β¨
π¦ where this page comes from
- alpine 3.24: senpai-doc 0.5.0-r2 Β· ISC
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms