I like making and contributing to open source software, especially in Rust, C, and JavaScript.
ulyssa / iamb Goto Github PK
View Code? Open in Web Editor NEWA Matrix client for Vim addicts
Home Page: https://iamb.chat
License: Apache License 2.0
A Matrix client for Vim addicts
Home Page: https://iamb.chat
License: Apache License 2.0
The crossterm
crate supports reading bracketed paste commands from terminals that support it. This allows differentiating between newlines sent from pressing <Enter>
and newlines that are part of pasted text. When iamb receives a bracketed paste, it should insert the text without interpreting it as typed characters, since that is most likely what the user wanted.
Note that this won't work everywhere: terminal multiplexers like screen
will sometimes sanitize different escape sequences, so it will be up to users who want bracketed paste to ensure they're running in an environment where it will work.
I want a Matrix client for the terminal that uses Vim keybindings for editing messages and managing windows. To start with, it should support the following:
I have written the modalkit crate to help with supporting Vim's keybindings. A lot of editing features are supported, but there are still several things remaining that iamb will need or probably want:
Either a parameter to :download
, e.g. :download open
, or a new command :open
that downloads and opens. "Opening" could default to xdg-open <downloaded-file-path>
or even better have a config setting.
@ulyssa wdyt?
(I am experimenting with a new command).
I've implemented support for showing and setting room tags, but haven't implemented it in the list of direct messages yet.
Users should be able to select a message and then reply to it by running a :reply
command. The message bar should make it clear which message is being replied to.
When an event can't be decrypted by the SDK, it's left as an AnyMessageLikeEvent::RoomEncrypted
. This should be inserted into the timeline so that users can see that there was a message, and that the room keys haven't been sent to the client from other devices to decrypt them.
Rooms can be given an alias when created via :create ++alias=localpart
, but there's not a way to add them to existing rooms, or to modify which alias is the canonical alias.
Public rooms are discoverable via the homeserver's room directory. Users should be able to browse this list in the client.
I've added support for searching through messages loaded within a room's scrollback, but it should also be possible to perform a search across multiple rooms when trying to find a message whose context you can't recall. Matrix supports server-side search (spec), but this doesn't work for encrypted messages. The client should search through encrypted rooms itself, and use server-side search to find content in non-encrypted rooms.
When a user is typing into the message bar for a room, the client should send a typing notification to the homeserver. Typing notifications for other users should also be displayed somewhere. It should be possible to disable both sending and displaying notifications in the configuration file.
To help make it clear what features are not yet implemented, and how iamb compares to other TUI clients, I'm going to add a comparisons table to the README based on the one on matrix.org.
When submitting a message, the message contents are checked with String::is_empty
, which will always be false since the text box always contains a terminating newline. It should use EditRope::is_blank
to see whether the message is all whitespace instead.
When using :edit
to edit a message, focus should switch to the message bar, the same as :reply
.
Matrix supports displaying where users have read up to. The client should display this in some way, and support indicating where the user has read up to. Like with #9 , it should be possible for the user to disable this in the configuration file.
The code for wrapping the body of message contents could be improved to avoid breaking up words and instead place them wholesale on the next line. Words that are longer than the current width will still need to be broken up, though.
When the user is mentioned in a message, it should be highlighted. It should also be possible to configure keywords that the user wants highlighted, on both a global and per-profile level. Notifications should all be viewable somewhere, in a way where the user can jump to them.
There's a bunch of warnings output from the CI workflow related to node.js v12 being deprecated in GitHub actions. Not all of the actions have newer versions, but I should be able to reduce some of the warnings by upgrading what does have newer releases.
When viewing a room, it should be possible to run a command like :invite @user:example.com
to send an invitation to the room. Rooms that the user has been invited to should also show up in the room list, and there should be a way to accept the invitation.
When a message gets edited, the html
field should also get updated so that the old, parsed HTML gets replaced.
Users should be able to select a message and run :redact
to remove it.
Many Matrix rooms have useful descriptions, and these should be shown in the client. It should also be possible, if the user has a sufficient power level in the room, to change the room description.
There should be a command for creating new rooms and spaces on the homeserver given an alias. I'm thinking something along the lines of:
:room create private [#alias:server.tld]
to create a private room:room create public [#alias:server.tld]
to create a public room:space create private [#alias:server.tld]
to create a private space:space create public [#alias:server.tld]
to create a public spaceThere should probably also be a way to manage spaces and add rooms and other spaces to them.
Most links are longer than the chat-message-grid-column, and thus are broken up into the next line. Then, they cannot be opened by clicking (most modern terminals have such a feature), nor can they be selected easily for copying and pasting.
If a message has no attachments and :open
is used, then do a simple match for ^http(s)?://.+
or something like that, and pass a match to the open
crate, it should open the browser.
Currently, rooms for direct messages are not created with encryption enabled. This is controlled by initial state events passed to the create room endpoint, but can't be fixed until there's a ruma
release that includes ruma/ruma#1453.
Markdown messages should probably be displayed in their origin markup form to make sure that things like links are visible for copying, but the text can be made bold and italicized.
Once ulyssa/modalkit#29 is finished, iamb should use it to support generating completions for commands in the command bar, and completing usernames and room names in the message bar.
When viewing a room, users should be able to run :members
to see a list of users in the room.
Users should be able to attach files to their messages, and download attachments from messages in the scrollback.
iamb can browse existing space heirarchies, but it can't add rooms or child spaces to them.
Attempting to log into my homeserver pintobyte.com, I get the following:
Matrix client error: the server returned an error: EOF while parsing a value at line 1 column 0
I can see that I successfully logged in (I have a new device ID and access token), but something seems to be breaking on sync. The only hint I have is in my nginx error log:
2023/03/10 16:40:31 [error] 159392#159392: *578750 upstream prematurely closed connection while reading upstream, client: 50.5.223.102, server: pintobyte.com, request: "GET /_matrix/media/r0/thumbnail/zettaport.com/hwueimVHAqYtQGQYQAuiwXaH?width=28&height=28&method=crop HTTP/1.1", upstream: "http://127.0.0.1:8008/_matrix/media/r0/thumbnail/zettaport.com/hwueimVHAqYtQGQYQAuiwXaH?width=28&height=28&method=crop", host: "pintobyte.com:8448"
Matrix supports tagging rooms (spec), which are then visible only to the user and shared across devices. I'm pretty sure that this is what Element uses for displaying Favorites. The client should support this in some way so that it can also display favorite rooms, and sort them to the top of :rooms
and :dms
.
Store currently opened room/chat in config_dir/profiles//session.json or similar.
On startup, join the last opened room/chat from the relevant session.json.
Alternatively, configure a default_room
in the config.json profiles
section.
I would like to try to implement this.
Fetching scrollback history can sometimes take a long time for newly joined rooms, especially some of those on the matrix.org
homeserver. This causes the main loop to hang, and prevents the user from being able to navigate away from the room to avoid triggering successive fetches. iamb should use tokio::spawn
to do this independently of the main loop, and avoid holding onto the store while doing so.
Messages are currently shown with the UTC timestamp next to them, but the date the message was sent isn't shown. iamb should show the date whenever it changes, and the timestamp should be shown in the system's local time to avoid confusion.
Vim maps its window keybindings in both Normal and Visual mode. This is right in modalkit, but isn't for iamb's <C-W>z
and <C-W>m
, which need to be mapped in Visual mode.
Matrix supports reacting to messages with Emojis. There should be a way to select a message and then react to it with an Emoji. This should probably allow using and searching through the alphanumeric names of the Emojis, in the same way that Element does.
I missed a place in table rendering during #10 where the outer style for the message isn't passed through. This results in a portion of table cells not always having Modifier::REVERSED
applied when the message is selected.
The current HTTP request timeout is 60 seconds, which is too short for syncing some accounts. I'm going to add a new request_timeout
configuration option, and change the default timeout to 120 seconds. This will allow people whose accounts have large initial sync payloads to adjust it further as needed.
It should be possible to override the way that a user identifier is displayed so that it's possible to override the color or name when two user's are assigned similar colors or have similar user IDs. I'm also going to make it so that the user identifier is only shown for the first message in a sequence of messages from the same user.
I made a Matrix space for iamb-related rooms a while back. It should have a badge in the README. I'll add it to the site, too.
There are some newer clippy warnings enabled in 1.67.0 that are showing up in the CI workflow.
Once a message has been sent and appears in the scrollback, a user should be able to select it, run :edit
, and then edit the message in the message bar. It should be possible to cancel editing.
Is it supported now? I got the empty screen.
It should be possible to send a room upgrade request using a command, something like :room upgrade XXX
.
It should be possible to leave a room. This should prompt the user before actually leaving, so this will need ulyssa/modalkit#83.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.