Skip to content

Instantly share code, notes, and snippets.

@joeygravlin
Forked from pascalpoitras/1.md
Created August 28, 2017 19:14
Show Gist options
  • Select an option

  • Save joeygravlin/12034bae8a57e62e16ac7d137dd68a01 to your computer and use it in GitHub Desktop.

Select an option

Save joeygravlin/12034bae8a57e62e16ac7d137dd68a01 to your computer and use it in GitHub Desktop.

Revisions

  1. @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}"
  2. @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
  3. @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
  4. @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_.
  5. @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}}


  6. @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}}


  7. @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}}


  8. @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}}


  9. @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}"
  10. @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
  11. @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
  12. @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
  13. @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.


  14. @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

  15. @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
  16. @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>
  17. @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
  18. @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.
  19. @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

  20. @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%
  21. @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}"
  22. @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
  23. @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
  24. @pascalpoitras pascalpoitras revised this gist May 20, 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
    @@ -1,4 +1,4 @@
    ![WeeChat Screenshot](http://192.99.68.133/2017-05-20-032347_1920x1080_scrot.png)
    ![WeeChat Screenshot](http://192.99.68.133/2017-05-20-034652_1920x1080_scrot.png)


    ## Enable mouse support
  25. @pascalpoitras pascalpoitras revised this gist May 20, 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
    @@ -279,7 +279,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}}>> ${indent}${color_hotlist}${name}${if:${buffer.full_name}==perl.iset? ${color:31}${buffer.local_variables.iset_filter}}"
    /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.hotlist_highlight "${color:163}"
    /set buflist.format.hotlist_message "${color:229}"
    /set buflist.format.hotlist_private "${color:121}"
  26. @pascalpoitras pascalpoitras revised this gist May 20, 2017. 1 changed file with 13 additions and 6 deletions.
    19 changes: 13 additions & 6 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-010246_1920x1080_scrot.png)
    ![WeeChat Screenshot](http://192.99.68.133/2017-05-20-032347_1920x1080_scrot.png)


    ## Enable mouse support
    @@ -183,6 +183,9 @@ 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


    ### exec conky at startup and right now


    @@ -199,12 +202,13 @@ The vi_line_numbers bar will be only visible in the active window whenever we en
    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
    ### 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/
    /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}}


    ### my .conkyrc
    @@ -220,6 +224,7 @@ It will change the title of the conky window from _Executed commands_ to _Conky
    use_spacer none

    TEXT
    Load Average: ${loadavg 2}
    Uptime: $uptime
    CPU: $cpu%
    RAM: $memperc%
    @@ -233,6 +238,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
    /set aspell.dict.exec.exec.weather fr
    /trigger add weather command weather
    /trigger set weather regex "/\s/_/tg_argv_eol1"
    @@ -242,7 +248,8 @@ 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 command "/command -buffer exec.exec.weather core /buffer set title ${tg_message_nocolor}"
    /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}"


    I created this trigger to change the title of the buffer from _Executed commands_ to _Weather for City: Montreal, Canada_.
    @@ -271,7 +278,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 "${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}}"
    /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}}"
    /set buflist.format.hotlist_highlight "${color:163}"
    /set buflist.format.hotlist_message "${color:229}"
    @@ -281,7 +288,7 @@ Note: show channels and privates buffers under their respective server instead o
    /set weechat.bar.buflist.size_max 18


    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.
    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.


    ### Bar active title
  27. @pascalpoitras pascalpoitras revised this gist May 20, 2017. 1 changed file with 9 additions and 5 deletions.
    14 changes: 9 additions & 5 deletions myweechat.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    ![WeeChat Screenshot](http://192.99.68.133/2016-11-21-181851_1920x1080_scrot.png)
    ![WeeChat Screenshot](http://192.99.68.133/2017-05-20-010246_1920x1080_scrot.png)


    ## Enable mouse support
    @@ -271,13 +271,17 @@ 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}:${color:239}}${format_number}${indent}${color_hotlist}${name}"
    /set buflist.format.buffer_current "${if:${type}==server?${color:*white,31}:${color:*white}}>> ${indent}${color_hotlist}${name}"
    /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}}"
    /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}}"
    /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 weechat.bar.buflist.size_max 14
    /set weechat.bar.buflist.size 18
    /set weechat.bar.buflist.size_max 18


    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.


    ### Bar active title
    @@ -562,7 +566,7 @@ The _weechat.color.chat_host_ option will also set this color for part and quit.
    /set weechat.color.chat_highlight lightred
    /set weechat.color.chat_highlight_bg default
    /set weechat.color.chat_nick_colors 25,31,37,43,49,61,67,73,79,85,97,103,109,115,121,133,139,145,151,157,163,169,175,181,187,193,199,205,211,217,223,229
    /set weechat.color.chat_prefix_more 229
    /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
  28. @pascalpoitras pascalpoitras revised this gist May 17, 2017. 1 changed file with 0 additions and 16 deletions.
    16 changes: 0 additions & 16 deletions myweechat.md
    Original file line number Diff line number Diff line change
    @@ -432,22 +432,6 @@ _/exec -sh -pipe "/input delete_line;/input insert " $* 2>&1 | curl -sF c=@- htt
    Well If we use this, the input bar will be filled with the command and not the url.


    ## Auto hide channels after inactivity and reattach on activity


    /trigger addoff buf_activity_unhide print ""
    /trigger set buf_activity_unhide conditions "${buffer.hidden} == 1 && ${tg_tag_notify} == message"
    /trigger set buf_activity_unhide command "/command -buffer irc.$server.$channel core /buffer unhide"

    /trigger addoff buf_inactivity_hide timer 10000;0;0
    /trigger set buf_inactivity_hide command "/allchan -exclude=#weechat* /eval /perlexec weechat::command('', '/command -buffer irc.\${server}.\${channel} core /buffer hide') if (${date:%s} - \${buffer[\${info:irc_buffer,\${server},\${channel}}].lines.last_line.data.date} > 300 && '\${buffer[\${info:irc_buffer,\${server},\${channel}}].hotlist}' eq '0x0')"

    /alias add toggle_auto_hide /trigger toggle buf_activity_unhide buf_inactivity_hide


    Hide channels buffer after 5 minutes of inactivity (joins parts and quits are also activity) but only if there's no unread message. Unhide whenever someone said something.


    ## Highlight


  29. @pascalpoitras pascalpoitras revised this gist May 17, 2017. 1 changed file with 0 additions and 4 deletions.
    4 changes: 0 additions & 4 deletions myweechat.md
    Original file line number Diff line number Diff line change
    @@ -445,12 +445,8 @@ Well If we use this, the input bar will be filled with the command and not the u
    /alias add toggle_auto_hide /trigger toggle buf_activity_unhide buf_inactivity_hide


    TL;DR

    Hide channels buffer after 5 minutes of inactivity (joins parts and quits are also activity) but only if there's no unread message. Unhide whenever someone said something.

    By default, buffer's notify level is set to 3 which means that any highlight or message from users will add the channel to the hotlist (but not joins, parts, quits...). Now, the two triggers above will hide a channel buffer if the channel is not in the hotlist AND there was no activity since 5 minutes. However, no activity means no activity at all (not even joins, parts, quits, nicks) instead of only highlight and message. So, if nobody said anything on a channel the last 30 minutes but a user joined the last 30 seconds, the channel will not be hidden. For me this is not a problem because I use smart filter, so 99% of the joins, parts and quits messages are hidden. If you want something better you might write a script to check that the last line tags contains irc_privmsg. Here's the reason why you need to write a script: we can't access shared_string (i.e ${buffer.lines.last_line.data.1|tags_array) as we can when scripting (As far as I know). The other trigger is to unhide the buffer whenever someone say something. Also, I use /perlexec only to substract last line epoch time from current epoch time.


    ## Highlight

  30. @pascalpoitras pascalpoitras revised this gist May 16, 2017. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion myweechat.md
    Original file line number Diff line number Diff line change
    @@ -445,7 +445,11 @@ Well If we use this, the input bar will be filled with the command and not the u
    /alias add toggle_auto_hide /trigger toggle buf_activity_unhide buf_inactivity_hide


    By default, buffer's notify level is set to 3 which means that any highlight or message from users will add the channel to the hotlist (but not joins, parts, quits...). Now, the two triggers above will hide a channel buffer if the channel is not in the hotlist AND there was no activity since 5 minutes. However, no activity means no activity at all (not even joins, parts, quits, nicks) instead of only highlight and message. So, if nobody said anything on a channel the last 30 minutes but a user joined the last 30 seconds, the channel will not be hidden. For me this is not a problem because I use smart filter, so 99% of the joins, parts and quits messages are hidden. If you want something better you might write a script to check that the last line tags contains irc_privmsg. Here's the reason why you need to write a script: we can't access shared_string (i.e ${buffer.lines.last_line.data.1|tags_array) as we can when scripting (As far as I know). The other trigger is to unhide the buffer whenever someone say something. Also, I use /perlexec only to substract last line epoch time tfrom current epoch time.
    TL;DR

    Hide channels buffer after 5 minutes of inactivity (joins parts and quits are also activity) but only if there's no unread message. Unhide whenever someone said something.

    By default, buffer's notify level is set to 3 which means that any highlight or message from users will add the channel to the hotlist (but not joins, parts, quits...). Now, the two triggers above will hide a channel buffer if the channel is not in the hotlist AND there was no activity since 5 minutes. However, no activity means no activity at all (not even joins, parts, quits, nicks) instead of only highlight and message. So, if nobody said anything on a channel the last 30 minutes but a user joined the last 30 seconds, the channel will not be hidden. For me this is not a problem because I use smart filter, so 99% of the joins, parts and quits messages are hidden. If you want something better you might write a script to check that the last line tags contains irc_privmsg. Here's the reason why you need to write a script: we can't access shared_string (i.e ${buffer.lines.last_line.data.1|tags_array) as we can when scripting (As far as I know). The other trigger is to unhide the buffer whenever someone say something. Also, I use /perlexec only to substract last line epoch time from current epoch time.


    ## Highlight