2019-01-27 16:26:55 +01:00
|
|
|
[![Build Status](https://img.shields.io/travis/poljar/weechat-matrix.svg?style=flat-square)](https://travis-ci.org/poljar/weechat-matrix)
|
2019-05-25 11:46:52 +02:00
|
|
|
[![#weechat-matrix:termina.org.uk](https://img.shields.io/badge/matrix-%23weechat--matrix-blue.svg?style=flat-square)](https://matrix.to/#/!twcBhHVdZlQWuuxBhN:termina.org.uk?via=termina.org.uk&via=matrix.org)
|
2019-01-23 17:18:51 +01:00
|
|
|
[![license](https://img.shields.io/badge/license-ISC-blue.svg?style=flat-square)](https://github.com/poljar/weechat-matrix/blob/master/LICENSE)
|
|
|
|
|
2018-04-09 05:43:04 +02:00
|
|
|
# What is Weechat-Matrix?
|
|
|
|
|
|
|
|
[Weechat](https://weechat.org/) is an extensible chat client.
|
|
|
|
|
|
|
|
[Matrix](https://matrix.org/blog/home) is an open network for secure, decentralized communication.
|
|
|
|
|
|
|
|
[Weechat-Matrix](https://github.com/poljar/weechat-matrix/) is a Python plugin for Weechat that lets Weechat communicate over the Matrix protocol.
|
|
|
|
|
|
|
|
# Project Status
|
|
|
|
|
2019-01-23 17:18:51 +01:00
|
|
|
Weechat-Matrix already supports large parts of the Matrix protocol, end to end encryption
|
|
|
|
support is still experimental.
|
2018-04-09 05:43:04 +02:00
|
|
|
|
|
|
|
# Installation
|
|
|
|
|
2019-05-22 23:02:21 +02:00
|
|
|
1. Install libolm 3.1+
|
2019-03-22 14:17:10 +01:00
|
|
|
|
2019-05-22 08:28:06 +02:00
|
|
|
- Debian/Ubuntu install libolm-dev if new enough
|
2019-03-22 14:17:10 +01:00
|
|
|
|
|
|
|
- Archlinux based distribution (see https://aur.archlinux.org/packages/libolm/)
|
|
|
|
use your favorite pacman frontend with AUR support (yaourt, yay, pikaur, …)
|
|
|
|
|
2019-05-22 08:28:06 +02:00
|
|
|
- Failing any of the above see https://git.matrix.org/git/olm
|
|
|
|
for instructions about building it from sources
|
|
|
|
|
2019-03-22 14:17:10 +01:00
|
|
|
2. Clone the repo and install dependencies
|
|
|
|
```
|
|
|
|
git clone https://github.com/poljar/weechat-matrix.git
|
|
|
|
cd weechat-matrix
|
|
|
|
pip install -r requirements.txt
|
|
|
|
```
|
|
|
|
|
|
|
|
Another option is to install the dependencies manually:
|
|
|
|
- pyOpenSSL
|
|
|
|
- typing
|
|
|
|
- webcolors
|
|
|
|
- future (Python2 users only, see below)
|
|
|
|
- atomicwrites
|
|
|
|
- [matrix-nio](https://github.com/poljar/matrix-nio)
|
|
|
|
- attrs
|
|
|
|
- logbook
|
|
|
|
- pygments
|
|
|
|
|
|
|
|
3. 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
|
2019-01-24 17:15:37 +01:00
|
|
|
|
|
|
|
## Uploads
|
|
|
|
|
|
|
|
Uploads are done using a helper script, the script found under
|
|
|
|
[contrib/matrix_upload](https://github.com/poljar/weechat-matrix/blob/master/contrib/matrix_upload)
|
|
|
|
should be installed under your `PATH`.
|
2018-04-09 05:43:04 +02:00
|
|
|
|
|
|
|
# Configuration
|
|
|
|
|
|
|
|
Configuration is completed primarily through the Weechat interface. First start Weechat, and then issue the following commands:
|
|
|
|
|
|
|
|
1. Start by loading the Weechat-Matrix plugin:
|
|
|
|
|
2019-03-16 12:14:15 +01:00
|
|
|
/script load matrix.py
|
2018-04-09 05:43:04 +02:00
|
|
|
|
|
|
|
1. Now set your username and password:
|
|
|
|
|
2019-02-19 14:04:45 +01:00
|
|
|
/set matrix.server.matrix_org.username johndoe
|
|
|
|
/set matrix.server.matrix_org.password jd_is_awesome
|
2018-04-09 05:43:04 +02:00
|
|
|
|
|
|
|
1. Now try to connect:
|
|
|
|
|
2019-02-19 14:04:45 +01:00
|
|
|
/matrix connect matrix_org
|
2018-04-09 05:43:04 +02:00
|
|
|
|
|
|
|
1. If everything works, save the configuration
|
|
|
|
|
2019-01-23 22:02:19 +01:00
|
|
|
/save
|
2018-04-09 05:43:04 +02:00
|
|
|
|
|
|
|
## For using a custom (not matrix.org) matrix server:
|
|
|
|
|
|
|
|
1. Add your custom server to the plugin:
|
|
|
|
|
2019-01-23 22:02:19 +01:00
|
|
|
/matrix server add myserver myserver.org
|
2018-04-09 05:43:04 +02:00
|
|
|
|
|
|
|
1. Add the appropriate credentials
|
|
|
|
|
2019-01-23 22:02:19 +01:00
|
|
|
/set matrix.server.myserver.username johndoe
|
|
|
|
/set matrix.server.myserver.password jd_is_awesome
|
2018-04-09 05:43:04 +02:00
|
|
|
|
|
|
|
1. If everything works, save the configuration
|
|
|
|
|
2019-01-23 22:02:19 +01:00
|
|
|
/save
|
2018-04-09 05:43:04 +02:00
|
|
|
|
2019-01-24 17:15:37 +01:00
|
|
|
|
|
|
|
## Bar items
|
|
|
|
|
|
|
|
There are two bar items provided by this script:
|
|
|
|
|
|
|
|
1. `matrix_typing_notice` - shows the currently typing users
|
|
|
|
|
|
|
|
1. `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.
|
|
|
|
|
|
|
|
## Typing notices and read receipts
|
|
|
|
|
|
|
|
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:
|
|
|
|
|
|
|
|
1. `matrix.network.read_markers_conditions`
|
|
|
|
1. `matrix.network.typing_notice_conditions`
|
|
|
|
|
2018-04-09 05:43:04 +02:00
|
|
|
# Helpful Commands
|
|
|
|
|
|
|
|
`/help matrix` will print information about the `/matrix` command.
|
|
|
|
|
2019-01-23 17:18:51 +01:00
|
|
|
`/help olm` will print information about the `/olm` command that is used for
|
|
|
|
device verification.
|
|
|
|
|
2018-04-09 05:43:04 +02:00
|
|
|
`/matrix help [command]` will print information for subcommands, such as `/matrix help server`
|