Weechat for Matrix with e2ee

4 minute read Published:

Weechat for Matrix with OLM e2ee support
Table of Contents

WEECHAT FOR MATRIX WITH OLM e2ee support

  • and how to connect to hispagatos.org matrix server


Create a matrix account on matrix.hispagatos.org

  • First we going to register using riot
    • I suggest you use riot-desktop but riot-android should work just fine.
  • Open the matrix client, riot-desktop in our case but im sure other clients should work as well. Since this is focus on weechat we just going to sent you to a preview howto in how to register an account for our hispagatos server.
  • To create an account follow this tutorial is in Spanish but you can use a online web translator and follow the images.

install yay if you use Arch GNU/Linux

  • Yet Another Yogurt - An AUR Helper Written in Go, GO is fast, much better than using scripting languages…
  • common start using real programming languages :) python is for lamers such why anyone can script on it ;)

Install weechat-matrix plugin

  • Get weechat-matrix
  • Follow the README.md instructions, this is not a howto for lamers so no need to rewrite that is already wrote there :) so RTFM.
  • Autoload weechat-matrix plugin
 ln -sf ~/.weechat/python/matrix.py ~/.weechat/python/autoload/matrix.py

Install cool fonts for console apps

  • you have some options here
 yay -S ttf-emojione-color
 yay -S noto-fonts-emoji
 yay -S ttf-twemoji-color

Configure Weechat and connect

  • Set up weechat vault
    • You do NOT want to set your password in clear text in your config file instead we use the secure weechat option to encrypt our passwords just like any other password manager
 /secure passphrase <here your password to unlock the vault>
 /secure set hispagatospass <here your matrix.hispagatos.org pass>
 /save
  • Configure matrix server on weechat
 /matrix server add hispagatos_org matrix.hispagatos.org
 /set matrix.server.hispagatos_org.username rek2
 /set matrix.server.hispagatos_org.password "${sec.data.hispagatospass}"
 /save
  • Connect to the matrix server

    /matrix connect hispagatos_org
    
  • To import keys from another device,computer,client..

    /olm import /home/rek2/Descargas/riot-keys.txt <password of the backup>
    
  • To export keys to be backup or used in another device,computer,client..

 /olm export /home/rek2/Descargas/riot-keys.txt <password of the backup
  • Verify peoples devices,keys etc
    • you can verify more than one device, by using the domain only
 /olm verify @nick:hispagatos.org
 /olm verify :hispagatos.org
 /olm verify :matrix.org
 /olm verify @nick:matrix.org
  • Weechat matrix upload helper

    • this is where you put the plugin helper files this below is an example.
    • for Fish shell
      set -U fish_user_paths /home/rek2/herramientas/weechat-matrix/contrib $fish_user_paths
    
    • for Bash shell
    export PATH=$PATH:/home/rek2/herramientas/weechat-matrix/contrib
    
  • Turn on auto connect and check all weechat-matrix options and set them to your liking.

    • Scroll down to the option *.autoconnect change this to on, you turn it on by alt+space
 /fset matrix
  • Add [matrix_modes] to your weechat status bar
    • Hit alt+enter to edit. add [matrix_modes], and/or [matrix_typing_notice] in the middle somewhere and hit again, I recomend removing some statuses that you do not care about..
/fset bar.status.items
/save
  • Improve UI
    • if you want to select text press shift or alt depends on the terminal
 /set weechat.bar.input.size 0
 /set weechat.bar.input.size_max 2
 /mouse enable
 /mouse disable

More plugins that will make quality of life better

 /script load urlgrab.py
 /fset urlgrab
  • Spell check
 yay -S aspell-es
 yay -S aspell-en
 /set aspell.check.default_dict en,es
 /set aspell.check.suggestions 3
 /set aspell.color.suggestion *green
 /aspell enable`
 /save
  • Add the spell check suggestions to your weechat status bar, [aspell_dict],[aspell_suggest]
 /fset bar.status.items

Make surf the default browser

  • look for netsurf.desktop and copy it
 yay -S surf
 sudo cp  netsurf.desktop surf.desktop
 sudo sed -i s/netsurf/surf/g surf.desktop
 xdg-settings set default-web-browser surf.desktop

The End

  • Now this is just the tip of the iceberg, there are tons of weechat plugins, you can write your own, weechat is a hacker tool, this means is meant for hackers or people who likes to tinker and make things their own way and not scared of reading and learning and improving themself… for more things to learn start by reading the weechat scripting and user guides

  • Rek2

  • weechat

  • weechat-matrix

Happy Hacking

comments powered by Disqus