]> Sergey Matveev's repositories - mmc.git/blob - doc/usage.texi
internal package
[mmc.git] / doc / usage.texi
1 @node Usage
2 @unnumbered Usage
3
4 @enumerate
5
6 @item Get the @url{git://git.stargrave.org/mmc.git, source code} and
7 compile Go programs in @file{cmd} subdirectory: @code{./build}.
8
9 @item Create and change to the directory where the state will be kept.
10
11 @item Place your MM's credentials to @env{$NETRC} (@file{~/.netrc} by
12 default). For example
13 @code{machine mm.invalid login stargrave@@mm.invalid password PASSWORD}.
14
15 @item Set @env{$MMC_ENTRYPOINT} environment variable to your entrypoint.
16
17 @item Run @command{cmd/start} and you should see started @command{tmux}
18 with split window, running @command{cmd/mmc} and list of user statuses.
19
20 @item By pressing @code{Prefix+c}, list of available users/channels is
21 shown inside @command{fzf}. Choose the desired one.
22
23 @item A new window (if it did not exist) will appear with the history of
24 messages and a part where you can type you message inside
25 @command{rlwrap}. You can call external editor (for multiline messages)
26 with @code{Ctrl-^} key by default in that utility.
27
28 @item Each time new message appears in the window, bell character is
29 sent, alerting the @command{tmux} and (depending on your configuration)
30 probably your running terminal.
31
32 @item If message is edited or deleted, then @code{[EDIT]}/@code{[DEL]}
33 prefix is prepended. If message contains appended files, then
34 @code{[FILE] FILEID} message is shown.
35
36 @item By pressing @code{Prefix+d} you will close the window.
37
38 @item By pressing @code{Prefix+S}, list of available files is shown
39 inside @command{fzf}, just to quickly display it.
40
41 @item By pressing @code{Prefix+D}, list of available file links in
42 current window is shown. Choose the desired one and it will be saved in
43 @file{/tmp} directory.
44
45 @item Status change and typing notifications are shown as a short-lived
46 message at the bottom of the screen.
47
48 @item If you want to send file to the user/channel, then send
49 @code{/FILE /path/to/file} message.
50
51 @item If you want to download some file, then you can invoke
52 @command{cmd/dl path/to/state FILEID} utility, that will save the file
53 to @file{FILEID.tar} archive in current directory and extract it.
54
55 @item After you just logged in, @command{cmd/mmc} checks for new
56 messages since you were offline, if any messages were in the state's
57 history. So some windows could be automatically opened because of new
58 messages.
59
60 @item By pressing @code{Prefix+Q} you will destroy the whole session and
61 quit @command{tmux}.
62
63 @item @command{cmd/mmc} heartbeats server each minute to tell that you
64 are online, preventing you becoming away.
65
66 @item You can preliminary fill your history:
67
68 @example
69 for c (users/*(/) chans/*(/)) cmd/sb/all $c
70 @end example
71
72 @end enumerate