Git Product home page Git Product logo

matui's Introduction

Matui

A very opinionated Matrix TUI. Text entry is done externally, as is opening of all attachements. The UI is kept as simple as possible and there's no mouse support (yet, at least).

Matui

Who should use this client?

Anyone who wants a very simple terminal Matrix client, but runs another client somewhere else for the missing features. There are some very basic actions that aren't supported at the moment, like joining rooms and moderation. Also, many events are still not suported, like threads (which are still shown, but not formatted very well). Also, this project is very early, so you need to be tolerant of some bugs.

Installation

Releases

You can download the latest release, unpack it, and move matui to /usr/bin (or anywhere else you like).

Arch Linux

Matui is packaged for the AUR: paru -S matui.

Nix

There is a flake.nix that can be used run temporarily locally, or to install on NixOS or a home-manager system.

Shell

nix run 'https://github.com/pkulak/matui.git'

OS

{
  inputs = {
    matui.url = "github:pkulak/matui";
  };
  outputs =
    inputs@{ self
    , nixpkgs-unstable
    , ...
    }:
    let
      overlays = {
        unstable = _: prev: {
          unstable = import nixpkgs-unstable
            {
              inherit (prev.stdenv) system;
            } // {
            matui = inputs.matui.packages.${prev.stdenv.system}.matui;
          };
        };
      };
    in
    {
      <snip>;
      packages = with pkgs; [
        unstable.matui
      ];
    }
}

Keybindings

Modal UIs can be a bit overwhelming, but thankfully chat isn't terribly complicated. Especially if you don't implement too many features.

Key Description
Space Show the room switcher.
j* Select one line down.
k* Select one line up.
i Create a new message using the external editor.
Enter Open the selected message (images, videos, urls, etc).
s Save the selected message (images and videos).
c Edit the selected message in the external editor.
r React to the selected message.
R Reply to the selected message.
v View the selected message in the external editor.
V View the current room in the external editor.
u Upload a file.
? Show this helper.

* arrow keys are fine too

External Applications

The only requirement is an editor, and the $EDITOR environmental variable should be set. Vim is highly recommended, as Matui is optimized for it. When using Vim, the editor is started in insert mode for new messages and Enter sends them.

Text Entry

Having Enter send a message is nice for messaging, but it then begs to have Shift+Enter insert a new line. Unfortunately, that's not possible without modifying your terminal config to send the key bindings that Neovim expects. In Alacritty, it would be this:

key_bindings:
  - { key: Return, mods: Shift, chars: "\x1b[13;2u" }

Once that is setup, Matui will open Neovim (if that's your default editor) with keys mapped such that Shift+Enter inserts a new line.

File Viewing

You will probably want to view attachements and should make sure xdg-open works with all the files you care about. I recommend mpv and imv at a minimum.

File Uploading

KDialog and/or Zenity is required to show the file picker.

Configuration Example

# All the reactions that will show up in the picker.
reactions = [ "โค๏ธ", "๐Ÿ‘", "๐Ÿ‘Ž", "๐Ÿ˜‚", "โ€ผ๏ธ", "โ“๏ธ"]

# Muted rooms.
muted = ["!hMPITSQBLFEleSJeVe:matrix.org"]

# Useful if your custom config is interfering with Enter key bindings
clear_vim = true

The config file is hot reloaded and can generally be found at ~/.config/matui/config.toml.

Windows/Mac Support

There's nothing explicitly preventing this, but it's untested and Linux is currently assumed.

See Also

There's a much more mature Matrix TUI here:

gomuks

matui's People

Contributors

pkulak avatar skeet70 avatar a-kenji avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.