commit c96f063

delthas  ·  2025-03-07 11:33:43 +0000 UTC
parent 2f292ee
Update documentation
2 files changed,  +62, -60
+18, -18
 1@@ -31,6 +31,8 @@ extensions, such as:
 2 - _CHATHISTORY_, senpai fetches history from the server instead of keeping logs,
 3 - _@+typing_, senpai shows when others are typing a message,
 4 - _BOUNCER_, senpai connects to all your networks at once automatically,
 5+- _SEARCH_, senpai can search messages quickly server-side,
 6+- _FILEHOST_, senpai can upload files to the bouncer,
 7 - and more to come!
 8 
 9 # CONFIGURATION
10@@ -48,30 +50,27 @@ you.
11 
12 # USER INTERFACE
13 
14-The user interface of senpai consists of 4 parts.  Starting from the bottom:
15+The user interface of senpai consists of several parts.
16 
17-The *buffer list*, shows joined channels.  The special buffer *home* is where
18-server notices are shown.  This list can be put on the left of the screen with
19-the _chan-column-width_ configuration option. Buffers can be closed with the
20-mouse middle click, or the _part_ command.
21+On the left, the *buffer list*, shows joined channels. The special buffer *home*
22+is where server notices are shown. The list can be put on the bottom of the
23+screen with a configuration option. Buffers can be closed with the mouse middle
24+click, or the _part_ command.
25 
26-On the row above, the *input field* is where you type in messages or commands
27+On the right, the *member list*, shows members joined to the current channel.
28+
29+On the bottom, the *input field* is where you type in messages or commands
30 (see *COMMANDS*).  By default, when you type a message, senpai will inform
31 others in the channel that you are typing.
32 
33 On the row above, the *status line* (or... just a line if nothing is
34 happening...) is where typing indicators are shown (e.g. "dan- is typing...").
35 
36-Finally, the *timeline* is displayed on the rest of the screen.  Several types
37-of messages are in the timeline:
38+Finally, the message *timeline* is displayed on the rest of the screen.
39 
40-- User messages are shown with their nicknames,
41-- User actions (*/me*) are shown with an asterisk (*\**) followed by the user's
42-  nickname,
43-- Status messages, such as joins, parts, topics and name lists, are shown with
44-  two dashes (*--*),
45-- Notices are shown with an asterisk (*\**) followed by the user nickname and a
46-  colon
47+senpai supports the mouse almost everywhere (clicking on nicks, buffers,
48+members, links; resizing panels; and features "buttons"). On supported
49+terminals, the cursor will turn into a hand when over a clickable element.
50 
51 # SELECTING TEXT
52 
53@@ -85,8 +84,9 @@ In order to open links, refer to your terminal manual. On most terminals,
54 opening links is done by holding CTRL, or SHIFT, while clicking the link.
55 On the *foot* terminal, links can be opened by pressing CTRL+SHIFT+O.
56 
57-Additionally, by simply clicking an image link with the mouse, a small preview
58-will be shown, which can be closed by clicking again anywhere in the interface.
59+A simple left click with no modifiers will make senpai try to preview the link,
60+or open it. In order to skip the preview, open the link with a modifier, as
61+specified above, instead of an unmodified left click.
62 
63 # KEYBOARD SHORTCUTS
64 
65@@ -97,7 +97,7 @@ will be shown, which can be closed by clicking again anywhere in the interface.
66 	Move the cursor to the end of the input field.
67 
68 *CTRL-C*
69-	Clear input line.
70+	Clear input line, or prepare for exit by adding /exit to input line.
71 
72 *CTRL-F*
73 	Prepare for search: add /search to input line.
+44, -42
  1@@ -71,47 +71,6 @@ Some settings are required, the others are optional.
  2 	Enable sending the bell character (BEL) when you are highlighted.
  3 	Defaults to disabled.
  4 
  5-*on-highlight-path*
  6-	Alternative path to a shell script to be executed when you are highlighted.
  7-	By default, senpai looks for a highlight shell script at
  8-	$XDG_CONFIG_HOME/senpai/highlight. If no file is found at that path, and an
  9-	alternate path is not provided, highlight command execution is disabled.
 10-
 11-	If unset, $XDG_CONFIG_HOME defaults to *~/.config/*.
 12-
 13-	Before the highlight script is executed, the following environment
 14-	variables are populated:
 15-
 16-	Shell scripts MUST ENSURE VARIABLES appear QUOTED in the script file,
 17-	OR YOU WILL BE OPEN TO SHELL INJECTION ATTACKS. Shell scripts must also
 18-	ensure characters like '\*' and '?' are not expanded.
 19-
 20-[[ *Environment variable*
 21-:< *Description*
 22-|  BUFFER
 23-:  buffer where the message appeared
 24-|  HERE
 25-:  equals 1 if _BUFFER_ is the current buffer, 0 otherwise
 26-|  MESSAGE
 27-:  content of the message
 28-|  SENDER
 29-:  nickname of the sender
 30-
 31-	Note: when passing those to *notify-send*(1), some notification daemons use
 32-	*\\* for escape sequences in the body, which causes *\\* to disappear from the
 33-	message or triggers unintended side-effects (like newlines).
 34-
 35-	To get around this, you can double the backslash with the following snippet:
 36-
 37-```
 38-#!/bin/sh
 39-escape() {
 40-	printf "%s" "$1" | sed 's#\\#\\\\#g'
 41-}
 42-
 43-notify-send "[$BUFFER] $SENDER" "$(escape "$MESSAGE")"
 44-```
 45-
 46 *pane-widths* { ... }
 47 	Configure the width of various UI panes.
 48 
 49@@ -198,7 +157,7 @@ colors {
 50 |  nicks fixed [<others>]
 51 :  show nicks with a fixed color, optionally specifying the colors for other nicks
 52 |  nicks self <self>
 53-:  show self nick with a fixed specified color
 54+:  show self nick with a fixed specified color (can be added along other directives)
 55 
 56 *debug*
 57 	Advanced.
 58@@ -217,6 +176,49 @@ colors {
 59 	DBus). Can be useful to disable on systems planned to be used through SSH.
 60 	Defaults to true.
 61 
 62+*on-highlight-path*
 63+	Advanced. senpai will notify you by default without the need for a custom
 64+	highlight script.
 65+	Alternative path to a shell script to be executed when you are highlighted.
 66+	By default, senpai looks for a highlight shell script at
 67+	$XDG_CONFIG_HOME/senpai/highlight. If no file is found at that path, and an
 68+	alternate path is not provided, highlight command execution is disabled.
 69+
 70+	If unset, $XDG_CONFIG_HOME defaults to *~/.config/*.
 71+
 72+	Before the highlight script is executed, the following environment
 73+	variables are populated:
 74+
 75+	Shell scripts MUST ENSURE VARIABLES appear QUOTED in the script file,
 76+	OR YOU WILL BE OPEN TO SHELL INJECTION ATTACKS. Shell scripts must also
 77+	ensure characters like '\*' and '?' are not expanded.
 78+
 79+[[ *Environment variable*
 80+:< *Description*
 81+|  BUFFER
 82+:  buffer where the message appeared
 83+|  HERE
 84+:  equals 1 if _BUFFER_ is the current buffer, 0 otherwise
 85+|  MESSAGE
 86+:  content of the message
 87+|  SENDER
 88+:  nickname of the sender
 89+
 90+	Note: when passing those to *notify-send*(1), some notification daemons use
 91+	*\\* for escape sequences in the body, which causes *\\* to disappear from the
 92+	message or triggers unintended side-effects (like newlines).
 93+
 94+	To get around this, you can double the backslash with the following snippet:
 95+
 96+```
 97+#!/bin/sh
 98+escape() {
 99+	printf "%s" "$1" | sed 's#\\#\\\\#g'
100+}
101+
102+notify-send "[$BUFFER] $SENDER" "$(escape "$MESSAGE")"
103+```
104+
105 # EXAMPLES
106 
107 A minimal configuration file to connect to Libera.Chat as "Guest123456":