Skip to content

weechat | Cheatsheetn

This is how I use weechat to be comfortable on a daily basis in my main chat client


echo "net-irc/weechat alias buflist charset exec fifo fset irc logger \
    nls perl python relay scripts spell tcl trigger typing xfer" \
    >> /etc/portage/package.use/weechat
emerge --ask net-irc/weechat pycryptodome

Getting started

mkdir -p ~/.weechat/python/autoload/
mkdir -p ~/.weechat/ssl
wget -q -P ~/.weechat/python/
ln -s  ~/.weechat/python/ ~/.weechat/python/autoload 
chmod +x ~/.weechat/python/
chown -R wuseman:wuseman ~/.weechat/
weechat --dir ~/.weechat

Install required tools for the script below to work

pip install --upgrade pip
pip install pycrypto

Install scripts Scripts

/set script.scripts.download_enabled on
/script install
/script install


/set off
/set script.scripts.download_enabled true
/mouse enable
/set irc.look.color_nicks_in_nicklist on
/set 14
/set 14
/set irc.look.notify_tags_whois "notify_highlight"
/set on
/set irc.look.item_channel_modes_hide_args ""
/set irc.look.nicks_hide_password ""
/set irc.look.notify_tags_whois "notify_message"
/set irc.look.server_buffer merge_without_core
/set weechat.look.item_time_format "%H:%M:%S"
/set weechat.look.quote_time_format "%H:%M:%S"
/set irc.server_default.autoreconnect_delay 30
/set irc.server_default.autoconnect "on"
/set irc.server_default.ipv6 off
/set irc.server_default.msg_kick "bye"
/set irc.server_default.msg_part " - parted!"
/set irc.server_default.msg_quit " - quit!"
/set irc.msgbuffer.whois private
/set irc.server_default.nicks "wuseman,_wuseman,^wuseman,|wuseman"
/set irc.server_default.realname "wuseman"
/set irc.server_default.password "<password>"
/set irc.server_default.ssl on
/set irc.server_default.ssl_verify on
/set weechat.look.prefix_align_max 14
/set buflist.look.nick_prefix on
/set on
/set on 
/set on 
/set 2
/set on 
/set 4
/set on
/set 2
/set 2
/set irc.server_default.autoreconnect_delay 10
/set irc.server_default.autorejoin_delay 5 
/set logger.file.flush_delay 0
/set logger.file.auto_log off

Logging Enable

/set logger.file.color_lines on
/set logger.file.flush_delay 0
/set logger.file.info_lines on
/set xfer.file.download_path "~/downloads"
/set logger.file.path "~/logs/weechat"
/set logger.mask.irc %Y/$server/$channel.%m-%d.log
/set logger.file.time_format "[%Y-%m-%d %H:%M:%S]"
/set logger.file.nick_prefix "<"
/set logger.file.nick_suffix ">"
/set plugins.var.perl.highmon.logging "on"

Adding Servers

This is just a very simple and minimal display example, edit to your own details before copying in

bash /server add LiberaChat -ssl -ssl_verify=off -autoconnect -username=wuseman/LiberaChat -password=<password> /set irc.server.LiberaChat.command "/msg nickserv identify <password>;/msg chanserv OP #channel;/msg chanserv OP #Nr1;/msg chanserv INVITE #channel; /msg chanserv INVITE #channel" /server add Bitlbee localhost/6667 -autoconnect -username=wuseman /set irc.server.Bitlbee.ssl off /set irc.server.Bitlbee.ssl_verify off /save /quit

Configure autojoin plugin

/set irc.look.buffer_open_before_autojoin off
/set plugins.var.python.autojoin.autosave on

Configure colorize nicks

/set colorize_nicks.look.blacklist_channels ""
/set colorize_nicks.look.blacklist_nicks ""
/set colorize_nicks.look.colorize_input on
/set colorize_nicks.look.greedy_matching on
/set colorize_nicks.look.ignore_nicks_in_urls off
/set colorize_nicks.look.ignore_tags ""
/set colorize_nicks.look.match_limit 20
/set colorize_nicks.look.min_nick_length  2


/set plugins.var.python.himan.notify on
/set weechat.notify.python.himan hilight
/set plugins.var.python.himan.only_away highlight
/set plugins.var.python.himan.nick_color lightmagenta
/set plugins.var.python.himan.buffer_color green
/set plugins.var.python.himan.outp_sep " |"
/set plugins.var.python.himan.outp_sep_color "yellow"
/set plugins.var.python.himan.outp_left "["
/set plugins.var.python.himan.outp_right "]"
for ((i=0; i<=255; i++))
    color=$(printf "#%02x%02x%02x" $i 0 $i)
    printf "%3d: \e[38;5;${i}m${color}\e[0m\n" $i


/set weechat.look.buffer_time_format %H:%M:%S 
/set weechat.color.chat_nick_colors "cyan,magenta,green,brown,lightblue,default,lightcyan,lightmagenta,lightgreen,blue,31,35,38,40,49,63,70,80,92,99,112,126,130,138,142,148,160,162,167,169,174,176,178,184,186,210,212,215,247"
/set weechat.look.prefix_align_max 12
/set weechat.look.prefix_align_max 12


/alias del AAWAY
/alias del ANICK
/alias del BEEP
/alias del BYE
/alias del C
/alias del CHAT
/alias del CL
/alias del CLOSE
/alias del EXIT
/alias del IG
/alias del J
/alias del K
/alias del KB
/alias del LEAVE
/alias del M
/alias del MSGBUF
/alias del MUB
/alias del N
/alias del Q
/alias del REDRAW
/alias del SAY
/alias del SIGNOFF
/alias del T
/alias del UB
/alias del UMODE
/alias del V
/alias del W

/alias add wc buffer close
/alias add call buffer clear -all
/alias add w buffer

Key bind

/key bind meta-, /window scroll_up
/key bind meta-- /window scroll_down
/key bind meta-t /bar toggle nicklist          # Toggle nicklist bar
#/key bind meta-g /buffer #gentoo              # Jump to #gentoo IRC channel
/key reset meta-r                              # Restore default binding for key alt-r
/key bindctxt search ctrl-I /input search_stop # Key "tab" to stop search in buffer
/key bind ctrl-L /buffer clear -all            # Clear all buffers
/key bind ctrl-c /buffer close                 # Close current buffer


/key unbind ctrl-L

Glowing Bear

mkdir -p ~/.weechat/ssl
cat /etc/letsencrypt/live/{fullchain,privkey}.pem > ~/.weechat/ssl/relay.pem
chown -R wuseman:wuseman ~/.weechat/ssl/


/relay sslcertkey
/relay add weechat 9002
/relay add ssl.weechat 9001
/set <password>
/set relay.irc.backlog_time_format "[%H:%M:%S]"
/set off
/set 2

Smart Filter

/set irc.look.smart_filter on
/filter add irc_smart * irc_smart_filter *
/set irc.look.smart_filter_delay 5