Skip to content

Instantly share code, notes, and snippets.

@spicycode
Forked from pascalpoitras/1.md
Last active February 8, 2026 14:33
Show Gist options
  • Select an option

  • Save spicycode/371ca343201391a7eb5409f3288e2864 to your computer and use it in GitHub Desktop.

Select an option

Save spicycode/371ca343201391a7eb5409f3288e2864 to your computer and use it in GitHub Desktop.

Revisions

  1. spicycode revised this gist Oct 13, 2017. 1 changed file with 1 addition and 106 deletions.
    107 changes: 1 addition & 106 deletions myweechat.md
    Original file line number Diff line number Diff line change
    @@ -126,17 +126,6 @@ Note: I do not log IRC conversation via _WeeChat_ (I log via _ZNC_). However, I
    /set plugins.var.perl.highmon.alignment "nchannel"


    ### urlserver.py


    /set plugins.var.python.urlserver.http_hostname "<my vps IP>"
    /set plugins.var.python.urlserver.http_port "<port>"
    /set plugins.var.python.urlserver.http_allowed_ips "^<my home IP>$"
    /set plugins.var.python.urlserver.http_url_prefix xox
    /set plugins.var.python.urlserver.msg_ignore_buffers core.weechat,python.grep,irc.BitlBee.#security,irc.BitlBee.#technews,perl.highmon
    /set plugins.var.python.urlserver.http_embed_youtube on


    ### autosort.py


    @@ -148,16 +137,6 @@ Note: I do not log IRC conversation via _WeeChat_ (I log via _ZNC_). However, I

    channels (begin with & and #) will appears right below the server, private message from *status will follow and finally the rest.


    ### pushover.pl


    /set plugins.var.perl.pushover.blacklist irc.server.*,irc.*.*status
    /set plugins.var.perl.pushover.pb_apikey ${sec.data.pushbulletapikey}
    /set plugins.var.perl.pushover.short_name on
    /set plugins.var.perl.pushover.service pushbullet


    ### vimode.py


    @@ -168,90 +147,6 @@ If you use this script, see the input bar below, I included two items from this


    The vi_line_numbers bar will be only visible in the active window whenever we enter an Ex command (whenever the vi_cmd bar is visible).


    ## Conky


    /buffer_autoset add exec.exec.conky short_name conky


    ### exec conky at startup and right now


    /set weechat.startup.command_after_plugins "/exec -norc -noln -buffer conky conky"
    /exec -norc -noln -buffer conky conky


    ### change the title of the conky window


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


    It will change the title of the conky window from _Executed commands_ to _Conky - the light-weight system monitor_


    ### this trigger will beautify the output of conky and add a localvar with the value of load average and the buflist will retrieve it


    /trigger add conky_tag_color modifier weechat_print
    /trigger set conky_tag_color conditions ${tg_buffer} == exec.exec.conky
    /trigger set conky_tag_color regex /^ \t(Uptime|CPU|RAM|Swap|Networking|Up|Down):(.*)/ ${color:_31}${re:1}\t${color:reset}${re:2}/ /No swap/0/ /^ \tLoad Average.*// /^Load Average: (.*)/${re:1}/tg_message_nocolor
    /trigger set conky_tag_color command ${if:${tg_message}=~Load Average?/buffer set localvar_set_buflist ${tg_message_nocolor}}


    ### 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
    Load Average: ${loadavg 1 2}
    Uptime: $uptime
    CPU: $cpu%
    RAM: $memperc%
    Swap: $swapperc%
    Up: ${upspeed venet0}
    Down: ${downspeed venet0}


    Note: you need conky-cli package on _Debian_, same for _Arch Linux_


    ## Weather with wttr.in

    /buffer_autoset add exec.exec.weather short_name weather
    /set aspell.dict.exec.exec.weather fr
    /trigger add weather command weather
    /trigger set weather regex "/\s/_/tg_argv_eol1"
    /trigger set weather command "/exec -noflush -norc -noln -buffer weather curl -s http://wttr.in/${tg_argv_eol1}?lang=${aspell.dict.exec.exec.weather}"
    I found something very similar on the [alias wiki page](https://github.com/weechat/weechat/wiki/Alias-examples) of WeeChat on GitHub. I adjust it for my own use. So when you type _/weather Montreal_, a new buffer will be created and will show the output of _curl -s http://wttr.in/Montreal_. (I created a trigger instead of an alias to replace space by _ in city name)

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


    I created this trigger to change the title of the buffer from _Executed commands_ to _Weather for City: Montreal, Canada_.


    /trigger add weather_shortcut modifier input_text_for_buffer
    /trigger set weather_shortcut conditions "${buffer[tg_modifier_data].full_name} == exec.exec.weather && ${tg_string_nocolor} !~ ^/"
    /trigger set weather_shortcut regex "==(.*)==/weather ${re:1}"


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


    ## Bars

    @@ -274,7 +169,7 @@ Note: show channels and privates buffers under their respective server instead o
    /set buflist.format.hotlist_highlight "${color:163}"
    /set buflist.format.hotlist_message "${color:229}"
    /set buflist.format.hotlist_private "${color:121}"
    /set buflist.format.name "${if:${type}==server?${color:white}:${color_hotlist}}${if:${type}==server||${type}==channel||${type}==private?${if:${cutscr:10,+,${name}}!=${name}?${cutscr:10,${color:${weechat.color.chat_prefix_more}}+,${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK}:${name}}}:${cutscr:10, ,${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK} :${name} }}}:${name}}"
    /set buflist.format.name "${if:${type}==server?${color:white}:${color_hotlist}}${if:${type}==server||${type}==channel||${type}==private?${if:${cutscr:15,+,${name}}!=${name}?${cutscr:15,${color:${weechat.color.chat_prefix_more}}+,${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK}:${name}}}:${cutscr:15, ,${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK} :${name} }}}:${name}}"
    /set buflist.format.number "${if:${type}==server?${color:black,31}:${color:239}}${number}${if:${number_displayed}?.: }"
    /set weechat.bar.buflist.size 25
    /set weechat.bar.buflist.size_max 30
  2. spicycode revised this gist Oct 13, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion myweechat.md
    Original file line number Diff line number Diff line change
    @@ -117,7 +117,7 @@ Note: I do not log IRC conversation via _WeeChat_ (I log via _ZNC_). However, I
    ## Scripts


    /script install highmon.pl buffer_autoset.py urlserver.py perlexec.pl autosort.py grep.py text_item.py pushover.pl vimode.py
    /script install highmon.pl buffer_autoset.py perlexec.pl autosort.py grep.py text_item.py


    ### highmon.pl
  3. spicycode revised this gist Oct 12, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion myweechat.md
    Original file line number Diff line number Diff line change
    @@ -539,7 +539,7 @@ The _weechat.color.chat_host_ option will also set this color for part and quit.
    /set weechat.look.day_change_message_2dates ▬▬▶ %%a, %%d %%b %%Y (%a, %d %b %Y) ◀▬▬
    /set weechat.look.item_buffer_filter "•"
    /set weechat.look.prefix_align_min 0
    /set weechat.look.prefix_align_max 10
    /set weechat.look.prefix_align_max 14
    /set weechat.look.prefix_join "▬▬▶"
    /set weechat.look.prefix_quit "◀▬▬"
    /set weechat.look.prefix_suffix "│"
  4. spicycode revised this gist Oct 12, 2017. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions myweechat.md
    Original file line number Diff line number Diff line change
    @@ -339,8 +339,8 @@ Note: the built-in input bar is of type window. I prefer a input bar of type roo
    /set weechat.bar.nicklist.color_fg 229
    /set weechat.bar.nicklist.separator on
    /set weechat.bar.nicklist.conditions "${nicklist} && ${window.number} == 1"
    /set weechat.bar.nicklist.size_max 14
    /set weechat.bar.nicklist.size 14
    /set weechat.bar.nicklist.size_max 20
    /set weechat.bar.nicklist.size 16


    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.
  5. spicycode revised this gist Oct 12, 2017. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions myweechat.md
    Original file line number Diff line number Diff line change
    @@ -276,8 +276,8 @@ Note: show channels and privates buffers under their respective server instead o
    /set buflist.format.hotlist_private "${color:121}"
    /set buflist.format.name "${if:${type}==server?${color:white}:${color_hotlist}}${if:${type}==server||${type}==channel||${type}==private?${if:${cutscr:10,+,${name}}!=${name}?${cutscr:10,${color:${weechat.color.chat_prefix_more}}+,${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK}:${name}}}:${cutscr:10, ,${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK} :${name} }}}:${name}}"
    /set buflist.format.number "${if:${type}==server?${color:black,31}:${color:239}}${number}${if:${number_displayed}?.: }"
    /set weechat.bar.buflist.size 18
    /set weechat.bar.buflist.size_max 18
    /set weechat.bar.buflist.size 25
    /set weechat.bar.buflist.size_max 30


    Different foreground and background colors for servers buffers. Display the real network name instead of the one you create in WeeChat. For example, if you add a server BNCFreenode, it will appears as freenode. Servers, channels and privates names that exceed 8 characters will be cut to 8 followed by a + sign. Those who have less than 8 characters will be filled with space to make them align their hotlist with those that exceed 8 characters. Here, I added 25 spaces even if my bar is only 18, if you're bar is more than 25 characters wide, add spaces. Finally, if you type /iset something, the *something* text will appears at the right of iset. The load average will appears at the right of conky and the current city will appears at the right of weather (if you type /weather <a city>)
  6. spicycode revised this gist Oct 12, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion myweechat.md
    Original file line number Diff line number Diff line change
    @@ -274,7 +274,7 @@ Note: show channels and privates buffers under their respective server instead o
    /set buflist.format.hotlist_highlight "${color:163}"
    /set buflist.format.hotlist_message "${color:229}"
    /set buflist.format.hotlist_private "${color:121}"
    /set buflist.format.name "${if:${type}==server?${color:white}:${color_hotlist}}${if:${type}==server||${type}==channel||${type}==private?${if:${cutscr:8,+,${name}}!=${name}?${cutscr:8,${color:${weechat.color.chat_prefix_more}}+,${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK}:${name}}}:${cutscr:8, ,${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK} :${name} }}}:${name}}"
    /set buflist.format.name "${if:${type}==server?${color:white}:${color_hotlist}}${if:${type}==server||${type}==channel||${type}==private?${if:${cutscr:10,+,${name}}!=${name}?${cutscr:10,${color:${weechat.color.chat_prefix_more}}+,${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK}:${name}}}:${cutscr:10, ,${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK} :${name} }}}:${name}}"
    /set buflist.format.number "${if:${type}==server?${color:black,31}:${color:239}}${number}${if:${number_displayed}?.: }"
    /set weechat.bar.buflist.size 18
    /set weechat.bar.buflist.size_max 18
  7. @pascalpoitras pascalpoitras revised this gist Sep 5, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion myweechat.md
    Original file line number Diff line number Diff line change
    @@ -268,7 +268,7 @@ This trigger will allow you to enter only the city name (without /weather) in th
    Note: show channels and privates buffers under their respective server instead of mixing them all.


    /set buflist.format.buffer "${format_number}${indent}${format_name}${format_hotlist} ${color:31}${buffer.local_variables.filter}${buffer.local_variables.buflist}"
    /set buflist.format.buffer "${format_number}${indent}${eval:${format_name}}${format_hotlist} ${color:31}${buffer.local_variables.filter}${buffer.local_variables.buflist}"
    /set buflist.format.buffer_current ${if:${type}==server?${color:*white,31}:${color:*white}}${hide:>,${buffer[last_gui_buffer].number}} ${indent}${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK}:${name}} ${color:31}${buffer.local_variables.filter}${buffer.local_variables.buflist}
    /set buflist.format.hotlist " ${color:239}${hotlist}${color:239}"
    /set buflist.format.hotlist_highlight "${color:163}"
  8. @pascalpoitras pascalpoitras revised this gist Jul 11, 2017. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions myweechat.md
    Original file line number Diff line number Diff line change
    @@ -268,8 +268,8 @@ This trigger will allow you to enter only the city name (without /weather) in th
    Note: show channels and privates buffers under their respective server instead of mixing them all.


    /set buflist.format.buffer "${format_number}${indent}${format_name}${format_hotlist} ${color:31}${if:${buffer.full_name}==fset.fset?*${buffer.local_variables.filter}*}${buffer.local_variables.buflist}"
    /set buflist.format.buffer_current ${if:${type}==server?${color:*white,31}:${color:*white}}${hide:>,${buffer[last_gui_buffer].number}} ${indent}${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK}:${name}} ${color:31}${if:${buffer.full_name}==fset.fset?*${buffer.local_variables.filter}*}${buffer.local_variables.buflist}
    /set buflist.format.buffer "${format_number}${indent}${format_name}${format_hotlist} ${color:31}${buffer.local_variables.filter}${buffer.local_variables.buflist}"
    /set buflist.format.buffer_current ${if:${type}==server?${color:*white,31}:${color:*white}}${hide:>,${buffer[last_gui_buffer].number}} ${indent}${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK}:${name}} ${color:31}${buffer.local_variables.filter}${buffer.local_variables.buflist}
    /set buflist.format.hotlist " ${color:239}${hotlist}${color:239}"
    /set buflist.format.hotlist_highlight "${color:163}"
    /set buflist.format.hotlist_message "${color:229}"
  9. @pascalpoitras pascalpoitras revised this gist Jul 3, 2017. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions myweechat.md
    Original file line number Diff line number Diff line change
    @@ -63,7 +63,7 @@ Once you're connected to _bitlbee_, _WeeChat_ will send a _PRIVMSG_ to the _&bit
    /set weechat.plugin.autoload "*,!lua,!tcl,!ruby,!fifo,!xfer,!guile,!javascript"


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


    ### Aspell
    @@ -75,7 +75,7 @@ this will load all module except lua, tcl, ruby, fifo and xfer
    /aspell enable


    #### Set the dictionnary based on the channel name
    #### Set the dictionary based on the channel name


    /trigger add setdict signal *,irc_in2_join
  10. @pascalpoitras pascalpoitras revised this gist Jun 26, 2017. 2 changed files with 4 additions and 15 deletions.
    17 changes: 3 additions & 14 deletions myweechat.md
    Original file line number Diff line number Diff line change
    @@ -117,7 +117,7 @@ Note: I do not log IRC conversation via _WeeChat_ (I log via _ZNC_). However, I
    ## Scripts


    /script install highmon.pl buffer_autoset.py urlserver.py iset.pl perlexec.pl autosort.py grep.py text_item.py pushover.pl vimode.py
    /script install highmon.pl buffer_autoset.py urlserver.py perlexec.pl autosort.py grep.py text_item.py pushover.pl vimode.py


    ### highmon.pl
    @@ -137,17 +137,6 @@ Note: I do not log IRC conversation via _WeeChat_ (I log via _ZNC_). However, I
    /set plugins.var.python.urlserver.http_embed_youtube on


    ### iset.pl


    /set iset.color.bg_selected 31
    /set iset.color.option_selected *white
    /set iset.color.type_selected *229
    /set iset.color.value_selected *121
    /set iset.color.type 229
    /set iset.color.value 121


    ### autosort.py


    @@ -279,8 +268,8 @@ This trigger will allow you to enter only the city name (without /weather) in th
    Note: show channels and privates buffers under their respective server instead of mixing them all.


    /set buflist.format.buffer "${format_number}${indent}${format_name}${format_hotlist} ${color:31}${buffer.local_variables.iset_filter}${buffer.local_variables.buflist}"
    /set buflist.format.buffer_current ${if:${type}==server?${color:*white,31}:${color:*white}}${hide:>,${buffer[last_gui_buffer].number}} ${indent}${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK}:${name}} ${color:31}${buffer.local_variables.iset_filter}${buffer.local_variables.buflist}
    /set buflist.format.buffer "${format_number}${indent}${format_name}${format_hotlist} ${color:31}${if:${buffer.full_name}==fset.fset?*${buffer.local_variables.filter}*}${buffer.local_variables.buflist}"
    /set buflist.format.buffer_current ${if:${type}==server?${color:*white,31}:${color:*white}}${hide:>,${buffer[last_gui_buffer].number}} ${indent}${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK}:${name}} ${color:31}${if:${buffer.full_name}==fset.fset?*${buffer.local_variables.filter}*}${buffer.local_variables.buflist}
    /set buflist.format.hotlist " ${color:239}${hotlist}${color:239}"
    /set buflist.format.hotlist_highlight "${color:163}"
    /set buflist.format.hotlist_message "${color:229}"
    2 changes: 1 addition & 1 deletion run.md
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@
    /secure set relaypass <pass>
    /secure set bitlbeepass <pass>
    /secure set pushbulletapikey <key>
    /script install highmon.pl buffer_autoset.py urlserver.py iset.pl perlexec.pl autosort.py grep.py text_item.py pushover.pl vimode.py
    /script install highmon.pl buffer_autoset.py urlserver.py perlexec.pl autosort.py grep.py text_item.py pushover.pl vimode.py


    ## Once scripts are installed
  11. @pascalpoitras pascalpoitras revised this gist Jun 25, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion myweechat.md
    Original file line number Diff line number Diff line change
    @@ -250,7 +250,7 @@ I found something very similar on the [alias wiki page](https://github.com/weech
    /trigger add set_title_weather_buffer print ""
    /trigger set set_title_weather_buffer conditions "${buffer.full_name} == exec.exec.weather && ${tg_message_nocolor} !~ ^\W && ${tg_message_nocolor} !~ (wttr\.in|@igor_chubin)"
    /trigger set set_title_weather_buffer regex "/.*/${tg_message_nocolor}/ /[^:]+:(.*)/${re:1}/tg_message"
    /trigger set set_title_weather_buffer command "/command -buffer exec.exec.weather core /buffer set title ${tg_message_nocolor};/buffer set localvar_set_buflist ${tg_message}"
    /trigger set set_title_weather_buffer command "/buffer set title ${tg_message_nocolor};/buffer set localvar_set_buflist ${tg_message}"


    I created this trigger to change the title of the buffer from _Executed commands_ to _Weather for City: Montreal, Canada_.
  12. @pascalpoitras pascalpoitras revised this gist Jun 25, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion myweechat.md
    Original file line number Diff line number Diff line change
    @@ -208,7 +208,7 @@ It will change the title of the conky window from _Executed commands_ to _Conky

    /trigger add conky_tag_color modifier weechat_print
    /trigger set conky_tag_color conditions ${tg_buffer} == exec.exec.conky
    /trigger set conky_tag_color regex /^ \t(Uptime|CPU|RAM|Swap|Networking|Up|Down):(.*)/${color:_31}${re:1}\t${color:reset}${re:2}/ /No swap/0/ /^ \tLoad Average.*// /^Load Average: (.*)/${re:1}/tg_message_nocolor
    /trigger set conky_tag_color regex /^ \t(Uptime|CPU|RAM|Swap|Networking|Up|Down):(.*)/ ${color:_31}${re:1}\t${color:reset}${re:2}/ /No swap/0/ /^ \tLoad Average.*// /^Load Average: (.*)/${re:1}/tg_message_nocolor
    /trigger set conky_tag_color command ${if:${tg_message}=~Load Average?/buffer set localvar_set_buflist ${tg_message_nocolor}}


  13. @pascalpoitras pascalpoitras revised this gist Jun 25, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion myweechat.md
    Original file line number Diff line number Diff line change
    @@ -208,7 +208,7 @@ It will change the title of the conky window from _Executed commands_ to _Conky

    /trigger add conky_tag_color modifier weechat_print
    /trigger set conky_tag_color conditions ${tg_buffer} == exec.exec.conky
    /trigger set conky_tag_color regex /\t(Uptime|CPU|RAM|Swap|Networking|Up|Down):(.*)/${color:_31}${re:1}\t${color:reset}${re:2}/ /No swap/0/ /Load Average: (.*)/${re:1}/tg_message_nocolor
    /trigger set conky_tag_color regex /^ \t(Uptime|CPU|RAM|Swap|Networking|Up|Down):(.*)/${color:_31}${re:1}\t${color:reset}${re:2}/ /No swap/0/ /^ \tLoad Average.*// /^Load Average: (.*)/${re:1}/tg_message_nocolor
    /trigger set conky_tag_color command ${if:${tg_message}=~Load Average?/buffer set localvar_set_buflist ${tg_message_nocolor}}


  14. @pascalpoitras pascalpoitras revised this gist Jun 25, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion myweechat.md
    Original file line number Diff line number Diff line change
    @@ -208,7 +208,7 @@ It will change the title of the conky window from _Executed commands_ to _Conky

    /trigger add conky_tag_color modifier weechat_print
    /trigger set conky_tag_color conditions ${tg_buffer} == exec.exec.conky
    /trigger set conky_tag_color regex /^ \t(Uptime|CPU|RAM|Swap|Networking|Up|Down):(.*)/${color:_31}${re:1}\t${color:reset}${re:2}/ /No swap/0/ /^ \tLoad Average.*// /^ \tLoad Average: (.*)/${re:1}/tg_message_nocolor
    /trigger set conky_tag_color regex /\t(Uptime|CPU|RAM|Swap|Networking|Up|Down):(.*)/${color:_31}${re:1}\t${color:reset}${re:2}/ /No swap/0/ /Load Average: (.*)/${re:1}/tg_message_nocolor
    /trigger set conky_tag_color command ${if:${tg_message}=~Load Average?/buffer set localvar_set_buflist ${tg_message_nocolor}}


  15. @pascalpoitras pascalpoitras revised this gist Jun 24, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion myweechat.md
    Original file line number Diff line number Diff line change
    @@ -208,7 +208,7 @@ It will change the title of the conky window from _Executed commands_ to _Conky

    /trigger add conky_tag_color modifier weechat_print
    /trigger set conky_tag_color conditions ${tg_buffer} == exec.exec.conky
    /trigger set conky_tag_color regex /\t(Uptime|CPU|RAM|Swap|Networking|Up|Down):(.*)/${color:_31}${re:1}\t${color:reset}${re:2}/ /No swap/0/ /Load Average: (.*)/${re:1}/tg_message_nocolor
    /trigger set conky_tag_color regex /^ \t(Uptime|CPU|RAM|Swap|Networking|Up|Down):(.*)/${color:_31}${re:1}\t${color:reset}${re:2}/ /No swap/0/ /^ \tLoad Average.*// /^ \tLoad Average: (.*)/${re:1}/tg_message_nocolor
    /trigger set conky_tag_color command ${if:${tg_message}=~Load Average?/buffer set localvar_set_buflist ${tg_message_nocolor}}


  16. @pascalpoitras pascalpoitras revised this gist Jun 23, 2017. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions myweechat.md
    Original file line number Diff line number Diff line change
    @@ -279,8 +279,8 @@ This trigger will allow you to enter only the city name (without /weather) in th
    Note: show channels and privates buffers under their respective server instead of mixing them all.


    /set buflist.format.buffer "${format_number}${indent}${format_name}${format_hotlist}${if:${buffer.full_name}==perl.iset? ${color:31}${buffer.local_variables.iset_filter}} ${color:31}${buffer.local_variables.buflist}"
    /set buflist.format.buffer_current ${if:${type}==server?${color:*white,31}:${color:*white}}${hide:>,${buffer[last_gui_buffer].number}} ${indent}${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK}:${name}}${if:${buffer.full_name}==perl.iset? ${color:31}${buffer.local_variables.iset_filter}} ${color:31}${buffer.local_variables.buflist}
    /set buflist.format.buffer "${format_number}${indent}${format_name}${format_hotlist} ${color:31}${buffer.local_variables.iset_filter}${buffer.local_variables.buflist}"
    /set buflist.format.buffer_current ${if:${type}==server?${color:*white,31}:${color:*white}}${hide:>,${buffer[last_gui_buffer].number}} ${indent}${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK}:${name}} ${color:31}${buffer.local_variables.iset_filter}${buffer.local_variables.buflist}
    /set buflist.format.hotlist " ${color:239}${hotlist}${color:239}"
    /set buflist.format.hotlist_highlight "${color:163}"
    /set buflist.format.hotlist_message "${color:229}"
  17. @pascalpoitras pascalpoitras revised this gist Jun 23, 2017. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion myweechat.md
    Original file line number Diff line number Diff line change
    @@ -279,12 +279,13 @@ This trigger will allow you to enter only the city name (without /weather) in th
    Note: show channels and privates buffers under their respective server instead of mixing them all.


    /set buflist.format.buffer "${format_number}${if:${type}==server?${color:white}:${indent}${color_hotlist}}${if:${type}==server||${type}==channel||${type}==private?${if:${cutscr:8,+,${name}}!=${name}?${cutscr:8,${color:${weechat.color.chat_prefix_more}}+,${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK}:${name}}}:${cutscr:8, ,${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK} :${name} }}}:${name}}${format_hotlist}${if:${buffer.full_name}==perl.iset? ${color:31}${buffer.local_variables.iset_filter}} ${color:31}${buffer.local_variables.buflist}"
    /set buflist.format.buffer "${format_number}${indent}${format_name}${format_hotlist}${if:${buffer.full_name}==perl.iset? ${color:31}${buffer.local_variables.iset_filter}} ${color:31}${buffer.local_variables.buflist}"
    /set buflist.format.buffer_current ${if:${type}==server?${color:*white,31}:${color:*white}}${hide:>,${buffer[last_gui_buffer].number}} ${indent}${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK}:${name}}${if:${buffer.full_name}==perl.iset? ${color:31}${buffer.local_variables.iset_filter}} ${color:31}${buffer.local_variables.buflist}
    /set buflist.format.hotlist " ${color:239}${hotlist}${color:239}"
    /set buflist.format.hotlist_highlight "${color:163}"
    /set buflist.format.hotlist_message "${color:229}"
    /set buflist.format.hotlist_private "${color:121}"
    /set buflist.format.name "${if:${type}==server?${color:white}:${color_hotlist}}${if:${type}==server||${type}==channel||${type}==private?${if:${cutscr:8,+,${name}}!=${name}?${cutscr:8,${color:${weechat.color.chat_prefix_more}}+,${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK}:${name}}}:${cutscr:8, ,${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK} :${name} }}}:${name}}"
    /set buflist.format.number "${if:${type}==server?${color:black,31}:${color:239}}${number}${if:${number_displayed}?.: }"
    /set weechat.bar.buflist.size 18
    /set weechat.bar.buflist.size_max 18
  18. @pascalpoitras pascalpoitras revised this gist Jun 21, 2017. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions myweechat.md
    Original file line number Diff line number Diff line change
    @@ -184,7 +184,7 @@ The vi_line_numbers bar will be only visible in the active window whenever we en
    ## Conky


    /autosetbuffer add exec.exec.conky short_name conky
    /buffer_autoset add exec.exec.conky short_name conky


    ### exec conky at startup and right now
    @@ -197,7 +197,7 @@ The vi_line_numbers bar will be only visible in the active window whenever we en
    ### change the title of the conky window


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


    It will change the title of the conky window from _Executed commands_ to _Conky - the light-weight system monitor_
    @@ -239,7 +239,7 @@ Note: you need conky-cli package on _Debian_, same for _Arch Linux_

    ## Weather with wttr.in

    /autosetbuffer add exec.exec.weather short_name weather
    /buffer_autoset add exec.exec.weather short_name weather
    /set aspell.dict.exec.exec.weather fr
    /trigger add weather command weather
    /trigger set weather regex "/\s/_/tg_argv_eol1"
    @@ -413,7 +413,7 @@ Note: split the highlight monitor window in 2 and show conky in the new one
    /trigger set redirect_newsbin_to_news conditions "${tg_buffer} == irc.freenode.#newsbin && ${tg_tag_nick} == slack3r"
    /trigger set redirect_newsbin_to_news regex "/.*//"
    /trigger set redirect_newsbin_to_news command "/print -buffer irc.freenode.##news ${tg_prefix}\t${tg_message}"
    /autosetbuffer add irc.freenode.#newsbin hidden 1
    /buffer_autoset add irc.freenode.#newsbin hidden 1


    _##news_ and _#newsbin_ are two channels dedicated to live news. On _##news_, I use a filter to hide news from site other than those I explicitly mention. On _#newsbin_, I do not create any filter. Then, the trigger will redirect message from _#newsbin_ to _##news_. This way I can see all the news on one buffer. Finally, we hide _#newsbin_ buffer in the buffers bar.
    @@ -436,10 +436,10 @@ Well If we use this, the input bar will be filled with the command and not the u


    /set weechat.look.highlight *pascalpoitras*
    /autosetbuffer add irc.bitlbee.#twitter_pascalpoitras* highlight_words freenode,snoonet,*weechat*
    /autosetbuffer add irc.bitlbee.#LET highlight_regex .*
    /autosetbuffer add irc.bitlbee.#deals highlight_regex .*
    /autosetbuffer add irc.freenode.##reddit-hockey highlight_regex (^GOAL: MTL.*|^Le But: MTL.*)
    /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
  19. @pascalpoitras pascalpoitras revised this gist Jun 18, 2017. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions myweechat.md
    Original file line number Diff line number Diff line change
    @@ -290,8 +290,7 @@ Note: show channels and privates buffers under their respective server instead o
    /set weechat.bar.buflist.size_max 18


    Different foreground and background colors for servers buffers.
    Server buffer will have a different fg/bg color than all other buffers. If you type /iset *buflist* you will see *buflist* to the right of iset in buflist. Servers and channels names will have a max of 8 characters then the hotlist follows. I put space after ${name} in the ${cut for name less than 8 characters to align their hotlist with those with 8 characters or more. I also added load average for conky and the city for weather.
    Different foreground and background colors for servers buffers. Display the real network name instead of the one you create in WeeChat. For example, if you add a server BNCFreenode, it will appears as freenode. Servers, channels and privates names that exceed 8 characters will be cut to 8 followed by a + sign. Those who have less than 8 characters will be filled with space to make them align their hotlist with those that exceed 8 characters. Here, I added 25 spaces even if my bar is only 18, if you're bar is more than 25 characters wide, add spaces. Finally, if you type /iset something, the *something* text will appears at the right of iset. The load average will appears at the right of conky and the current city will appears at the right of weather (if you type /weather <a city>)


    ### Bar active title
  20. @pascalpoitras pascalpoitras revised this gist Jun 18, 2017. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions myweechat.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    ![WeeChat Screenshot](http://192.99.68.133/2017-06-17-231507_1920x1080_scrot.png)
    ![WeeChat Screenshot](http://192.99.68.133/2017-06-17-234050_1920x1080_scrot.png)


    ## Enable mouse support
    @@ -280,7 +280,7 @@ Note: show channels and privates buffers under their respective server instead o


    /set buflist.format.buffer "${format_number}${if:${type}==server?${color:white}:${indent}${color_hotlist}}${if:${type}==server||${type}==channel||${type}==private?${if:${cutscr:8,+,${name}}!=${name}?${cutscr:8,${color:${weechat.color.chat_prefix_more}}+,${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK}:${name}}}:${cutscr:8, ,${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK} :${name} }}}:${name}}${format_hotlist}${if:${buffer.full_name}==perl.iset? ${color:31}${buffer.local_variables.iset_filter}} ${color:31}${buffer.local_variables.buflist}"
    /set buflist.format.buffer_current "${if:${type}==server?${color:*white,31}:${color:*white}}${hide:>,${buffer[last_gui_buffer].number}} ${indent}${color_hotlist}${name}${if:${buffer.full_name}==perl.iset? ${color:31}${buffer.local_variables.iset_filter}} ${color:31}${buffer.local_variables.buflist}"
    /set buflist.format.buffer_current ${if:${type}==server?${color:*white,31}:${color:*white}}${hide:>,${buffer[last_gui_buffer].number}} ${indent}${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK}:${name}}${if:${buffer.full_name}==perl.iset? ${color:31}${buffer.local_variables.iset_filter}} ${color:31}${buffer.local_variables.buflist}
    /set buflist.format.hotlist " ${color:239}${hotlist}${color:239}"
    /set buflist.format.hotlist_highlight "${color:163}"
    /set buflist.format.hotlist_message "${color:229}"
    @@ -290,6 +290,7 @@ Note: show channels and privates buffers under their respective server instead o
    /set weechat.bar.buflist.size_max 18


    Different foreground and background colors for servers buffers.
    Server buffer will have a different fg/bg color than all other buffers. If you type /iset *buflist* you will see *buflist* to the right of iset in buflist. Servers and channels names will have a max of 8 characters then the hotlist follows. I put space after ${name} in the ${cut for name less than 8 characters to align their hotlist with those with 8 characters or more. I also added load average for conky and the city for weather.


  21. @pascalpoitras pascalpoitras revised this gist Jun 18, 2017. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions myweechat.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    ![WeeChat Screenshot](http://192.99.68.133/2017-05-20-034652_1920x1080_scrot.png)
    ![WeeChat Screenshot](http://192.99.68.133/2017-06-17-231507_1920x1080_scrot.png)


    ## Enable mouse support
    @@ -279,13 +279,13 @@ This trigger will allow you to enter only the city name (without /weather) in th
    Note: show channels and privates buffers under their respective server instead of mixing them all.


    /set buflist.format.buffer "${if:${type}==server?${color:black,31}${format_number}${color:white}:${color:239}${format_number}${indent}${color_hotlist}}${if:${type}!=0&&${type}!=exec?${if:${cutscr:8,+,${name}}!=${name}?${cutscr:8,${color:${weechat.color.chat_prefix_more}}+,${name}}:${cutscr:8, ,${name} }}:${name}}${format_hotlist}${if:${buffer.full_name}==perl.iset? ${color:31}${buffer.local_variables.iset_filter}} ${color:31}${buffer.local_variables.buflist}"
    /set buflist.format.buffer "${format_number}${if:${type}==server?${color:white}:${indent}${color_hotlist}}${if:${type}==server||${type}==channel||${type}==private?${if:${cutscr:8,+,${name}}!=${name}?${cutscr:8,${color:${weechat.color.chat_prefix_more}}+,${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK}:${name}}}:${cutscr:8, ,${if:${type}==server&&${info:irc_server_isupport_value,${name},NETWORK}?${info:irc_server_isupport_value,${name},NETWORK} :${name} }}}:${name}}${format_hotlist}${if:${buffer.full_name}==perl.iset? ${color:31}${buffer.local_variables.iset_filter}} ${color:31}${buffer.local_variables.buflist}"
    /set buflist.format.buffer_current "${if:${type}==server?${color:*white,31}:${color:*white}}${hide:>,${buffer[last_gui_buffer].number}} ${indent}${color_hotlist}${name}${if:${buffer.full_name}==perl.iset? ${color:31}${buffer.local_variables.iset_filter}} ${color:31}${buffer.local_variables.buflist}"
    /set buflist.format.hotlist " ${color:239}${hotlist}${color:239}"
    /set buflist.format.hotlist_highlight "${color:163}"
    /set buflist.format.hotlist_message "${color:229}"
    /set buflist.format.hotlist_private "${color:121}"
    /set buflist.format.number "${number}${if:${number_displayed}?.: }"
    /set buflist.format.number "${if:${type}==server?${color:black,31}:${color:239}}${number}${if:${number_displayed}?.: }"
    /set weechat.bar.buflist.size 18
    /set weechat.bar.buflist.size_max 18

  22. @pascalpoitras pascalpoitras revised this gist Jun 12, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion run.md
    Original file line number Diff line number Diff line change
    @@ -15,4 +15,4 @@
    ## Once scripts are installed


    /eval /exec -oc sed -E 's/^ *//;/^(\/secure|\/script)/d' ${env:HOME}/myweechat.md
    /eval /exec -oc sed -E 's/^ *//;/^(\/secure|\/script)/d;/^\//!d' ${env:HOME}/myweechat.md
  23. @pascalpoitras pascalpoitras revised this gist Jun 12, 2017. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion run.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,8 @@
    ## 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)

    ### download myweechat.md and then


    /secure passphrase <pass>
    /secure set bncaddrport <addr/port>
    /secure set bncpass <pass>
  24. @pascalpoitras pascalpoitras revised this gist Jun 12, 2017. 2 changed files with 23 additions and 5 deletions.
    12 changes: 7 additions & 5 deletions myweechat.md
    Original file line number Diff line number Diff line change
    @@ -11,6 +11,7 @@


    /secure passphrase <pass>
    /secure set bncaddrport <addr/port>
    /secure set bncpass <pass>
    /secure set relaypass <pass>
    /secure set bitlbeepass <pass>
    @@ -34,17 +35,17 @@ the last line request some IRCv3 capabilities. Capabilities supported by WeeChat
    ### Network-specific settings


    /server add bitlbee znc.pascalpoitras.com/30011 -ssl -autoconnect
    /server add bitlbee ${sec.data.bncaddrport} -ssl -autoconnect
    /set irc.server.bitlbee.password r3m/bitlbee:${sec.data.bncpass}
    /set irc.server.bitlbee.command /msg &bitlbee identify;/oper anything ${sec.data.bitlbeepass}

    /server add freenode znc.pascalpoitras.com/30011 -ssl -autoconnect
    /server add freenode ${sec.data.bncaddrport} -ssl -autoconnect
    /set irc.server.freenode.password r3m/freenode:${sec.data.bncpass}

    /server add snoonet znc.pascalpoitras.com/30011 -ssl -autoconnect
    /server add snoonet ${sec.data.bncaddrport} -ssl -autoconnect
    /set irc.server.snoonet.password r3m/snoonet:${sec.data.bncpass}

    /server add oftc znc.pascalpoitras.com/30011 -ssl -autoconnect
    /server add oftc ${sec.data.bncaddrport} -ssl -autoconnect
    /set irc.server.oftc.password r3m/oftc:${sec.data.bncpass}

    /connect -all
    @@ -266,7 +267,7 @@ This trigger will allow you to enter only the city name (without /weather) in th
    ## Bars


    ### Bar buffers
    ### Bar buflist


    #### unmerge servers buffers from core and indent
    @@ -280,6 +281,7 @@ Note: show channels and privates buffers under their respective server instead o

    /set buflist.format.buffer "${if:${type}==server?${color:black,31}${format_number}${color:white}:${color:239}${format_number}${indent}${color_hotlist}}${if:${type}!=0&&${type}!=exec?${if:${cutscr:8,+,${name}}!=${name}?${cutscr:8,${color:${weechat.color.chat_prefix_more}}+,${name}}:${cutscr:8, ,${name} }}:${name}}${format_hotlist}${if:${buffer.full_name}==perl.iset? ${color:31}${buffer.local_variables.iset_filter}} ${color:31}${buffer.local_variables.buflist}"
    /set buflist.format.buffer_current "${if:${type}==server?${color:*white,31}:${color:*white}}${hide:>,${buffer[last_gui_buffer].number}} ${indent}${color_hotlist}${name}${if:${buffer.full_name}==perl.iset? ${color:31}${buffer.local_variables.iset_filter}} ${color:31}${buffer.local_variables.buflist}"
    /set buflist.format.hotlist " ${color:239}${hotlist}${color:239}"
    /set buflist.format.hotlist_highlight "${color:163}"
    /set buflist.format.hotlist_message "${color:229}"
    /set buflist.format.hotlist_private "${color:121}"
    16 changes: 16 additions & 0 deletions run.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    ## 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)


    /secure passphrase <pass>
    /secure set bncaddrport <addr/port>
    /secure set bncpass <pass>
    /secure set relaypass <pass>
    /secure set bitlbeepass <pass>
    /secure set pushbulletapikey <key>
    /script install highmon.pl buffer_autoset.py urlserver.py iset.pl perlexec.pl autosort.py grep.py text_item.py pushover.pl vimode.py


    ## Once scripts are installed


    /eval /exec -oc sed -E 's/^ *//;/^(\/secure|\/script)/d' ${env:HOME}/myweechat.md
  25. @pascalpoitras pascalpoitras revised this gist Jun 8, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion myweechat.md
    Original file line number Diff line number Diff line change
    @@ -369,7 +369,7 @@ Note: I changed the conditions to display the nicklist only on buffer of type ch

    /key bindctxt mouse @item(znc_commands):button1 hsignal:znc_commands

    /eval /perlexec my $i = 0; foreach my $command (split / /, '${plugins.var.znc_commands}') { weechat::command("", "/eval /mute set plugins.var.python.text_item.znc_commands \\${plugins.var.python.text_item.znc_commands}\\\\${color:\\${info:irc_nick_color_name,$command}}$command\\\\${\\n}"); weechat::command("", "/eval /mute set trigger.trigger.hsignal_znc_commands.regex \\${trigger.trigger.hsignal_znc_commands.regex} /^$i\\\\$/$command/_bar_item_line"); $i++; }
    /eval /perlexec my $i = 0; foreach my $command (split / /, '${plugins.var.znc_commands}') { (my $command2 = $command) =~ s/.*?([A-Z][A-Z]+|[A-Z][a-z]+)$/$1/; $command2 =~ s/([^s])s$/$1/; weechat::command("", "/eval /mute set plugins.var.python.text_item.znc_commands \\${plugins.var.python.text_item.znc_commands}\\\\${color:\\${info:irc_nick_color_name,$command2}}$command\\\\${\\n}"); weechat::command("", "/eval /mute set trigger.trigger.hsignal_znc_commands.regex \\${trigger.trigger.hsignal_znc_commands.regex} /^$i\\\\$/$command/_bar_item_line"); $i++; }


    This bar will be exactly like a default nicklist bar. That is, right-positionned with vertical filling. But instead of nicknames, it will contains a znc command per line. If you click on a command, the input bar will be filled with the command name, then you add whatever you want or simply press enter. Futhermore, this will send _help command_ to znc.
  26. @pascalpoitras pascalpoitras revised this gist Jun 8, 2017. 1 changed file with 3 additions and 16 deletions.
    19 changes: 3 additions & 16 deletions myweechat.md
    Original file line number Diff line number Diff line change
    @@ -358,35 +358,22 @@ Note: I changed the conditions to display the nicklist only on buffer of type ch

    /set plugins.var.python.text_item.znc_commands "private "

    /set plugins.var.znc_commands Version ListMods ListAvailMods ListNicks ListServers AddNetwork DelNetwork ListNetworks MoveNetwork JumpNetwork AddServer DelServer AddTrustedServerFingerprint DelTrustedServerFingerprint ListTrustedServerFingerprints EnableChan DisableChan Attach Detach Topics PlayBuffer ClearBuffer ClearAllChannelBuffers ClearAllQueryBuffers SetBuffer AddBindHost DelBindHost ListBindHosts SetBindHost SetUserBindHost ClearBindHost ClearUserBindHost ShowBindHost Jump Disconnect Connect Uptime LoadMod UnloadMod ReloadMod UpdateMod ShowMOTD SetMOTD AddMOTD ClearMOTD ListPorts AddPort DelPort Rehash SaveConfig ListUsers ListAllUserNetworks ListChans ListClients Traffic Broadcast Shutdown Restart

    /bar add znc_commands window right 14 1 znc_commands
    /set weechat.bar.znc_commands.conditions "${buffer.full_name} =~ \.*status$ && ${window.number} == 1"
    /set weechat.bar.znc_commands.size_max 14

    /trigger add hsignal_znc_commands hsignal znc_commands
    /trigger set hsignal_znc_commands command "/command -buffer ${buffer.full_name} * /quote znc help ${_bar_item_line};/command -buffer ${buffer.full_name} * /input delete_line;/command -buffer ${buffer.full_name} * /input insert ${_bar_item_line}\x20"

    /trigger add znc_create_commands_list_and_regex print ""
    /trigger set znc_create_commands_list_and_regex conditions "${buffer.short_name} == *status && ${tg_message_nocolor} =~ ^(Command:|\|) [a-zA-Z]+\s && ${tg_message_nocolor} !~ ^\S+ Command\s"
    /trigger set znc_create_commands_list_and_regex regex "/^(Command:|\|) ([a-zA-Z]+).*/${re:2}/tg_message_nocolor /.*/${tg_message_nocolor}/tg_message /([^s])s$/${re:1}/tg_message /(?-i).*([A-Z][a-z]+)$/${color:${info:irc_nick_color_name,${re:1}}}${tg_message_nocolor}${color:reset}/tg_message"
    /trigger set znc_create_commands_list_and_regex command "/mute set plugins.var.python.text_item.znc_commands ${plugins.var.python.text_item.znc_commands}${tg_message}\${\n};/perlexec my $number = split(/ /, q(${trigger.trigger.hsignal_znc_commands.regex}))\; weechat::command(q(), q(/mute trigger set hsignal_znc_commands regex ${trigger.trigger.hsignal_znc_commands.regex} /^) . $number . q($/${tg_message_nocolor}/_bar_item_line))"

    /key bindctxt mouse @item(znc_commands):button1 hsignal:znc_commands

    /set irc.server.freenode.anti_flood_prio_high 0
    /perlexec foreach ('a'..'z') { weechat::command(q(), qq(/msg -server freenode *status help $_)) }
    /set irc.server.freenode.anti_flood_prio_high 2


    wait for "No matches for 'z'" before disabling the trigger and clicking on a command in the bar


    /trigger disable znc_create_commands_list_and_regex
    /eval /perlexec my $i = 0; foreach my $command (split / /, '${plugins.var.znc_commands}') { weechat::command("", "/eval /mute set plugins.var.python.text_item.znc_commands \\${plugins.var.python.text_item.znc_commands}\\\\${color:\\${info:irc_nick_color_name,$command}}$command\\\\${\\n}"); weechat::command("", "/eval /mute set trigger.trigger.hsignal_znc_commands.regex \\${trigger.trigger.hsignal_znc_commands.regex} /^$i\\\\$/$command/_bar_item_line"); $i++; }


    This bar will be exactly like a default nicklist bar. That is, right-positionned with vertical filling. But instead of nicknames, it will contains a znc command per line. If you click on a command, the input bar will be filled with the command name, then you add whatever you want or simply press enter. Futhermore, this will send _help command_ to znc.

    now the hard part to explain. We need to bind the left mouse button to a hsignal. The hsignal will receive the line number whenever you click on a line in the bar. This hsignal will get the corresponding command name for this line number. But that's not all, we need to create a trigger to fill the bar item with the znc commands and create the appropriate regex for the hsignal. This trigger need to be disabled (or deleted) after all znc commands are in the bar.


    ## Layouts

  27. @pascalpoitras pascalpoitras revised this gist May 21, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion myweechat.md
    Original file line number Diff line number Diff line change
    @@ -224,7 +224,7 @@ It will change the title of the conky window from _Executed commands_ to _Conky
    use_spacer none

    TEXT
    Load Average: ${loadavg 2}
    Load Average: ${loadavg 1 2}
    Uptime: $uptime
    CPU: $cpu%
    RAM: $memperc%
  28. @pascalpoitras pascalpoitras revised this gist May 21, 2017. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions myweechat.md
    Original file line number Diff line number Diff line change
    @@ -278,8 +278,8 @@ This trigger will allow you to enter only the city name (without /weather) in th
    Note: show channels and privates buffers under their respective server instead of mixing them all.


    /set buflist.format.buffer "${if:${type}==server?${color:black,31}${format_number}${color:white}:${color:239}${format_number}${indent}${color_hotlist}}${if:${type}!=0&&${type}!=exec?${if:${cutscr:8,+,${name}}!=${name}?${cutscr:8,${color:${weechat.color.chat_prefix_more}}+,${name}}:${cutscr:8, ,${name} }}:${name}}${format_hotlist}${if:${buffer.full_name}==perl.iset? ${color:31}${buffer.local_variables.iset_filter}} ${color:31}${buffer.local_variables.buflist}"
    /set buflist.format.buffer_current "${if:${type}==server?${color:*white,31}:${color:*white}}>> ${indent}${color_hotlist}${name}${if:${buffer.full_name}==perl.iset? ${color:31}${buffer.local_variables.iset_filter}} ${color:31}${buffer.local_variables.buflist}"
    /set buflist.format.buffer "${if:${type}==server?${color:black,31}${format_number}${color:white}:${color:239}${format_number}${indent}${color_hotlist}}${if:${type}!=0&&${type}!=exec?${if:${cutscr:8,+,${name}}!=${name}?${cutscr:8,${color:${weechat.color.chat_prefix_more}}+,${name}}:${cutscr:8, ,${name} }}:${name}}${format_hotlist}${if:${buffer.full_name}==perl.iset? ${color:31}${buffer.local_variables.iset_filter}} ${color:31}${buffer.local_variables.buflist}"
    /set buflist.format.buffer_current "${if:${type}==server?${color:*white,31}:${color:*white}}${hide:>,${buffer[last_gui_buffer].number}} ${indent}${color_hotlist}${name}${if:${buffer.full_name}==perl.iset? ${color:31}${buffer.local_variables.iset_filter}} ${color:31}${buffer.local_variables.buflist}"
    /set buflist.format.hotlist_highlight "${color:163}"
    /set buflist.format.hotlist_message "${color:229}"
    /set buflist.format.hotlist_private "${color:121}"
  29. @pascalpoitras pascalpoitras revised this gist May 21, 2017. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions myweechat.md
    Original file line number Diff line number Diff line change
    @@ -558,8 +558,6 @@ The _weechat.color.chat_host_ option will also set this color for part and quit.
    /set weechat.look.color_inactive_window off
    /set weechat.look.day_change_message_1date ▬▬▶ %a, %d %b %Y ◀▬▬
    /set weechat.look.day_change_message_2dates ▬▬▶ %%a, %%d %%b %%Y (%a, %d %b %Y) ◀▬▬
    /set weechat.look.hotlist_count_max 0
    /set weechat.look.hotlist_names_count 10
    /set weechat.look.item_buffer_filter "•"
    /set weechat.look.prefix_align_min 0
    /set weechat.look.prefix_align_max 10
  30. @pascalpoitras pascalpoitras revised this gist May 21, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion myweechat.md
    Original file line number Diff line number Diff line change
    @@ -316,7 +316,7 @@ Note: This bar will be different from the already created one. I set the conditi
    ### Bar status


    /bar add rootstatus root bottom 1 0 [time],[buffer_count],[buffer_plugin],buffer_number+:+buffer_name+(buffer_modes)+{buffer_nicklist_count}+buffer_filter,[bitlbee_typing_notice],[lag],[aspell_dict],[aspell_suggest],[hotlist],completion,scroll
    /bar add rootstatus root bottom 1 0 [time],[buffer_count],[buffer_plugin],buffer_number+:+buffer_name+(buffer_modes)+{buffer_nicklist_count}+buffer_filter,[bitlbee_typing_notice],[lag],[aspell_dict],[aspell_suggest],completion,scroll
    /set weechat.bar.rootstatus.color_fg 31
    /set weechat.bar.rootstatus.color_bg 234
    /set weechat.bar.rootstatus.separator on