WeeChat DevCenter

Tag - buffer

Entries feed

Wednesday, December 11 2013

Auto renumber of buffers

Auto renumber of buffers can now be disabled.

Two options have been added:

  • weechat.look.buffer_auto_renumber
  • weechat.look.buffer_position

A bar item has beed added as well:

  • buffer_last_number

When auto renumber is disabled, gaps between buffer numbers are allowed and the first buffer can have a number greater than 1.

Following options for command /buffer are affected when auto renumber is off:

  • move:
    • the current number will be left free for use, and the target number can be any number >= 1 (possibly higher than the current last buffer number)
    • the value can be "-" (which moves the buffer to number 1) or "+" (which moves the buffer to the end, ie last number + 1)
  • swap:
    • now the buffers are swapped in the list without being "moved"
  • (+/-)N:
    • it is now working with gaps in buffer numbers
  • merge:
    • it can now merge a group of merged buffers into another buffer (or buffers merged themselves)

Tuesday, November 1 2011

So many ways to go to first buffer...

  1. key Alt+1
  2. key Alt+j, then 0, then 1
  3. key F5 *
  4. key F6 *
  5. key Ctrl+p *
  6. key Ctrl+n *
  7. key Alt+Left *
  8. key Alt+Right *
  9. key Alt+Up *
  10. key Alt+Down *
  11. key Alt+a (if buffer #1 is first in hotlist)
  12. left mouse button with long gesture to the left (with mouse enabled)
  13. command /buffer 1
  14. command /buffer core.weechat (if core buffer is #1)
  15. command /buffer close 2-99999 (joke! - this will destroy all buffers and keep only buffer(s) with number 1)
  16. command /buffer move 1 (joke! - current buffer will become #1)

There are other ways with scripts, but it's cheating!

* : press key many times until you reach buffer #1.

Friday, October 28 2011

Change short name of buffers

The short name of buffers can be changed with /buffer set short_name <new_name> command. This might be useful for long channel names displayed in the buffers bar (buflist plugin with WeeChat ≥ 1.8 or script buffers.pl with an older version).

For example on channel #weechat:

/buffer set short_name #wee

New value is used immediately, but is not saved in config file. To make it persistent, you have to use script buffer_autoset.py:

/autosetbuffer add irc.freenode.#weechat short_name #wee

Note1: it's not recommended to set short name of query buffers, because WeeChat will change name of buffer when nick changes.

Note2: you should use command /buffer set with precautions, it is not recommended to change other buffer properties if you're not sure about what you do. This could lead to weird behaviour or a crash.

Wednesday, June 15 2011

Highlight with regex in specific buffers

A local variable "highlight_regex" has been added in buffers.

It is recommended to use script buffer_autoset.py to set it, so that it's saved and set at any time when buffer is created.

However, it's still possible to set it manually (for testing) with command: /buffer set highlight_regex XXX.

For example, to highlight all messages on server freenode, channel #test:

/autosetbuffer add irc.freenode.#test highlight_regex .*

Tuesday, December 7 2010

Colored time for messages

It is now possible to add color in time displayed for each line in formated buffers.

Option weechat.look.buffertimeformat now supports colors with format: "${xxx}" where "xxx" is a color name (lightblue, red, ...) or a number (for example: "214" for orange).

Note: updated in 0.4.2, the syntax is now: "${color:xxx}".

Screenshot of colored time, with french flag colors:

French time

Friday, January 1 2010

Target buffer for IRC messages

New options have been added to choose target buffer for IRC messages.

More info and examples in documentation: https://weechat.org/doc/devel/user#irc_target_buffer

Wednesday, June 10 2009

Merge of buffers

It is now possible to merge buffers with command /buffer merge (or unmerge). IRC plugin uses that feature to merge server buffers, with the new option irc.look.server_buffer (merge_with_core, merge_without_core, independent).

When a buffer is merged to one or more other buffers, they will have same number, and chat area will display mixed lines (short name of buffer is displayed on each line, to know to which buffer line belongs). Bars still display content for current selected buffer.

New key Ctrl+x has been added to swtich current active buffer when many buffers are merged (old key Alt+s has been removed).

For devel users: it's not possible to upgrade from previous versions to this one, and you should do /key missing to add missing key.