So, this is a quick guide to get Slack setup via WeeChat, and have it work with native clients on both phones and your desktop – as well as your *nix console of choice and even 3rd party notification clients!
Because Slack can’t be used from a console by default. Because 12 of them eat well over 5GB of memory on my machine if opened in tabs, and if used via the Slack native client they helpfully “unload” themselves to save memory making flipping through my channels painful and slow. This is chat, it shouldn’t be slow!
Also, WeeChat is kinda of awesome. Jump to last channel with activity (across servers!), setup filters to get rid of noise you don’t care about,
We are going to be setting up a few things. WeeChat, WeeChat Relay, wee-slack, Glowing Bear and WeeChat Android or something like Glowing Bear Cordova. At the end you should have interfaces that look something like this…
In the screenshots I am sure you will notice a bit of echoing of the server name in the channel short_name that I use, this is so you know what server it is from in WeeChat Android.
Alright, so it is a little hard to do, but I couldn’t help but quote the song. Moving briskly onward!
Install WeeChat as is applicable for your platform. https://weechat.org/files/doc/stable/weechat_user.en.html#install
Install wee-slack as is applicable for your platform. https://github.com/wee-slack/wee-slack
Then you will get to registering your wee-slack with your slack token. There are a few ways to get a slack token. The right™ way to do it is exactly as documented in the wee-slack install guide. Sadly, this will often not work due to free slack limitations, or administrative policies. So, then you can try to get your slack admin to give you a legacy slack token, but due to misunderstandings around the security repercusions they often won’t. Do not fear, there is a way that always works, see next step!
(if required) If you can’t get a token in the recommended ways as listed in #3 then you can get the token out of the web interface to slack. It is annoying but so far 100% successful for me. Log into the web interface to your slack channel, and go to view source, then search for xox or api_token. This hopefully will get you to your api key, which should look something like the image below.
If everything is working great, don’t worry about this part!
Problem: It never connects, but never errors.
Solution: Change the timeout /set plugins.var.python.slack.slack_timeout to something higher. If that doesn’t work and you happen to be on a lot of channels, you might need to turn of the background loading. /set plugins.var.python.slack.background_load_all_history “false”. I had to do both to get all 10 of my servers working properly.
Problem: You want different names for channels, by setting short_name but they are getting overwritten on your slack channels.
Solution: I already filed a bug on this but the quick fix is to just turn off the typing notification in WeeChat with /set plugins.var.python.slack.channel_name_typing_indicator “false”.
… Work In Progress (WIP) …