![](/style/images/good.png)
![](/style/images/bad.png)
WeeChat操作各种聊天软件
source link: http://maskray.me/blog/2016-08-13-weechat-rules-all
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
WeeChat操作各种聊天软件
WeeChat
把Facebook Messenger、Google Hangouts、IRC、QQ、Telegram、Twitter、微信等整合起来,用同一个客户端WeeChat控制。配置文件:https://github.com/MaskRay/Config/tree/master/home/.weechat/,参考https://pascalpoitras.com/my-weechat-configuration/。
界面参考https://gist.github.com/pascalpoitras/8406501,UI显示成这样主要靠autosort.py
和buffers.pl
,以及文中提到的Bar input。
autosort.py
把相同server的buffers顺序编号
bot2human.py
buffers.pl
窗口左侧sidebar显示buffers
我的wechatircd/telegramircd使用--join new
,/part
一个channel后下次收到消息仍能自动加入,觉得一个群烦了就用/mode +m
屏蔽,下次收到消息就不会自动加入了。
highmon.pl
参考https://pascalpoitras.com/2013/08/09/weechat-highlight/
匹配highlight规则的行会显示在highmon窗口里。
notify.py
pastebin.py
我的插件:https://github.com/MaskRay/Config/blob/master/home/.weechat/python/autoload/pastebin.py,用于上传本地文件到pastebin并把链接贴到当前buffer。
/paste /tmp/a.jpg
用img.vim-cn.com图床分享图片,在当前buffer插入链接
/paste /tmp/a.txt
用cfp.vim-cn.com pastebin分享文件,在当前buffer插入链接
Slack
让team owner开启IRC gateway:https://get.slack.help/hc/en-us/articles/201727913-Connecting-to-Slack-over-IRC-and-XMPP
Bitlbee
安装aur/bitlbee-libpurple-unicode-channel(或原版aur/bitlbee-libpurple)
参考https://www.bitlbee.org/user-guide.html#set_utf8_nicks 在&bitlbee
buffer里输入
/etc/bitlbee/bitlbee.conf
中[settings]
section的Proxy
可以设置proxy。
&bitlbee
buffer:
register
/oper any $password
Facebook Messenger
aur/bitlbee-facebook-git
https://wiki.bitlbee.org/HowtoFacebookMQTT
创建一个channel显示所有联系人:
Google Hangouts
https://wiki.bitlbee.org/HowtoGtalk
支持OAuth认证,不需要输入密码。
创建一个channel显示所有联系人:
https://wiki.bitlbee.org/HowtoTwitter
Google Hangouts的联系人,&bitlbee
中nick会优先使用Contacts里设置的备注名。设置utf8_nicks
后就不会显示为乱码。
微信网页版
https://github.com/MaskRay/wechatircd
如果需要定制命令行选项的话,把/usr/lib/systemd/system/wechatircd.service
复制到/etc/systemd/system/wechatircd.service
,添加--ignore 不想看到的群名子串1 不想看到的群名子串2
选项
QQ网页版
https://github.com/MaskRay/webqqircd
如果需要定制命令行选项的话,把/usr/lib/systemd/system/webqqircd.service
复制到/etc/systemd/system/webqqircd.service
,添加--ignore 不想看到的群名子串1 不想看到的群名子串2
选项
Telegram网页版
https://github.com/MaskRay/telegramircd
如果需要定制命令行选项的话,把/usr/lib/systemd/system/telegramicd.service
复制到/etc/systemd/system/telegramicd.service
,添加--ignore 不想看到的群名子串1 不想看到的群名子串2
选项
服务器上运行WeeChat
WeeChat不支持以WeeChat为客户端的relay。浏览器desktop notification不方便定制,显示效果也差,快捷键不够方便,因此不想用Glowing Bear。
把wechatircd和浏览器运行在服务器上,可以持续运行无需每日扫码,参见https://maskray.me/blog/2016-07-06-wechatircd-webqqircd-without-scanning-qrcode-daily。
我让WeeChat也运行在服务器的一个名为weechat的tmux session,本地用ssh访问:
由于notify-send
不能通过网络传输,自制简易的notification服务:
- 修改服务器
notify.py
插件,往127.0.0.1:9010发数据 ssh -R 9010:0:9010
把服务器9010重定向到本地9010- 本地启动https://github.com/MaskRay/Config/blob/master/home/bin/notify-server监听9010,收到数据后执行
notify-send
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK