Weechat is an extensible chat client.
Matrix is an open network for secure, decentralized communication.
Weechat-Matrix is a Python plugin for Weechat that lets Weechat communicate over the Matrix protocol.
Weechat-Matrix already supports large parts of the Matrix protocol, end to end encryption support is still experimental.
- Install libolm
Ubuntu
sudo apt-get install libolm-dev
Debian (see https://git.matrix.org/git/olm)
Archlinux based distribution (see https://aur.archlinux.org/packages/libolm/)
use your favorite pacman frontend with AUR support (yaourt, yay, pikaur, …)
- clone the repo and install dependencies
git clone https://github.com/poljar/weechat-matrix.git
cd weechat-matrix
pip install -r requirements.txt
An other option is to install the dependencies manually:
- pyOpenSSL
- typing
- webcolors
- future (Python2 users only, see below)
- atomicwrites
- matrix-nio
- attrs
- logbook
- pygments
- As your regular user, just run:
make install
in this repository directory.
Note that weechat only supports Python2 OR Python3, and that setting is determined at the time that Weechat is compiled. Weechat-Matrix can work with either Python2 or Python3, but when you install dependencies you will have to take into account which version of Python your Weechat was built to use.
To check the python version that weechat is using, run:
/python version
Uploads are done using a helper script, the script found under
contrib/matrix_upload
should be installed under your PATH
.
Configuration is completed primarily through the Weechat interface. First start Weechat, and then issue the following commands:
-
Start by loading the Weechat-Matrix plugin:
/script load matrix.py
-
Now set your username and password:
/set matrix.server.matrix_org.username johndoe /set matrix.server.matrix_org.password jd_is_awesome
-
Now try to connect:
/matrix connect matrix_org
-
If everything works, save the configuration
/save
-
Add your custom server to the plugin:
/matrix server add myserver myserver.org
-
Add the appropriate credentials
/set matrix.server.myserver.username johndoe /set matrix.server.myserver.password jd_is_awesome
-
If everything works, save the configuration
/save
There are two bar items provided by this script:
-
matrix_typing_notice
- shows the currently typing users -
matrix_modes
- shows room and server info (encryption status of the room, server connection status)
They can be added to the weechat status bar as usual: /set weechat.bar.status.items
The matrix_modes
bar item is replicated in the already used buffer_modes
bar
item.
The sending of typing notices and read receipts can be temporarily disabled via
the /room
command, they can also be permanently configured using standard
weechat conditions settings with the following settings:
matrix.network.read_markers_conditions
matrix.network.typing_notice_conditions
/help matrix
will print information about the /matrix
command.
/help olm
will print information about the /olm
command that is used for
device verification.
/matrix help [command]
will print information for subcommands, such as /matrix help server