commit 6f33f5d

delthas  ·  2025-02-17 15:02:31 +0000 UTC
parent fb077de
Update outdated advanced example configuration

The custom highlight script should not really be used anymore.
1 files changed,  +8, -20
+8, -20
 1@@ -224,11 +224,9 @@ address irc.libera.chat
 2 nickname Guest123456
 3 ```
 4 
 5-A more advanced configuration file that enables SASL authentication, fetches the
 6-password from an external program instead of storing in plaintext, sends
 7-notifications on highlight and decreases the width of the nick column to 12
 8-(note: _swaymsg_ is specific to sway, a wayland compositor. Use whatever you
 9-need to know if the terminal emulator that runs senpai has focus):
10+A more advanced configuration file that fetches a password from an external
11+program, changes the width of some panes, and enables more colors for user
12+nicks:
13 
14 ```
15 address irc.libera.chat
16@@ -237,24 +235,14 @@ username senpai
17 realname "Guest von Lenon"
18 password-cmd gopass show irc/guest # use your favorite CLI password solution here
19 channel "#rahxephon"
20-highlight guest senpai
21-highlight lenon # don't know why you'd split it into multiple lines, but you can if you want
22 pane-widths {
23-	nicknames 12
24+	nicknames 10
25+	channels 16
26+	members 16
27 }
28-```
29-
30-And the highlight file (*~/.config/senpai/highlight*):
31-```
32-#!/bin/sh
33-
34-escape() {
35-	printf "%s" "$1" | sed 's#\\#\\\\#g'
36+colors {
37+	nicks extended
38 }
39-FOCUS=$(swaymsg -t get_tree | jq '..|objects|select(.focused==true)|.name' | grep senpai | wc -l)
40-if [ "$HERE" -eq 0 ] || [ $FOCUS -eq 0 ]; then
41-	notify-send "[$BUFFER] $SENDER" "$(escape "$MESSAGE")"
42-fi
43 ```
44 
45 # SEE ALSO