updated weechat

updated weechat configs


updated weechat

updated weechat configs

weechat config updates

use it more, config it more

bouncer mode

note: the following uses ed25519 certs, it works between weechat on archlinux (with GnuTLS), but not between weechat on archlinux and android. Use other certs (ex: ECDSA) if mobile apps are required.

configure at least the important parts: server login/autojoin, secured data, relay

generate a self signed ssl certificate, adjust DNS:...,IP:... as appropriate

 1openssl req -x509 -nodes -days 7300 \
 2  -key <(openssl genpkey -algorithm ED25519 | tee relay.pem) \
 3  -subj "/O=weechat/CN=localhost" \
 4  -addext "subjectAltName=DNS:localhost,IP:" \
 5  -keyout relay.pem -out relay.pem
 7# or as 2 separate calls if you have weird issues
 8openssl genpkey -algorithm ED25519 -out relay.pem
 9openssl req -x509 -nodes -days 7300 \
10  -key relay.pem \
11  -subj "/O=weechat/CN=localhost" \
12  -addext "subjectAltName=DNS:localhost,IP:" \
13  -keyout relay.pem -out relay.pem

obtain fingerprint with

1openssl x509 -in relay.pem -outform der | sha256sum -b | cut -d ' ' -f1

add systemd user service (from archwiki)

 2Description=A headless WeeChat client and relay service
 7ExecStart=/usr/bin/weechat-headless --daemon

enable service and enable linger for user (run service on boot, don't stop when logout), reboot

1systemctl --user daemon-reload
2systemctl --user enable weechat-headless
3sudo loginctl enable-linger $USER
4sudo reboot

weechat configs

in alphabetical order, but secured data should probably be set first


hide all the merged server buffer

1/set buflist.look.display_conditions ${buffer.hidden}==0 && ${merged}==0 || ${name}==weechat

stop jumping buffer

1/set irc.look.buffer_switch_autojoin off

more colors

1/set irc.look.color_nicks_in_names on
2/set irc.look.color_nicks_in_nicklist on

disable ctcp

1/set irc.ctcp.action ""
2/set irc.ctcp.clientinfo ""
3/set irc.ctcp.finger ""
4/set irc.ctcp.ping ""
5/set irc.ctcp.source ""
6/set irc.ctcp.time ""
7/set irc.ctcp.userinfo ""
8/set irc.ctcp.version ""

default messages

1/set irc.server_default.msg_part going... going... gone!
2/set irc.server_default.msg_quit it can't be DNS?! it's always DNS!!!
3/set irc.server_default.nicks ""
4/set irc.server_default.username ""
bouncer server
1/server add bouncer
2/set irc.server.bouncer.ssl on
3/set irc.server.bouncer.ssl_fingerprint 33300c58504afc85a43ab49acea568d37780b214b078f8917eb9033a762b8e26
4/set irc.server.bouncer.autoconnect on
5/set irc.server.bouncer.username seankhliao
6/set irc.server.bouncer.nicks seankhliao,arccy
7/set irc.server.bouncer.password freenode:${sec.data.relay_pass}
freenode server
1/server add freenode chat.freenode.net/6697
2/set irc.server.freenode.ssl on
3/set irc.server.freenode.autoconnect on
4/set irc.server.freenode.autojoin #archlinux,#archlinux-offtopic,#archlinux-reproducible,#go-nuts
5/set irc.server.freenode.username seankhliao
6/set irc.server.freenode.nicks seankhliao,arccy
SASL with password

login and identify with password

1/set irc.server.freenode.sasl_mechanism plain
2/set irc.server.freenode.sasl_username seankhliao
3/set irc.server.freenode.sasl_password ${sec.data.freenode_pass}
SASL with CertFP

login and identify with client certs

generate cert as above with name freenode.pem, add

1/set irc.server.freenode.ssl_cert %h/ssl/freenode.pem
2/set irc.server.freenode.sasl_mechanism external

check and associate current cert with identity, future logins won't require password

1/msg NickServ identify PASSWORD
2/whois seankhliao
3/msg NickServ CERT ADD

don't log join/leave, and dim log line

1/set logger.color.backlog_end darkgray
2/set logger.color.backlog_line darkgray
3/set logger.file.color_lines on
4/set logger.level.irc 2


1/script install colorize_nicks.py
2/set colorize_nicks.look.colorize_input on
3/set colorize_nicks.look.min_nick_length 3


1/script install notify.py

open up a protected relay

1/set relay.network.password ${sec.data.relay_pass}
2/set relay.irc.backlog_since_last_message on
3/set relay.port.ssl.irc 7992
4/set relay.port.ssl.weechat 7993

unlimited backlog

1/set relay.irc.backlog_max_number 0

store data "securely", decrypt automatically with passphrase in a file

1/secure passphrase
2/set sec.crypt.passphrase_file ~/.ssh/weechat_pass
3/secure set relay_pass xxxxxx
4/secure set freenode_pass yyyyyy

stylized messages

1/trigger del beep
2/trigger addreplace irc_join modifier "2000|weechat_print" "${tg_tags} =~ ,irc_join," "/.*[^(]\((.*)\).*/${color:237}${tg_tag_nick}@${re:1}/tg_message_nocolor /.*/${tg_prefix}\t${tg_message_nocolor}"
3/trigger addreplace irc_nick modifier "2000|weechat_print" "${tg_tags} =~ ,irc_nick," "/.*irc_nick1_([^,]*),irc_nick2_([^,]*).*/${re:1} -> ${re:2}/tg_tags /.*/${tg_prefix}\t${tg_tags}"
4/trigger addreplace irc_quit modifier "2000|weechat_print" "${tg_tags} =~ ,irc_quit," "/.*[^(]\((.*)\).*\ (\(.*\))/${color:237}${tg_tag_nick}@${re:1}: ${re:2}/tg_message_nocolor /.*/${tg_prefix}\t${tg_message_nocolor}"
5/trigger addreplace irc_part modifier "2000|weechat_print" "${tg_tags} =~ ,irc_part," "/.*[^(]\((.*)\).*\ (.*)/${color:237}${tg_tag_nick}@${re:1}: ${re:2}/tg_message_nocolor /.*/${tg_prefix}\t${tg_message_nocolor}"
6/trigger addreplace nick_color_action modifier weechat_print "${tg_tags} =~ ,irc_action, && ${tg_tags} !~ ,self_msg," "/.*/${info:nick_color,${tg_tag_nick}}${tg_prefix_nocolor}\t${tg_message}"
7/trigger addreplace url_color modifier weechat_print "${tg_tags} !~ irc_quit" ";[a-z]+://\S+;${color:32}${re:0}${color:reset};"

from weechat wiki, dim user

1/alias add dim trigger addreplace dim_$server_$1 modifier weechat_print "${tg_tag_nick} == $1 && \${server} == $server" "/(.*)/${color:darkgray}${tg_prefix_nocolor}\t${color:darkgray}${tg_message_nocolor}/"; print \---\t$1 is now dimmed on $server
2/alias add undim trigger del dim_$server_$1; print \---\t$1 is no longer dimmed

disable the giant logo

1/set weechat.startup.display_logo off

change the look of the left gutter: more compact time, change icons

1/set weechat.look.buffer_time_format  ${color:253}%H${color:245}%M
2/set weechat.look.prefix_action *
3/set weechat.look.prefix_error !!
4/set weechat.look.prefix_join >>
5/set weechat.look.prefix_network ~
6/set weechat.look.prefix_quit <<
7/set weechat.look.read_marker_string *

colors: purple (5) is me, more colors for everyone else

1/set weechat.color.chat_delimiters darkgray
2/set weechat.color.chat_highlight 5
3/set weechat.color.chat_highlight_bg 0
4/set weechat.color.chat_nick_colors 1,2,3,4,6,7,9,10,11,12,13,14,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,69,70,182,183,184,224,225,226,227
5/set weechat.color.chat_nick_self 5
6/set weechat.color.chat_prefix_suffix gray

disable unused plugins

1/set weechat.plugin.autoload *,!fifo,!guile,!javascript,!lua,!perl,!php,!ruby,!tcl,!spell,!xfer

move buffers to top, who looks at the nicklist with 1800 people in a channel, abbreviated statusline, no titlebar

1/set weechat.bar.buflist.position top
2/set weechat.bar.nicklist.hidden on
3/set weechat.bar.status.color_bg 0
4/set weechat.bar.status.items +buffer_name+(buffer_modes)+{buffer_nicklist_count}+buffer_zoom+buffer_filter,scroll,[lag],[hotlist],completion
5/set weechat.bar.title.hidden on

filter out join/leaves, except for recent partiticants,

1/set irc.look.smart_filter on
2/filter add irc_smart * irc_smart_filter *

navigate with ctrl+arrows

1/key bind meta2-1;5A /window page_up
2/key bind meta2-1;5B /window page_down
3/key bind meta2-1;5C /buffer +1
4/key bind meta2-1;5D /buffer -1