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