Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
My always up-to-date WeeChat configuration (requires weechat 2.3-dev (weechat-devel) or higher)

idea and some snippets taken from pascalpoitras' weechat config

Enable mouse

/mouse enable

Set up encrypted data

/secure passphrase <pass>
/secure set relaypass <pass>
/secure set bitlbeepass <pass>
/secure set bncaddrport <addr/port>
/secure set bncpass <pass>


Default settings

/set irc.server_default.nicks kei,keira
/set irc.server_default.username k
/set irc.server_default.msg_part ""
/set irc.server_default.msg_quit ""
/set irc.server_default.ssl_verify off
/set irc.server_default.capabilities "account-notify,away-notify,cap-notify,multi-prefix,server-time"

Set up bitlbee

/server add IM -autoconnect
/set irc.server.IM.command "/msg &bitlbee identify;/oper kei ${};/away <my away message>"

Set up IRC servers

/server add RIZON ${} -ssl -autoconnect
/set irc.server.RIZON.password kei/rizon:${}

/server add FREENODE ${} -ssl -autoconnect
/set irc.server.FREENODE.password kei/freenode:${}

/connect -all


Load at startup

/set weechat.plugin.autoload "*,!lua,!tcl,!fifo,!xfer,!guile,!javascript"

this will load all modules except lua, tcl, fifo, xfer, guile and javascript


/set aspell.check.default_dict en
/set aspell.check.suggestions 3
/set aspell.color.suggestion *green
/aspell enable


$ mkdir -p ~/.weechat/ssl
$ cd ~/.weechat/ssl
$ export IP=192.168.1.x
$ openssl req -x509 -nodes -newkey rsa:2048 -keyout relay.pem \
    -subj "/O=weechat/CN=my-weechat" \
    -config <(cat /etc/ssl/openssl.cnf <(printf "\n[v3_ca]\nsubjectAltName = @alternate_names\n[alternate_names]\nIP.1 = \${ENV::IP}")) \
    -days 365 -out relay.pem
/relay sslcertkey
/relay add ssl.weechat <port>
/set ${}


/set logger.level.core.weechat 0
/set logger.level.irc 0
/set logger.level.irc.freenode.##news 1

Alternatively, disable logging

/set weechat.plugin.autoload "*,!lua,!tcl,!fifo,!xfer,!guile,!javascript,!logger"
/plugin unload logger


/script install (for tmux)

/set plugins.var.python.terminal-title.title "WeeChat %version"

/set plugins.var.perl.nickregain.RIZON_enabled on
/set plugins.var.perl.nickregain.FREENODE_enabled on (private script (for now), ignore this)

/set on
/set plugins.var.python.file_download.download_limit 10485760

News (from pascalpoitras, w/ custom edits)


/filter add news irc.FREENODE.##news !nick_newsly*+!host_yano@unaffiliated/yano/bot/rssly,!irc_privmsg *
/filter add news_interest irc.FREENODE.##news nick_newsly*+irc_privmsg,host_yano@unaffiliated/yano/bot/rssly+irc_privmsg !^(\s|\[)(Reddit [-] /r/netsec|Wired|EFF Updates|techdirt|TorrentFreak|Science Daily|Hacker News|phoronix|Google News - UK|Google News - Science|Google News - Health|Google News - World|Twitter - @BBCBreaking|BBC|The Guardian|Ars Technica|The Intercept|Canoe [-] Weird News)( \-| | |\])

##news is a channel on Freenode with a bot named newsly that display news from various sources. The first /filter command hides everything that happens on the channel except PRIVMSG from newsly. The second /filter hides every news except those from the given list.

Full list of news sources is available here. To add to the list, modify the second filter, separate them using "|".

The following trigger uses the new hook_line. You must be using 2.3-dev (weechat-devel) or higher.

/trigger add news_line line "*;irc.FREENODE.##news;irc_privmsg+nick_newsly*" "" "/.*/${tg_message_nocolor}/site_name /^\[([^]]+)\].*/${re:1}/site_name /.*/${tg_message_nocolor}/title /^[^]]+\]//title /.*/${site_name}/site_color /^([^-]+).*/${info:nick_color_name,${re:1}}/site_color /.*/${title}/url ==.*(https?://[^ ]+).*==${re:1}==url /\+/%2B/url /,/%2C/url /\!/%21/url /\*/%2A/url /.*/${re:0},url_${url}/tags ==https?://[^ ]+ .*====title /.*/[${color:${site_color}}${site_name}${color:reset}] ${title}/message/url /.*//prefix" "" "" "none"

hides the nick "newsly" and formats the news to look nicer, this version keeps the URLs and the timestamps (non-powerline version)

/set "${nicklist} && ${buffer.full_name} != irc.FREENODE.##news"

disables nicklist in the ##news channel.

Highlight Monitor (from pascalpoitras)

/eval /set weechat.startup.command_after_plugins "${weechat.startup.command_after_plugins};/buffer add highmon"

/buffer_autoset add core.highmon title Highlight Monitor

/trigger add highmon_like print ""
/trigger set highmon_like conditions "${tg_highlight} == 1 && ${tg_displayed} == 1 && ${buffer.local_variables.type} == channel && ${tg_tags} =~ ,irc_privmsg,"
/trigger set highmon_like command "/print -newbuffer highmon -tags ${tg_tags} ${color:${info:nick_color_name,${server}}}${cut:4,${color:${weechat.color.chat_prefix_more}}${weechat.look.prefix_align_more},${server}}${color:${info:nick_color_name,${channel}}}${channel}\t${if:${tg_tags} !~ ,irc_action,?${weechat.look.quote_nick_prefix}${tg_prefix}${color:reset}${weechat.look.quote_nick_suffix}:${tg_prefix}${color:reset}} ${tg_message}"

This trigger create a new buffer named highmon. This buffer will contain all the highlighted message from all the channels you are on. This is similar to the script but without any options.


/set weechat.look.highlight kei
/buffer_autoset add weechat.notify.irc.FREENODE.##news highlight
/buffer_autoset add irc.FREENODE.##news highlight_words <news you want to be notified of, perhaps some local area names>
/buffer_autoset add irc.IM.&bitlbee highlight_words "New request"


/trigger add upgrade_scripts signal day_changed
/trigger set upgrade_scripts command "/script update;/wait 10s /script upgrade"

The trigger upgrade_scripts will update the local script cache and then upgrade all the installed scripts at midnight. (from pascalpoitras)


/alias add shrug /msg $channel ¯\_(ツ)_/¯
/alias add lenny /msg $channel ( ͡° ͜ʖ ͡°)
/alias add slap /me slaps $1 around a bit with a large trout


/set irc.look.smart_filter on
/filter add irc_smart *,!irc.IM.* irc_smart_filter *


/set irc.server_default.away_check 0
/set irc.server_default.away_check_max_nicks 25
/set irc.color.nick_prefixes "q:lightred;a:lightcyan;o:121;h:lightmagenta;v:229;*:lightblue"
/set "*!*@$host"
/set irc.look.buffer_switch_autojoin off
/set irc.look.buffer_switch_join off
/set irc.look.part_closes_buffer on

Keyboard Shortcuts

/key bind meta-meta2-A /window up
/key bind meta-meta2-B /window down
/key bind meta-meta2-C /buffer +1
/key bind meta-meta2-D /buffer -1
/key bind meta-g /go
/key bind meta-c /close
/key bind meta-h /buffer hide
/key bind meta-x /c
/key bind meta-4 /c -all

alt+up/down - move between horizontal split windows

alt+left/right - move between buffers

alt+c - close the active buffer

alt+h - hide the active buffer

alt+g - /go plugin

alt+c - close buffer

alt+x - clear buffer

alt+4 - clear all buffers

Security settings

Disable CTCP

/set irc.ctcp.action ""
/set irc.ctcp.clientinfo ""
/set irc.ctcp.finger ""
/set ""
/set irc.ctcp.source ""
/set irc.ctcp.time ""
/set irc.ctcp.userinfo ""
/set irc.ctcp.version ""



/set logger.color.backlog_end darkgray
/set logger.color.backlog_line darkgray

/set weechat.color.separator red
/set red
/set black
/set default

/set yellow
/set fset.color.title_count_options white
/set fset.color.title_current_option yellow
/set fset.color.line_selected_bg1 52

Active/Inactive Buffers

/set weechat.look.color_inactive_window off


/set "[input_search],[input_paste],input_text"
/set "[time],[input_prompt]+(away),[buffer_plugin],buffer_name+(buffer_modes),scroll,[lag],[aspell_suggest]"

Buffer List

/set irc.look.server_buffer independent

Note: show channels and privates buffers under their respective server instead of mixing them all.

/set buflist.format.buffer_current "${format_number}${indent}${format_nick_prefix}${color:253}${format_name}"
/set buflist.format.hotlist_highlight "${color:201}"
/set buflist.format.hotlist_message "${color:229}"
/set buflist.format.hotlist_private "${color:121}"
/set buflist.format.hotlist_low "${color:default}"
/set weechat.look.hotlist_add_conditions "${buffer.num_displayed} == 0 || ${} == 0"
/set buflist.format.number "${color:darkgray}${number}${if:${number_displayed}?.: }"
/set buflist.look.sort "irc_server.disconnected,number"
/set 25
/set 25


/set irc.look.color_nicks_in_nicklist off
/set 10
/set 10


/set weechat.color.chat_highlight yellow
/set weechat.color.chat_highlight_bg red


/set weechat.look.buffer_time_format [%Y-%m-%d %H:%M:%S]
/set weechat.look.read_marker_string "─"
/set weechat.look.prefix_suffix "│"
/set weechat.look.separator_horizontal ""
/set weechat.color.chat_nick_colors "229,226,224,222,219,211,209,195,192,185,176,172,159,155,145,142,141,139,135,109"

All done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment