Skip to content

Instantly share code, notes, and snippets.

@analyticd
Forked from pascalpoitras/config.md
Created March 26, 2020 00:06
Show Gist options
  • Save analyticd/d7ea7ea69fef827c3deaefbb1376d833 to your computer and use it in GitHub Desktop.
Save analyticd/d7ea7ea69fef827c3deaefbb1376d833 to your computer and use it in GitHub Desktop.
My always up-to-date WeeChat configuration (weechat-dev)

WeeChat Screenshot

You need at least WeeChat 2.8-dev

Enable mouse

/mouse enable

Secured data

/secure passphrase <pass>
/secure set freenodepass <pass>
/secure set snoonetpass <pass>
/secure set undernet_userpass <user> <pass>
/secure set undernet_secret <TOTP secret>
/secure set relaypass <pass>
/secure set mariechannel <friend's channel name>

Network

Default settings

/set irc.server_default.sasl_mechanism PLAIN
/set irc.server_default.sasl_username r3m
/set irc.server_default.nicks r3m
/set irc.server_default.capabilities "account-notify,away-notify,cap-notify,multi-prefix,server-time,znc.in/self-message"

the last line request some IRCv3 capabilities. Capabilities supported by WeeChat are: account-notify, away-notify, cap-notify, extended-join, multi-prefix, server-time, userhost-in-names. See IRCv3 Specifications to learn more about IRCv3 capabilities.

Network-specific settings

/server add freenode chat.freenode.net/6697 -ssl -autoconnect
/set irc.server.freenode.sasl_password ${sec.data.freenodepass}

/server add oftc irc.oftc.net/6697 -ssl -autoconnect
/set irc.server.oftc.ssl_cert "%h/certs/nick.pem"
/set irc.server.oftc.command_delay 5

/server add snoonet irc.snoonet.org/6697 -ssl -autoconnect
/set irc.server.snoonet.sasl_password ${sec.data.snoonetpass}

/server add tilde irc.tilde.chat/6697 -ssl -autoconnect
/set irc.server.tilde.sasl_password ${sec.data.tildepass}

/server add undernet ix.undernet.org
/set irc.server.undernet.command "/eval /mute /msg x@channels.undernet.org login ${sec.data.undernet_userpass} ${info:totp_generate,${sec.data.undernet_secret}};/quote silence *!*@*,~*!*@*.users.undernet.org"  

/connect -auto

The command option for the undernet network identify myself to X automatically upon connection using 2FA. WeeChat 2.4 and later versions have a TOTP generator. The silence command is a server-side ignore and will ignore everyone excepts identified users (even if the user is not +x).

Plugins

Load at startup

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

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

spell

/set spell.check.default_dict en,fr
/set spell.check.suggestions 3
/set spell.color.suggestion *green
/spell enable

Set the dictionary order to fr,en

/trigger add setdict signal irc_channel_opened;irc_pv_opened;irc_server_opened
/trigger set setdict conditions "(${buffer[${tg_signal_data}].full_name} =* irc.undernet.* || (${buffer[${tg_signal_data}].full_name} =~ fr$ && ${buffer[${tg_signal_data}].local_variables.type} == channel)) && ${info:spell_dict,${buffer[${tg_signal_data}].full_name}} !~ ^fr"
/trigger set setdict command "/command -buffer ${buffer[${tg_signal_data}].full_name} * /mute /spell setdict fr,en"

This trigger set spell checker to fr,en when we join a channel with a name ending in 'fr' or when we join any channel or open any query on undernet.

Note: we will add the spell_dict and spell_suggest item to the status bar later on.

Relay

/relay sslcertkey
/relay add ssl.irc <port>
/relay add ssl.weechat <port>
/set relay.network.password ${sec.data.relaypass}

If you want a trusted certificate, use let's encrypt! with weechat relay.

Logger

/set logger.level.irc 4
/set logger.mask.irc %Y/$server/$channel.%m-%d.log

fset

/set fset.color.line_selected_bg1 default
/set fset.color.name_changed 229
/set fset.color.name_changed_selected *229
/set fset.color.type 121
/set fset.color.type_selected *121
/set fset.color.value 31
/set fset.color.value_changed 229
/set fset.color.value_changed_selected *229
/set fset.color.value_selected *31
/set fset.format.option1 "${if:${selected_line}?${color:*white}>>:  } ${marked} ${name}  ${type}  ${value2}"
/set weechat.bar.fset.conditions "${buffer.full_name} == fset.fset && ${window.win_height} > 7"

After plugins and exec now

/set weechat.startup.command_after_plugins "/exec -norc -noln -buffer conky conky;/buffer add chanmon;/buffer add highmon"
/eval /eval -s ${weechat.startup.command_after_plugins}

Scripts

/script install autojoinem.py buffer_autoset.py autosort.py grep.py text_item.py

autosort.py (require setdict trigger)

/autosort helpers set french_channels_pvs_first ${if:${type}=~(channel|private)&&${info:spell_dict,${buffer.full_name}}!~^fr}
/autosort rules insert 6 ${french_channels_pvs_first}

/trigger add autosort_refresh_on_setdict config "spell.dict.*;spell.check.default_dict" "" "" "/mute autosort"

sort french channels before other channels. A french channel, in my configuration, is one with a french dictionnary as main dictionnary. This autosort rule sort channels using the main dictionnary. So you also need the trigger setdict which set the dictionnary based on channel's name (channels ending in fr). This also sort french private before other private. A french private, in my configuration, is one with a french dictionnary as main dictionnary. However, the setdict trigger do not set the french dictionnary when a private name end in fr (cause this does not make sense for private). So the only way to set a private as french is to type /spell setdict fr on a private. And if you type this command (on a private or on a channel, for example one not ending in fr) you will need the autosort_refresh_on_setdict trigger to resort the buffers.

buffer_autoset.py

/buffer_autoset add core.weechat notify 3
/buffer_autoset add irc.server.* notify 3
/buffer_autoset add relay.relay.list short_name relay
/buffer_autoset add irc.freenode.##news short_name newsmon

text_item.py

/set plugins.var.python.text_item.window_is_active all|window_switch ${if:${window[gui_current_window]} == ${window}?ACTIVE}

Conky

/buffer_autoset add exec.exec.conky short_name sys

notify level

/set weechat.notify.exec.exec.conky none

change the title of the conky buffer

/buffer_autoset add exec.exec.conky title Conky - the light-weight system monitor

Change the title Executed commands to Conky - the light-weight system monitor

beautify the output

/set plugins.var.conky_fields_to_display_csv Uptime,CPU,RAM,Swap,Up,Down

/trigger add conky modifier weechat_print
/trigger set conky conditions "${tg_buffer} == exec.exec.conky && ${tg_tags} =~ ,exec_stdout, && ${tg_message_nocolor} =~ ^[^:]+: *[^ ]"
/trigger set conky regex "/^ \t([^:]+):(.*)/${if:${plugins.var.conky_fields_to_display_csv}=~(^|,)${re:1}(,|$)? ${color:_31}${re:1}\t${color:reset}${re:2}}/ /.*/${tg_message_nocolor}/my_field /.*/${tg_message_nocolor}/my_value /^([^:]+):.*/${re:1}/my_field /^[^:]+: */${re:1}/my_value"

This trigger change the output of conky. It puts the field (cpu, ram...) as the prefix and the value as the message for field that appears in the option plugins.var.conky_fields_to_display_csv. Fields that are not in this option will be hidden.

my .conkyrc

background no
cpu_avg_samples 2
net_avg_samples 2
no_buffers yes
out_to_stderr no
update_interval 1.0
uppercase no
use_spacer none

TEXT
Uptime: $uptime
CPU: $cpu%
RAM: $memperc%
Swap: $swapperc%
Up: ${upspeed venet0}
Down: ${downspeed venet0}

Note: you need the conky-cli package on Debian

Weather with wttr.in (require utils_escape trigger)

/buffer_autoset add exec.exec.weather short_name weather
/set spell.dict.exec.exec.weather fr

/trigger add weather_cmd_weather command "weather;show the weather, using wttr.in, in a new buffer;<location>;;longueuil|montreal|quebec|paris|new+york"
/trigger set weather_cmd_weather conditions "${tg_argv_eol1}"
/trigger set weather_cmd_weather regex "/ /+/tg_argv_eol1 /.*/${info:spell_dict,exec.exec.weather}/my_lang /^([^,]+).*/${re:1}/my_lang /^$/en/my_lang"
/trigger set weather_cmd_weather command "/exec -noflush -norc -noln -buffer weather curl -s http://wttr.in/${tg_argv_eol1}?lang=${my_lang}"

I found something very similar on the alias wiki page of WeeChat on GitHub. It will open a new buffer and display the weather inside using wttr.in. I created a trigger instead so it allow me to replace space in city name with a +. As you can see on the first trigger line, I set the completion for the command to longueuil|montreal|quebec|paris|new+york. Change this to fit your needs. It will allow you to /weather <tab> for place you frequently want to see the weather. However, if the city contain a space, you must put a + instead (only in the completion, if you type /weather new york manually, the space will be replaced by a + automatically.

/trigger add weather_set_weather_buffer_title print "exec.exec.weather;exec_stdout;;1"
/trigger set weather_set_weather_buffer_title conditions "${tg_message} =~ ^\w && ${tg_message} !~ wttr\.in|@igor_chubin"
/trigger set weather_set_weather_buffer_title regex "/^[^:]+:(.*)/${re:1}/tg_message_nocolor"
/trigger set weather_set_weather_buffer_title command "/buffer set title ${tg_message};/buffer set localvar_set_weather ${tg_message_nocolor}"

I created this trigger to change the title of the buffer from Executed commands to Weather for City: Montreal, Canada.

/trigger add weather_get_weather_by_shortcut modifier input_text_for_buffer
/trigger set weather_get_weather_by_shortcut conditions "${info:ruby_version} && ${modifier:escape,,'\test} == \'\\test && ${buffer[${tg_modifier_data}].full_name} == exec.exec.weather && ${info:ruby_eval,puts Weechat.string_is_command_char('${modifier:escape,,${tg_string_nocolor}}').to_s} == 0"
/trigger set weather_get_weather_by_shortcut regex "==.*==/weather ${re:0}"

This trigger will allow you to enter only the city name (without /weather) in the weather buffer.

Bars

Bar buflist, buflist_hotlist and control_buffers (need WeeChat >= 2.8)

unmerge servers buffers from core and indent

/set irc.look.server_buffer independent

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

/bar set buflist separator off
/bar set buflist priority 2
/bar set buflist size 15
/bar add buflist_hotlist root left 3 1 buflist2
/bar set buflist_hotlist priority 1
/bar add control_buffers window top 1 1 buflist3
/bar set control_buffers priority 499
/bar set control_buffers conditions ${window.number} == ${if:${plugins.var.control_buffers_window}?${plugins.var.control_buffers_window}:2}

create the buflist_hotlist bar with buflist2 for items. Create the control_buffers bar with buflist3 for items and display this bar only on the window with the same number as the number in the option plugins.var.control_buffers_window (or 2 if this options doesn't exist)

/set buflist.format.hotlist_highlight "${color:163}"
/set buflist.format.hotlist_message "${color:229}"
/set buflist.format.hotlist_private "${color:121}"

/set buflist.format.buffer "${if:${bar_item.name}==buflist?${format_name}:${if:${bar_item.name}==buflist2?${if:${type}==server?${color:31,31}} ${format_hotlist}:${if:${bar_item.name}==buflist3?${format_name}}}}"
/set buflist.format.buffer_current "${if:${bar_item.name}==buflist?${format_name}:${if:${bar_item.name}==buflist2?${if:${type}==server?${color:31,31}} :${if:${bar_item.name}==buflist3?${format_name}}}}"
/set buflist.format.number "${if:${current_buffer}?${if:${type}==server?${color:*white,31}:${color:*white}}${hide:>,${number}} :${if:${type}==server?${color:black,31}:${color:239}}${number}${if:${number_displayed}?.: }}"
/set buflist.format.indent "${if:${type}==channel&&${buffer.name}=~fr$||${info:spell_dict,${buffer.full_name}}=~^fr?${color:blue}f :  }"
/set buflist.format.name "${if:${bar_item.name}==buflist?${cutscr:+${weechat.bar.buflist.size},${if:${type}==server?${color:white}:${color:${weechat.color.chat_prefix_more}}}${weechat.look.prefix_align_more},${eval:${format_number}${indent}}${if:${type}==server?${color:white,31}${if:${plugins.var.buflist_real_net_name}!=&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK}:${name}}:${eval:${color_hotlist}}${name}}${color:31}${if:${buffer.local_variables.filter}? ${buffer.local_variables.filter}}${if:${buffer.full_name}==exec.exec.weather&&${buffer.local_variables.weather}? ${buffer.local_variables.weather}}${if:${buffer.full_name}==relay.relay.list&&${info:relay_client_count,*,connected}? Total${\x3A}${info:relay_client_count,*,connected} IRC${\x3A}${info:relay_client_count,irc,connected} WeeChat${\x3A}${info:relay_client_count,weechat,connected}}}:${if:${bar_item.name}==buflist3?${if:${window.buffer.full_name}==${buffer.full_name}?${color:31}${\ue0be}${color:white,31} ${cutscr:7,${\u2026},${name}} ${color:reset}${color:31}${\ue0bc}:${color:24}${\ue0be}${color:darkgray,24} ${cutscr:7,${\u2026},${name}} ${color:reset}${color:24}${\ue0bc}}}}"
/set buflist.format.hotlist "${if:${lengthscr: ${hotlist}} > ${weechat.bar.buflist_hotlist.size}?${cutscr:+${calc:${weechat.bar.buflist_hotlist.size} - 1},${if:${type}==server?${color:white}:${color:${weechat.color.chat_prefix_more}}}${weechat.look.prefix_align_more},${hotlist}}:${repeat:${calc:${weechat.bar.buflist_hotlist.size} - ${lengthscr: ${hotlist}}}, }${hotlist}}"

This was the format options which changed the look of each buflist items

/set buflist.look.signals_refresh "irc_server_connected,relay_client_connected,relay_client_disconnected"

Add additionnals signals to refresh the buflist

/set buflist.look.display_conditions "${buffer.hidden}==0 && ${if:${bar_item.name}=~^(buflist|buflist2)$?${if:${type}=~^(channel|private)$&&${buffer[${info:irc_buffer,${irc_server.name}}].local_variables.fold}==1?0:1}:${if:${bar_item.name}==buflist3&&${buffer.local_variables.control_buffer}}}"

The conditions to display a buffer in the buflist items.

/trigger add buflist_scroll_buflist command_run "/bar scroll buflist*"
/trigger set buflist_scroll_buflist regex "/.*/${tg_command}/my_arguments /.* ([^ ]+)$/${re:1}/my_arguments"
/trigger set buflist_scroll_buflist command "/bar scroll buflist * ${my_arguments};/bar scroll buflist_hotlist * ${my_arguments}"
/trigger set buflist_scroll_buflist return_code "ok_eat"

when we scroll buflist, weechat scroll buflist_hotlist by the same amount and vice versa

/trigger add buflist_refresh_options config "weechat.bar.buflist.size*;weechat.bar.buflist_hotlist.size*;plugins.var.buflist_real_net_name"
/trigger set buflist_refresh_options command "/buflist refresh"

when the buflist and buflist_hotlist bar are resized, the buflist is refresh. Same when we change the value of plugins.var.buflist_real_net_name option

/trigger add control_buffers_change_control_window config "plugins.var.control_buffers_window"
/trigger set control_buffers_change_control_window command "/window refresh"

Refresh window when options plugins.var.control_buffers_window is changed

/key bindctxt mouse @item(buflist)>bar(control_buffers):button1* hsignal:add_del_buffer
/key bindctxt mouse @item(buflist2)>bar(control_buffers):button1* hsignal:add_del_buffer
/key bindctxt mouse @chat(*)>bar(control_buffers):button1* hsignal:add_del_buffer
/key bindctxt mouse @bar(control_buffers)>chat(*):button1* /mute set plugins.var.control_buffers_window ${_window_number2}
/key bindctxt mouse @bar(buflist*):alt-wheel* /bar set ${_bar_name} size ${calc:${weechat.bar.${_bar_name}.size} ${if:${_key}=~up$?-:+} 1}
/key bindctxt mouse @item(buflist3):button1* /mute set plugins.var.control_buffers_previous_active_window ${window.number};/window ${_window_number};hsignal:buflist_mouse;/window ${plugins.var.control_buffers_previous_active_window}
/key bindctxt cursor @item(buflist*):c hsignal:add_del_buffer;/cursor stop
/key bindctxt cursor @item(buflist*):f /command -buffer irc.server.${localvar_server} * /eval /buffer set localvar_set_fold \${if:\${buffer.local_variables.fold}?0:1};/cursor stop
/key bindctxt cursor @item(buflist*):r /server raw c:\${${if:${localvar_type}==server?server:channel}}==${localvar_channel};/cursor stop
/key bindctxt cursor @item(buflist*):o /fset c:\${name}=*buffer_autoset.buffer.${full_name}.* ${if:${localvar_type}==server?|| \${name${\x7D}=*${full_name}.*};/cursor stop

/trigger add control_buffers_add_del_buffer hsignal add_del_buffer
/trigger set control_buffers_add_del_buffer regex "/.*/${if:${_chat}?${_buffer_full_name}:${full_name}}/my_full_name"
/trigger set control_buffers_add_del_buffer command "/mute buffer_autoset ${if:${buffer_autoset.buffer.${my_full_name}.localvar_set_control_buffer}?del ${my_full_name}.localvar_set_control_buffer:add ${my_full_name} localvar_set_control_buffer 1};/command -buffer ${my_full_name} * /buffer set localvar_set_control_buffer ${if:${buffer_autoset.buffer.${my_full_name}.localvar_set_control_buffer}?1:0}"

The two first binds allow drag and drop from buflist and buflist2 items (in bar buflist and buflist_hotlist) to the bar control_buffers. This will add or del the buffer to the control_buffers bar. The third bind allow drag and drop from a chat area to the control_buffers bar. This will add or del the buffer to the control_buffers bar. The fourth bind allow drag and drop from the control_buffers bar to a chat area. This will move the control_buffers bar to another window. The fifth bind allow you to resize the buflist and buflist_hotlist bar by pressing alt and using the wheel at the same time. The sixth bind will switch to the control window and display the buffer you clicked on and then switch back to the previous window. The seventh bind allow you to press 'c' in cursor mode on any buflist items to add or del the buffer to the control_buffers bar. The eighth bind will hide the channels and private buffer of a network. The ninth bind will show server raw messages for server/channel/private depending on the buffer. The last bind will show options, in fset, related to the buffer.

/set plugins.var.control_buffers_window 2
/set plugins.var.buflist_real_net_name 1

/buffer_autoset add core.weechat localvar_set_control_buffer 1
/buffer_autoset add core.highmon localvar_set_control_buffer 1
/buffer_autoset add core.chanmon localvar_set_control_buffer 1
/buffer_autoset add irc.freenode.##news localvar_set_control_buffer 1

set window number 2 as the control window (the window with the control_buffers bar). Add core.weechat, core.highmon, core.chanmon and irc.freenode.##news in the control_buffers bar. Display real network name instead of the one you choose with /server add.

Bar titlenosep

/bar del title
/bar add titlenosep window top 1 0 [#window_number],[window_is_active],buffer_title
/bar set titlenosep priority 500
/bar set titlenosep conditions ${window.number} == ${if:${plugins.var.control_buffers_window}?${plugins.var.control_buffers_window}:2}
/bar set titlenosep color_fg white
/bar set titlenosep color_bg 31

A window bar to display the title, with no separator. Used on the window with the number corresponding to the option plugins.var.control_buffers_window

Bar titlesep

/bar add titlesep window top 1 1 [#window_number],[window_is_active],buffer_title
/bar set titlesep priority 500
/bar set titlesep conditions ${window.number} != ${if:${plugins.var.control_buffers_window}?${plugins.var.control_buffers_window}:2}
/bar set titlesep color_fg white
/bar set titlesep color_bg 31

A window bar to display the title with a separator. All window except the one with a number corresponding to the option plugins.var.control_buffers_window.

Bar status

/bar add rootstatus root bottom 1 1 [time],[buffer_count],[buffer_plugin],buffer_number+:+buffer_name+(buffer_modes)+{buffer_nicklist_count}+buffer_filter,[bitlbee_typing_notice],[lag],[spell_dict],[spell_suggest],completion,scroll
/bar set rootstatus color_fg 31
/bar set rootstatus color_bg 234
/bar set rootstatus priority 500
/bar del status
/bar set rootstatus name status

Note: the built-in status bar is of type window. I prefer a status bar of type root which means it will be outside any window. At this time, you can't change the type of a bar. So we delete the status bar and create a new one.

Bar input

/bar add rootinput root bottom 1 0 [buffer_name]+[input_prompt]+(away),[input_search],[input_paste],input_text
/bar set rootinput color_bg black
/bar set rootinput priority 1000
/bar del input
/bar set rootinput name input

Note: the built-in input bar is of type window. I prefer a input bar of type root which means it will be outside any window. At this time, you can't change the type of a bar. So we delete the status bar and create a new one.

Bar Nicklist

/bar set nicklist color_fg 229
/bar set nicklist separator 1
/bar set nicklist conditions ${nicklist} && ${window.number} == 1 && ${buffer.full_name} !~ ^irc.freenode.(#newsbin|##news)$
/bar set nicklist size_max 14
/bar set nicklist size 14

Note: I changed the conditions to display the nicklist only on buffer of type channels ${nicklist} and on the window number 1, which is my chat window (2 being my highlight window and 3 my conky window). In my case, I could remove ${window.numer} == 1 because the highmon and exec buffer (conky) are not of type channels so ${nicklist} is enough.

Bar line_number

/bar add line_number root left 5 1 line_number
/bar set line_number hidden on

/trigger add line_number_show_bar signal input_text_changed
/trigger set line_number_show_bar conditions "${buffer[${tg_signal_data}].input_buffer} == /cursor go${esc:\x20}"
/trigger set line_number_show_bar command "/bar show line_number;/wait 10s /bar hide line_number"

/set plugins.var.python.text_item.line_number all|signal_sigwinch ${eval:${info:ruby_eval,puts (0...${info:term_height}).to_a.join('\${\n${esc:\x7D}')}}

This is inspired from the excellent vimode.py script by GermainZ. A bar with line number will be show whenever you type /cursor go and will dissapears 5 seconds later (you need to put the x coordinates before the y one (line number). example: /cursor go x,<the line number>. Of course, if you use the vimode.py script, don't add this bar to your config it will be pretty useless.

Layouts

Layout highlight-or-news

/eval /window splith ${calc:9 / ${window[gui_current_window].win_height} * 100 // 1}
/buffer highmon
/window 1
/layout store highlight-or-news

Note: Instead of having only one window, we split it to create another one that we will use to show all highlights.

Layout highlight-or-news-and-conky

/window 2
/window splitv 85
/buffer exec.conky
/window 1
/layout store highlight-or-news-and-conky

Note: split the highlight monitor window in 2 and show conky in the new one

Channel Monitor

WeeChat Screenshot

/buffer_autoset add core.chanmon title Channels Monitor

/trigger add chanmon_like print "*;irc_privmsg"
/trigger set chanmon_like conditions "${buffer.local_variables.type} == channel && ${buffer.full_name} != irc.freenode.##news && ${server} != bitlbee"
/trigger set chanmon_like command "/print -newbuffer chanmon -tags ${tg_tags} ${cutscr:4,${color:${weechat.color.chat_prefix_more}}${weechat.look.prefix_buffer_align_more},${color:${info:nick_color_name,${server}}}${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 chanmon. This buffer will contain all the messages from all the channels you are on. This is almost identical to the scripts chanmon.pl but without any options.

Highlight Monitor

/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 "*;irc_privmsg"
/trigger set highmon_like conditions "${tg_highlight} == 1 && ${tg_displayed} == 1 && ${buffer.local_variables.type} == channel && ${buffer.full_name} != irc.bitlbee.&bitlbee"
/trigger set highmon_like command "/print -newbuffer highmon -tags ${tg_tags} ${cutscr:4,${color:${weechat.color.chat_prefix_more}}${weechat.look.prefix_buffer_align_more},${color:${info:nick_color_name,${server}}}${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 highmon.pl script but without any options.

News

WeeChat Screenshot

/filter add news irc.freenode.##news !host_yano@unaffiliated/yano/bot/rssly+!irc_privmsg *
/filter addreplace news_interest irc.freenode.##news nick_newsly*+irc_privmsg,host_yano@unaffiliated/yano/bot/rssly+irc_privmsg !^(\s|\[)(Reddit [-] /r/netsec|Wired|freenode|EFF Updates|erry's blog|techdirt|TorrentFreak|Science Daily|Hacker News|CNET|phoronix|Ars Technica|The Intercept|france24|Radio-Canada Nouvelles|Canoe|Huffington Post [-] Weird News|Journal du hacker|Futura Sciences)( \-| | |\])

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

The following triggers use the new hook_line. You must be using weechat 2.3. Otherwise, looks in the revisions to take the other version.

/trigger add news_transform line *;irc.freenode.##news;irc_privmsg+nick_newsly*
/trigger set news_transform regex "/.*/${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 /\+/%00/url /,/%01/url /\!/%02/url /\*/%03/url /.*/${re:0}url_${url}/tags ==https?://[^ ]+ .*====title /.*/[${color:${site_color}}${site_name}${color:reset}] ${title}/message /.*//prefix"

the normal version.

/trigger add news_transform line *;irc.freenode.##news;irc_privmsg+nick_newsly*
/trigger set news_transform regex "/.*/${tg_message_nocolor}/site_name /^\[([^]]+)\].*/${re:1}/site_name /.*/${tg_message_nocolor}/title /^\[[^]]+\]//title / - / ${color:-underline} /site_name /.*/${site_name}/site_color /^([^]+).*/${info:nick_color_name,${re:1}}/site_color /.*/${title}/url ==.*(https?://[^ ]+).*==${re:1}==url /\+/%00/url /,/%01/url /\!/%02/url /\*/%03/url /.*/${re:0}url_${url}/tags ==https?://[^ ]+ .*====title /.*/${color:_black,${site_color}} ${site_name} ${color:${site_color},default}${color:reset}${title}/message /.*//prefix"

the one with powerline symbols.

These triggers will do a few things. The URL will be removed from the message and inserted, as a tag, in the tags instead. This is very useful because url are often very long. The date will also be removed from the message for similar reason. The difference between the two triggers above are the way they display the site name (refers to the screenshot above).

Note: The url and the date will not appears in log. This is a consequence of using a modifier or a line trigger.

/trigger add news_click hsignal news_click
/trigger set news_click regex "/.*,url_([^,]+).*/${re:1}/_chat_line_tags /%00/+/_chat_line_tags /%01/,/_chat_line_tags /%02/!/_chat_line_tags /%03/*/_chat_line_tags"
/trigger set news_click command "/command -buffer ${buffer.full_name} core /input insert ${if:${_key}==m?${_chat_line_message} }${_chat_line_tags}\x20"

/key bindctxt cursor @chat(irc.freenode.##news):i hsignal:news_click;/cursor stop
/key bindctxt cursor @chat(irc.freenode.##news):m hsignal:news_click;/cursor stop

/buffer_autoset add irc.freenode.##news highlight_words_del $nick

This trigger will be triggered when we press 'i' or 'm' on a news in cursor mode (in general we invoke this with the middle mouse button). 'i' insert the URL in the input bar. If the URL is too long to view it all, simply press return to send it to the channel, which anyway is +m so nobody will see it, and press alt+l to go in bare mode (so you can click on the URL). 'm' is more interesting, generally when you press 'm' in cursor mode, you add the message in the input bar, but remember, the message does not contain the URL anymore, so it is useless to send the title to someone without the URL. So, in this channel, 'm' is different. The URL is added back to the message.

If you wonder why I replace +,*,! and comma from the url, it is because those have a special meaning in the tag mechanism or in /filter and it will be hard to, for example, filter on a tag containing a comma. I replace them by ASCII control characters in percent-encoding style. At first, I was replacing them by their equivalent percent-encoding style so for example + became %2B. The problem is that we must replace %2B by + when we retrieve the url from the tag later, because a + have a special meaning in url but not %2B (so this will not be the same url). But this will replace any %2B to +, even those that was originally %2B not +. So, instead, I use the first four ASCII control characters (in uri escape form) for +,*,! and comma. Therefore, this will replace + by %00 , by %01 ! by %02 and * by %03, then when you press 'i' in cursor mode, the %00 will become +, %01 will become , and so on. The last line disable highlight for your nick on this channel.

nullpointer (https://0x0.st)

WeeChat Screenshot

/alias add nullpointer /exec -sh -hsignal nullpointer $* 2>&1 | curl -sfSF file=@- https://0x0.st
/trigger add nullpointer hsignal nullpointer
/trigger set nullpointer regex "/\n//out"
/trigger set nullpointer command "/command -buffer ${buffer.full_name} core /input delete_line;/command -buffer ${buffer.full_name} core /input insert ${out}"

This allow you to type /nullpointer uptime for example, to send the output of the uptime command to 0x0.st. Your input bar content will be replaced by the url of the paste. This way you can visit the URL to see if there is sensitive information before giving the url to everyone. You may wonder why I didn't used something like: _/exec -sh -pipe "/input delete_line;/input insert " $* 2>&1 | curl -sF c=@- https://0x0.st Well If we use this, the input bar will be filled with the command and not the url.

Dev info

WeeChat Screenshot

/trigger add devinfo hsignal devinfo
/trigger set devinfo conditions ${err}==
/trigger set devinfo regex "/([0-9]{4})-01-([0-9]{2})/January ${re:2} ${re:1}/out /([0-9]{4})-02-([0-9]{2})/February ${re:2} ${re:1}/out /([0-9]{4})-03-([0-9]{2})/March ${re:2} ${re:1}/out /([0-9]{4})-04-([0-9]{2})/April ${re:2} ${re:1}/out /([0-9]{4})-05-([0-9]{2})/May ${re:2} ${re:1}/out /([0-9]{4})-06-([0-9]{2})/June ${re:2} ${re:1}/out /([0-9]{4})-07-([0-9]{2})/July ${re:2} ${re:1}/out /([0-9]{4})-08-([0-9]{2})/August ${re:2} ${re:1}/out /([0-9]{4})-09-([0-9]{2})/September ${re:2} ${re:1}/out /([0-9]{4})-10-([0-9]{2})/October ${re:2} ${re:1}/out /([0-9]{4})-11-([0-9]{2})/November ${re:2} ${re:1}/out /([0-9]{4})-12-([0-9]{2})/December ${re:2} ${re:1}/out /.*/\n${out}/out /.*/${out}/stable /.*/${out}/stable_date /.*/${out}/devel /.*/${out}/next_stable_date /.*\nstable:([^\n]+).*/The stable version of WeeChat is ${re:1}./stable /.*\nstable_date:([^\n]+).*/It is the stable version since ${re:1}${info:ruby_eval,require 'date'; print ' (' + (Date.today.mjd - Date.parse('${re:1}').mjd).to_s + ' days)'}./stable_date /.*\ndevel:([^\n]+).*/The devel version of WeeChat is ${re:1}./devel /.*\nnext_stable_date:([^\n]+).*/The next stable should be release around ${re:1}${info:ruby_eval,require 'date'; print ' (' + (Date.parse('${re:1}').mjd - Date.today.mjd).to_s + ' days)'}./next_stable_date"
/trigger set devinfo command "/command -buffer ${buffer.full_name} * /say ${stable} ${stable_date} ${devel} ${next_stable_date}"

/alias add devinfo /exec -norc -timeout 5 -hsignal devinfo url:https://weechat.org/dev/info/all/    

Thi alias send info about the current stable version of WeeChat and the next stable to the channel. The alias call exec and the output of exec is send as a hsignal. So the trigger handle the output.

translate with translate-shell (need the utils_escape_shell_single_quote trigger)

WeeChat Screenshot

/buffer_autoset add exec.exec.translated_dict short_name dictionary

/trigger add translate modifier weechat_print
/trigger set translate conditions "${tg_tags} =~ ,exec_cmd_translated_(text|lang),"
/trigger set translate regex "/.*/${color:*_31}${if:${tg_tags}=~,exec_cmd_translated_text,?Translation:Language}${color:reset}\t${tg_message_nocolor}/"

/key bindctxt cursor @chat(*):t /window ${_window_number};/command -buffer ${_buffer_full_name} * /exec -norc -name translated_text trans -brief -target ${if:${info:spell_dict,${_buffer_full_name}}!~^fr?fr:en} -no-auto '${modifier:escape_shell_single_quote,,${_chat_line_message}}';/cursor stop
/key bindctxt cursor @chat(*):l /window ${_window_number};/command -buffer ${_buffer_full_name} * /exec -norc -name translated_lang trans -brief -no-auto -id '${modifier:escape_shell_single_quote,,${_chat_line_message}}';/cursor stop
/key bindctxt cursor @chat(*):d /window ${_window_number};/command -buffer ${_buffer_full_name} * /exec -norc -name translated_dict -n trans -dictionary -no-auto '${modifier:escape_shell_single_quote,,${_chat_word}}';/cursor stop

This let you translate text with the translate-shell program (package has the same name, at least for Debian). If you want to translate something someone said, press the middle mouse button on the message then press 't'. If you want to know the language of the text, press 'l' instead. Finally, you can press 'd' this will open a buffer and call translate-shell in dictionary mode. The trigger will beautify the output of translate-shell.

Highlight

/set weechat.look.highlight *pascalpoitras*
/buffer_autoset add irc.bitlbee.#twitter_pascalpoitras* highlight_words freenode,snoonet,*weechat*
/buffer_autoset add irc.bitlbee.#LET highlight_regex .*
/buffer_autoset add irc.bitlbee.#deals highlight_regex .*
/buffer_autoset add irc.freenode.##reddit-hockey highlight_regex (^GOAL: MTL.*|^Le But: MTL.*)

Triggers

Upgrade Scripts

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

This trigger will update the local script cache and then upgrade all the installed scripts at midnight.

Friend Birthday

/trigger add day_changed_friend_birthday signal day_changed
/trigger set day_changed_friend_birthday conditions "${sec.data.mariechannel} && ${tg_signal_data} =~ 03-22$"
/trigger set day_changed_friend_birthday command "/msg -server freenode ${sec.data.mariechannel} BONNNE FÊTEEEE!!! BON ${calc:${date:%Y} - 1984}ieme anniversaire!!!"

This trigger will be triggered the March 22 of each years at midnight to tell my friend "happy birthday"

Holiday Friend

/trigger add day_changed_holiday_friend signal day_changed
/trigger set day_changed_holiday_friend conditions "${sec.data.mariechannel} && ${info:holiday,${date:%d-%m}}"
/trigger set day_changed_holiday_friend command "/msg -server freenode ${sec.data.mariechannel} ${info:holiday,${date:%d-%m}}"

This trigger will check if today is a holiday (using the utils_holiday trigger so you need to add it. You can find it in the next section.) if so, I will tell my friend Merry Christmas, or Happy new year (so she can't be angry).

Nick Validation

WeeChat Screenshot

/trigger add modifier_is_nick_valid modifier input_text_display 
/trigger set modifier_is_nick_valid conditions "${tg_string_nocolor} =~ ^/nick .+ && ${buffer.plugin.name} == irc"
/trigger set modifier_is_nick_valid regex "==^/nick (.+)==${re:1}==tg_string_nocolor ===/nick (.+)===/nick ${if:${info:irc_is_nick,${tg_string_nocolor}}&&${cutscr:${info:irc_server_isupport_value,${server},NICKLEN},,${tg_string_nocolor}}==${tg_string_nocolor}?${color:*green}:${color:*red}}${re:1}      -- NICKLEN:${color:-bold} ${calc:${info:irc_server_isupport_value,${server},NICKLEN} - (${buffer.input_buffer_length} - 6)} / ${info:irc_server_isupport_value,${server},NICKLEN}  ${color:bold}Allowed Chars: ${color:-bold}a-zA-Z0-9_-\[]{}^`|===tg_string"

This trigger will give you hint about max nickname length and available character in nickname and will also tell you if the nick is valid (green) or not (red). Note that it doesn't works with -all option of the /nick command.

No notify for duck hunt commands

/trigger add no_notify_duck_command line *;irc.*;irc_privmsg
/trigger set no_notify_duck_command conditions "${tg_message_nocolor} =~ ^[!,.](bef|bang|reload|shop|duckstats|friends|killers)(\s|$) && ${buffer.local_variables.type} == channel"
/trigger set no_notify_duck_command regex "/.*/-1/notify_level"

Disable notify for duck hunt commands like bef, bang, reload and so on. This way I know there is nothing worth reading on a channel so I don't switch to that buffer.

escape

/trigger add utils_escape modifier escape
/trigger set utils_escape conditions "${tg_string}"
/trigger set utils_escape regex "==\\\\==\\\\== /'/\'/"

This modifier is used to escape single quote and backslash before giving a single quoted string to ruby. I prefer to reuse the regex in other trigger instead of using this modifier, this way the other trigger works even if you dont have this one. But sometimes I need to use this, for example in the buflist.

example: /eval -n ${info:ruby_eval,puts '${modifier:escape,,Hi' Everyone}'} will result in Hi' Everyone

escape shell single quote

/trigger add utils_escape_shell_single_quote modifier escape_shell_single_quote
/trigger set utils_escape_shell_single_quote conditions "${tg_string}"
/trigger set utils_escape_shell_single_quote regex "/'/'\''/"

if you use /exec with -sh and the option exec_command_shell is set to bash, escape sequence like \n will not be interpreted as a new line. This is what I want so I configured this option to bash (if you use my configuration you should do the same). In zsh, the \n will be interpreted as a new line in a single quoted string. By default the option is set to sh but on my system /bin/sh is a symbolic link to dash and dash behave like zsh. You need to keep this in mind! And don't forget, this only works for single quote string, if you want to use it in a double quote string you need to create another modifier or modify this one.

example: /eval /exec -norc -sh echo '${modifier:escape_shell_single_quote,,${plugins.var.text}}' | cowsay will display a cow saying the content of plugins.var.text option

replace

/trigger add utils_replace info replace
/trigger set utils_replace conditions "${info:ruby_version} >= 1.9 && ${tg_arguments} =~ ^[^]^-][^${cutscr:1,,${tg_arguments}}]+[${cutscr:1,,${tg_arguments}}][^${cutscr:1,,${tg_arguments}}]*[${cutscr:1,,${tg_arguments}}].+$"
/trigger set utils_replace regex "==\\\\==\\\\==tg_arguments /'/\'/tg_arguments /.*/${info:ruby_eval, arguments = '${tg_arguments}'.force_encoding("utf-8")[1..-1].split('${tg_arguments}'.force_encoding("utf-8")[0], 3); puts arguments[2].gsub(Regexp.new(arguments[0]), arguments[1])}/tg_info"

Replace any match (global) of the pattern (argument #1) to the replacement given by argument #2 in the string (argument #3)

example: /eval ${info:replace,,[aeiou],*,hello} will return h*ll*.

you can use a different delimiter (anything except ^ and ] and -) if your regex or the replacement contains a comma

example: /eval ${info:replace,#,##I like banana, apple and orange} will result in I like banana apple and orange (no comma)

And yes, you need the comma after replace (no matter the delimiter). So the syntax is ${info:replace,DELIMITERregexDELIMITERreplacementDELIMITERtext}

irc buffers stats

/trigger add utils_ircbufstats info ircbufstats
/trigger set utils_ircbufstats conditions "${tg_arguments} =~ ^(all|server|channel|private|query)$"
/trigger set utils_ircbufstats regex "/^query$/private/tg_arguments /.*/${info:ruby_eval, infolist = Weechat.infolist_get('buffer', '', ''); buffers_stats = Hash.new do |hash,key| hash[key] = 0 end; while Weechat.infolist_next(infolist) != 0 do buffer_ptr = Weechat.infolist_pointer(infolist, 'pointer'); buffers_stats[Weechat.buffer_get_string(buffer_ptr, 'localvar_type')] += 1 if Weechat.infolist_string(infolist, 'plugin_name') == 'irc' end if infolist != 0; Weechat.infolist_free(infolist); puts '${tg_arguments}' == 'all' ? [buffers_stats['server'], buffers_stats['channel'], buffers_stats['private']].join(' ') : buffers_stats['${tg_arguments}'].to_s}/tg_info"

example: /eval -n I am on ${info:ircbufstats,server} networks and ${info:ircbufstats,channel} channels with ${info:ircbufstats,private} queries will result in I am on 3 networks and 17 channels with 1 queries

example: same but faster (need the replace trigger) /eval -n ${info:replace,,([0-9]+) ([0-9]+) ([0-9]+),I am on \1 networks and \2 channels with \3 queries,${info:ircbufstats,all}}

holiday

/trigger add utils_holiday info holiday
/trigger set utils_holiday conditions "${tg_arguments} =~ ^(0[1-9]|[1-2][0-9]|3[0-1])-(0[1-9]|1[0-2])$"
/trigger set utils_holiday regex "/.*/${tg_arguments}/ /01-01/HAPPY NEW YEAR!/ /25-12/MERRY CHRISTMAS!/ /[0-9][0-9]-[0-9][0-9]//"

this info is useful for the weechat.look.day_change_message_1_date and _2dates. See these options at the bottom of my configuration. This trigger is also used from the day_changed_holiday_friend trigger.

example: /eval ${if:${info:holiday,${date:%d-%m}}?Yes! today is a holiday \o/ -- ${info:holiday,${date:%d-%m}} all!:Go to work!} will result in Yes! today is a holiday -- MERRY CHRISTMAS! all! if, of course we are December 25!

Keys

/key bindctxt cursor @item(buffer_nicklist):v /window ${_window_number};/voice ${nick}
/key bindctxt cursor @item(buffer_nicklist):o /window ${_window_number};/op ${nick}
/key bindctxt cursor @item(buffer_nicklist):V /window ${_window_number};/devoice ${nick}
/key bindctxt cursor @item(buffer_nicklist):O /window ${_window_number};/deop ${nick}
/key bindctxt cursor @chat(*):s /window ${_window_number};/slap ${_chat_line_nick};/cursor stop
/key bindctxt cursor @item(buffer_nicklist):s /window ${_window_number};/slap ${nick};/cursor stop
/key bindctxt cursor @chat(*):g /window ${_window_number};/customgrep ${_chat_line_nick};/cursor stop
/key bindctxt cursor @item(buffer_nicklist):g /window ${_window_number};/customgrep ${nick};/cursor stop

/key bindctxt cursor @chat(*):a /command -buffer ${buffer.full_name} core /input insert ${_chat_bol}\x20;/cursor stop
/key bindctxt cursor @chat(*):e /command -buffer ${buffer.full_name} core /input insert ${_chat_eol}\x20;/cursor stop
/key bindctxt cursor @chat(*):w /command -buffer ${buffer.full_name} core /input insert ${_chat_word}\x20;/cursor stop

Others Keyboard shortcuts

/key bind meta-meta2-A /bar scroll nicklist * -100%
/key bind meta-meta2-B /bar scroll nicklist * +100%
/key bind meta2-A /input history_global_previous
/key bind meta2-B /input history_global_next

Alias

/alias add ame allchan -current /me
/alias add amsg allchan -current /msg *
/alias add cq allpv /buffer close
/alias add slap /me slaps $1- around a bit with a large trout
/alias add customgrep /input delete_line;/input insert /grep log */$server/$channel.* -a ^\[\d{2}:\d{2}:\d{2}\] <%{escape $1}>\x20
/alias add znc /quote znc
/alias add fu /say (╹◡╹)凸 $*
/alias addcompletion %(weechat_commands) multicomm /alias add temp $*;/temp
/alias add funnyversion /eval ${if:$*==?${info:ruby_eval,print %W[mIRC irssi KVIrc HexChat AdiIRC BitchX].sample}:$*} ${info:version} (git: ${info:version_git}) [compiled on ${info:date}]
/alias add savechan /allserv mute unset irc.server.$server.autojoin;/allchan mute autojoinem add;/mute unset irc.server.undernet.autojoin
/alias add change-color /fset c:${type_en} == color && ${value} == $1;/command -buffer fset.fset core /input send m:*;/fset -add -$1;/fset -add $2    

The multicomm alias is an alternative to /eval -s, but more "secure". If you use eval -s for this purpose (execute more than one command) but you forget that thing like secure variables will be evaluate this can be very bad. The change-color alias allow you to change all colors options corresponding to a certain value with another one.

The savechan alias will first remove every channels in the autojoin option (because I dont want to keep the channels that I'm not there anymore) then it add all the channels but then unset the option for undernet because I dont want to join any channel on this network (No I can't combine allserv and allchan and exclude undernet). Also note that I used allserv unset instead of unset -mask: because I don't want to remove the channels of servers I am not currently connected to.

Filters

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

Custom join color

/set weechat.color.chat_prefix_join 121
/set weechat.color.chat_host 31
/set irc.color.message_join 121

The weechat.color.chat_host option will also set this color for part and quit. To have a different color, for example, a host in red for parts and quits and green for joins, see this.

Custom part and quit

/set weechat.color.chat_prefix_quit 131
/set irc.color.message_quit 131

exec options

/set exec.command.shell bash

The remaining IRC options

/set irc.server_default.away_check 5
/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 irc.network.ban_mask_default "*!*@$host"
/set irc.look.buffer_switch_autojoin off
/set irc.look.buffer_switch_join off
/set irc.look.color_nicks_in_nicklist on
/set irc.look.part_closes_buffer on

The remaining Weechat options

/set weechat.look.bar_more_down ""
/set weechat.look.bar_more_up ""
/set weechat.look.bar_more_left "◀"
/set weechat.look.bar_more_right "▶"
/set weechat.look.buffer_notify_default message
/set weechat.look.buffer_time_format "${color:245}%H${color:253}%M"
/set weechat.look.color_inactive_message off
/set weechat.look.color_inactive_prefix off
/set weechat.look.color_inactive_prefix_buffer off
/set weechat.look.color_inactive_window off
/set weechat.look.day_change_message_1date "▬▬▶ ${if:${info:holiday,%d-%m}?${info:holiday,%d-%m}:%a, %d %b %Y} ◀▬▬"
/set weechat.look.day_change_message_2dates "▬▬▶ ${if:${info:holiday,%%d-%%m}?${info:holiday,%%d-%%m}:%%a, %%d %%b %%Y} (%a, %d %b %Y) ◀▬▬"
/set weechat.look.hotlist_add_conditions "${away} || ${buffer.num_displayed} == 0"
/set weechat.look.item_buffer_filter "•"
/set weechat.look.prefix_align_min 0
/set weechat.look.prefix_align_max 10
/set weechat.look.prefix_join "▬▬▶"
/set weechat.look.prefix_quit "◀▬▬"
/set weechat.look.prefix_suffix "│"
/set weechat.look.read_marker_string "─"
/set weechat.look.separator_horizontal ""


/set weechat.color.bar_more 229
/set weechat.color.chat_highlight lightred
/set weechat.color.chat_highlight_bg default
/set weechat.color.chat_nick_colors "cyan,magenta,green,brown,lightblue,lightcyan,lightmagenta,lightgreen,blue"
/set weechat.color.chat_prefix_more 31
/set weechat.color.chat_prefix_suffix 31
/set weechat.color.chat_read_marker 31
/set weechat.color.chat_time 239
/set weechat.color.chat_delimiters 31
/set weechat.color.separator 31
/set weechat.color.status_data_highlight 163
/set weechat.color.status_data_msg 229
/set weechat.color.status_data_private 121
/set weechat.color.status_more 229
/set weechat.color.status_name 121
/set weechat.color.status_name_ssl 121

The following command will let you run all the commands of my configuration (not really recommended, you should take only what you want and understand)

First, type the following

/secure passphrase <pass>
/secure set freenodepass <pass>
/secure set snoonetpass <pass>
/secure set tildepass <pass>
/secure set undernet_userpass <user> <pass>
/secure set undernet_secret <TOTP secret>
/secure set relaypass <pass>
/script install autojoinem.py buffer_autoset.py autosort.py grep.py text_item.py
/secure set mariechannel <buffer fullname of my friend's channel>

Once scripts are installed

/exec -sh -oc curl -sfS https://gist.githubusercontent.com/pascalpoitras/8406501/raw/myweechat.md | sed -E 's/^\s+//;/^(\/secure|\/script|\/ruby)/d;/^\//!d'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment