Setting up Weechat
Draft: Aug 16th, as I use it, I will add more, and try to add a description of the settings in the last block of text.
Let’s Encrypt
Following the instructions from README file, leads me to
https://certbot.eff.org/#ubuntutrusty-other
wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto
Then,
./certbot-auto certonly --standalone -d <domain> -m <email>
Make sure ports 80 and 443 are open.
The output should be something like the following.
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at
/etc/letsencrypt/live/<domain>/fullchain.pem. Your cert will
expire on 2016-11-16. To obtain a new or tweaked version of this
certificate in the future, simply run certbot-auto again. To
non-interactively renew *all* of your certificates, run
"certbot-auto renew"
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le
Installing Weechat
sudo apt-get build-dep weechat
git clone <etc...>
The following three lines setup a secure password database with a securing passphrase, and a password each for relay and freenode.
/secure passphrase <your passphrase>
/secure set relay-password <relay password>
/secure set freenode-sasl_password <freenode password>
/secure set slack_token <slack token[, slack token]>
The rest you can copy paste directly into weechat as one block of text.
/set relay.network.password ${sec.data.relay-password}
/relay sslcertkey
/relay add ssl.weechat 9001
/set irc.server_default.nicks parsnip,parsnip0,parsnip1,parsnip2,parsnip3
/set irc.server_default.username parsnip
/set irc.server.freenode.sasl_username parsnip
/set irc.server.freenode.sasl_password ${sec.data.freenode-sasl_password}
/set plugins.var.python.slack.slack_api_token "${sec.data.slack_token}"
/set plugins.var.python.slack.slack_api_token "${sec.data.slack_token_puppy}"
/set plugins.var.python.slack.slack_api_token "${sec.data.slack_token_puppy}, ${sec.data.slack_token_6001x}"
/set weechat.network.gnutls_ca_file /etc/ssl/certs/ca-certificates.crt
/set irc.server.freenode.addresses chat.freenode.net/6697
/set irc.server.freenode.ssl on
/connect freenode
/server add oftc irc.oftc.net/6697 -ssl
/connect oftc
/script install autosort.py
/script install buffers.pl
/script install iset.pl
/script install prism.py
/filter add irc_smart * irc_smart_filter *
/filter add hidevoices * irc_mode (\+|\-)v
/key bind meta-J /window scroll_down
/key bind meta-K /window scroll_up
/set irc.server_default.default_msg_part ""
/set irc.server_default.default_msg_quit ""
/set irc.look.display_join_message 329,332,333
/set irc.server.autojoin
Issues with tmux
tmux
may have problems displaying ncurses properly, so make sure that echo $TERM
gives screen-256color
. (For example, glitchy scrolling or bars that don’t fill screen.)
Global nicklist for a single channel
The only nick list I care for is Bitlbee’s, and I keep that at the bottom as a global bar with
/set weechat.bar.fbnl.items "@irc.<server>.<channel>:buffer_nicklist"
For example.
/set weechat.bar.fbnl.items "@irc.bitlbee.&bitlbee:buffer_nicklist"
Also described here: https://weechat.org/files/doc/stable/weechat_user.en.html#bar_items
fast buffer switching
This is described for instance here: https://github.com/weechat/weechat/issues/762
/trigger add numberjump modifier "2000|input_text_for_buffer" "${tg_string} =~ ^/[0-9]+$" "=/([0-9]+)=/buffer *${re:1}=" ""
User punksweat on #weechat pointed out this script.
Now if you type for example /15
, it is like doing /buffer 15
.
filtering some of bitlbee’s join part messages.
/filter add bitlbee_filter irc.bitlbee.* irc_nick_back,irc_quit *
layout
You’ll have a hard time modifying your weechat elements if you don’t know the name of things. Here’s a handy diagram from the user guide.
From: https://weechat.org/files/doc/stable/weechat_user.en.html#screen_layout
▼ bar "title"
┌───────────────────────────────────────────────────────────────────────────┐
│Welcome to #test, this is a test channel │
│12:52:27 --> | Flashy (flashcode@weechat.org) has joined #test │@Flashy│
│12:52:27 -- | Nicks #test: [@Flashy @joe +weebot peter] │@joe │
│12:52:27 -- | Channel #test: 4 nicks (2 ops, 1 voice, 1 normal) │+weebot│
│12:52:27 -- | Channel created on Tue Jan 27 06:30:17 2009 │peter │
│12:54:15 peter | hey! │ │
│12:55:01 @joe | hello │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│[12:55] [6] [irc/freenode] 3:#test(+n){4}* [H: 4:#abc(2,5), 6] │
│[@Flashy(i)] hi peter!█ │
└───────────────────────────────────────────────────────────────────────────┘
▲ bars "status" and "input" bar "nicklist" ▲
/bar add rootinput root bottom 1 0 [buffer_name]+[input_prompt]+(away),[input_search],[input_paste],input_text
/bar del input
12:50 status: window (conditions: -), bottom, filling: horizontal(top/bottom)/vertical(left/right), height: 1
12:50 priority: 500, fg: white, bg: blue, items: [time],[buffer_last_number],[buffer_plugin],buffer_number+:+buffer_name+(buffer_modes)+{buffer_nicklist_count}+buffer_zoom+buffer_filter,scroll,[lag],[hotlist],completion
/bar add mybar root bottom 1 0 [time],buffer_number+:+buffer_name,completion
/bar add status_active window bottom 1 500 [time],[buffer_last_number],[buffer_plugin],buffer_number+:+buffer_name+(buffer_modes)+{buffer_nicklist_count}+buffer_zoom+buffer_filter,scroll,[lag],[hotlist],completion
/bar add title_active window top 1 500 buffer_title
12:50 status: window (conditions: -), bottom, filling: horizontal(top/bottom)/vertical(left/right), height: 1
12:50 priority: 500, fg: white, bg: blue, items: [time],[buffer_last_number],[buffer_plugin],buffer_number+:+buffer_name+(buffer_modes)+{buffer_nicklist_count}+buffer_zoom+buffer_filter,scroll,[lag],[hotlist],completion
13:01 title: window (conditions: active), top, filling: horizontal(top/bottom)/vertical(left/right), height: 1
13:01 priority: 500, fg: white, bg: blue, items: buffer_title