Setting Up WeeChat Again with weechat-matrix

Written By: Jake Bauer | Posted: 2020-08-22 | Last Updated: 2020-08-22

I used to have WeeChat set up and configured for IRC, but I really don’t have much of a reason to use IRC. If I’m getting more into FOSS development though, I’d want to have my preferred client up and running again. Plus, if I want to access support resources offered through IRC or get into communicating more with the communities present on IRC—since those tend to be quite technical and are filled with people I think I might enjoy associating with—I’d want to be able to jump in quickly with a client already set up.

I used to use irssi, but found WeeChat to have saner defaults out of the box and be easier to work with in general. Plus, I can use plugins like weechat-matrix to be able to use the Matrix protocol in WeeChat without needing to use a bloated, slow, memory-hungry electron app like Element.

I already have a Freenode account from my previous IRC adventures so I set it up in WeeChat with:

/server add freenode -ssl
/set irc.server.freenode.nicks "jbauer"
/set irc.server.freenode.command "/msg NickServ identify <my_password>"

I also made a couple of customizations to the look and feel of WeeChat:

/set 235
/set 235
/set weechat.color.separator grey
/set weechat.color.chat_nick_self _blue
/set weechat.color.status_time *white
/set buflist.format.buffer_current "${color:,236}${format_buffer}"
/alias add b /buffer

In addition to that, I installed the weechat-notify-send plugin which allows me to receive desktop notifications when I get a new message in WeeChat.

Another thing I wanted to try was weechat-matrix, a set of Python scripts which allows one to use a Matrix server in WeeChat. Following the instructions in the Git repository made installation easy enough. Adding my Matrix server and logging in was also easy. However, I’ve come across three issues which I want to highlight in case anybody else is thinking of using weechat-matrix:

The Matrix client I normally use (Element) supports device cross-signing. This means that if I add a new device to my list of devices, I can verify that device using one of my other devices which have already been set up. This allows me to add as many devices I want, mark them as trusted from my own devices, and other people won’t need to individually verify each of the devices that I add. weechat-matrix doesn’t have this which means I pretty much have to do a /olm verify * * unless I want to sit there for an hour verifying everyone’s devices individually.

Furthermore, it seems that the connection to my Matrix server randomly drops out about every dozen minutes or so. It always reconnects in about 10 seconds but it’s a bit annoying when you’re sending a series of messages and all of a sudden you can’t. It seems that to fix this I’d have to enable HTTP/2 connections on my Matrix server and reverse proxy which I don’t particularly care to do. Instead, I fixed this with: /set 1. A lazy solution… but it works I guess?

Also, uploading and downloading files is a huge pain in the butt. It has to be done through helper scripts which is far less convenient than just seeing the file or being able to type a quick command such as upload ~/image.png or download secret_codes.txt from within the WeeChat window.

Anyhow, a complete rewrite of weechat-matrix is coming in the form of weechat-matrix-rs, a Rust implementation as a WeeChat plugin instead of a series of WeeChat scripts. This will allow much better integration and much more powerful stuff like device cross-signing to be done.

For now, I’m definitely glad I got it up and running again for use with IRC, but I’m not 100% sure I’ll stick with using it for Matrix. As much as I would prefer to use a nice CLI application instead of an Electron one, the current state of it seems to be more hassle than it’s worth. I may go back to using Element and just wait for the Rust rewrite to be ready :/

This is my ninety-sixth post for the #100DaysToOffload challenge. You can learn more about this challenge over at