A personal build of the TUI matrix client including image-pasting and notifications for all rooms
Go to file
2020-03-03 14:01:27 +02:00
config add notify_sound config option 2020-03-01 05:05:37 -06:00
deb/DEBIAN Add debian packaging and some build scripts 2018-05-03 10:03:25 +03:00
debug DOn't print debug init to log file when not logging to file 2019-04-27 15:44:01 +03:00
interface Implement sending redactions 2020-03-01 22:35:25 +02:00
lib Update deps 2020-02-18 20:38:35 +02:00
matrix Implement sending redactions 2020-03-01 22:35:25 +02:00
scripts Update CI script and tcell 2019-01-12 00:35:42 +02:00
ui Add another nil check in room list 2020-03-03 14:01:27 +02:00
.codeclimate.yml Add .codeclimate.yml 2018-04-19 11:33:59 +03:00
.editorconfig Update README and other files 2018-03-20 23:49:37 +02:00
.gh-deployer.yaml Update CI script and tcell 2019-01-12 00:35:42 +02:00
.gitignore Unbreak more things 2019-06-15 17:04:08 +03:00
.gitlab-ci.yml Add .gitlab-ci.yml 2019-07-25 23:53:45 +03:00
.travis.yml Fix Travis CI Go version 2019-04-10 02:19:27 +03:00
chat-preview.png Update screenshot 2020-03-01 22:20:38 +02:00
go.mod Update mautrix-go 2020-03-01 01:24:27 +02:00
go.sum Update mautrix-go 2020-03-01 01:24:27 +02:00
gomuks.go Unbreak more things 2019-06-15 17:04:08 +03:00
LICENSE Update license and sort imports 2019-01-23 00:26:51 +02:00
main.go Add partial deadlock detection in debug mode 2019-04-27 15:02:52 +03:00
README.md Add support for replying and reacting to messages 2020-03-01 00:33:37 +02:00

gomuks

Languages License GitLab CI Maintainability

Chat Preview

A terminal Matrix client written in Go using mautrix and mauview.

Basic usage is possible, but expect bugs and missing features.

Discussion

Matrix room: #gomuks:maunium.net

Installation

Once the client becomes actually usable, I'll start making GitHub releases with precompiled executables. For now, you can either download a CI build from GitLab CI or compile from source:

  1. Install Go 1.12 or higher
  2. Clone the repo: git clone https://github.com/tulir/gomuks.git && cd gomuks
  3. Build: go build

Simply pull changes (git pull) and run go build again to update.

Debugging

If something doesn't work but it doesn't crash, check the /tmp/gomuks/debug.log file for any errors.

Developing

Set DEBUG=1 to enable partial deadlock detection and to write panics to stdout instead of a file.

To build and run with race detection, use go install -race and set GORACE='history_size=7 log_path=/tmp/gomuks/race.log' when starting gomuks, then check /tmp/gomuks/race.log.<pid>. Note that race detection will use a lot of extra resources.

Proper debuggers are too fancy, but normal prints won't work in a TUI application. To write to the debug log mentioned previously, use the maunium.net/go/gomuks/debug package:

package foo

import (
	"maunium.net/go/gomuks/debug"
)

func Foo() {
	debug.Print("WHY ISN'T IT WORKING?!?!?")
	debug.PrintStack()
}

Usage

  • switch rooms - Ctrl + ↑ Ctrl + ↓ Alt + ↑ Alt + ↓
  • scroll chat (line) -
  • scroll chat (page) - PgUp PgDown
  • jump to room - Alt + Enter, then Tab and Enter to navigate and select room

Commands

General

  • /help - View command list.
  • /quit - Close gomuks.
  • /clearcache - Clear room state and close gomuks.
  • /logout - Log out, clear caches and go back to the login view.
  • /toggle <rooms/users/baremessages/images/typingnotif> - Change user preferences.

Sending special messages

  • /me <text> - Send an emote.
  • /notice <text> - Send a notice (generally used for bot messages).
  • /rainbow <text> - Send rainbow text (markdown not supported).
  • /rainbowme <text> - Send rainbow text in an emote.
  • /reply [text] - Reply to the selected message. If text is not specified, the next message will be used.
  • /react <reaction> - React to the selected message.
  • /redact - Redact the selected message.

Rooms

Creating
  • /pm <user id> [...] - Start a private chat with the given user(s).
  • /create [room name] - Create a new room.
Joining
  • /join <room> [server] - Join the room with the given room ID or alias, optionally through the given server.
  • /accept (in a room you're invited to) - Accept the invite.
  • /reject (in a room you're invited to) - Reject the invite.
Existing
  • /invite <user id> - Invite the given user ID to the room.
  • /roomnick <name> - Change your per-room displayname.
  • /tag <tag> <priority> - Add the room to <tag>. <tag> should start with u. and <priority> should be a float between 0 and 1. Rooms are sorted in ascending priority order.
  • /untag <tag> - Remove the room from <tag>.
  • /tags - List the tags the room is in.
Leaving
  • /leave - Leave the current room.
  • /kick <user id> [reason] - Kick a user.
  • /ban <user id> [reason] - Ban a user.
  • /unban <user id> - Unban a user.

Raw events

  • /send <room id> <event type> <content> - Send a custom event.
  • /setstate <room id> <event type> <state key/-> <content> - Change room state.
  • /msend <event type> <content> - Send a custom event to the current room.
  • /msetstate <event type> <state key/-> <content> - Change room state in the current room.
  • /id - Get the current room ID.

Debugging

  • /hprof - Create a heap profile and write it to gomuks.heap.prof in the current directory.
  • /pprof <seconds> - Profile the CPU usage for the given number of seconds and write it to gomuks.cpu.prof.
  • /trace <seconds> - Trace calls for the given number of seconds and write traces to gomuks.trace.