WeeChat – the buffer_autoset script

WeeChat's statusbar properties

Suppose you want to see a custom message in the WeeChat’s titlebar when you chat with r3m, you’re best friend, on Freenode IRC network. You could type the following :

/query r3m
/buffer set title My best friend

But this is temporary. You will loose all the change you made as soon as you will close the query.

Fix that with a WeeChat script

The buffer_autoset.py script for WeeChat can set permanent change to buffer properties. So as you may have noticed in the above command, the property we want to automatically modify is named Title. Here is the solution :

/script install buffer_autoset.py
/autosetbuffer add irc.freenode.r3m title My best friend !
/query r3m

Replace irc.freenode.r3m by *.r3m if you want to see this on every network.

Now if you want to see your whole list of custom buffer properties type the following :


If you want to delete the example above :

/autosetbuffer del irc.freenode.r3m.title

Another example

Now suppose you want to highlight every line that contain, at least, one of the following words :

  • haha
  • lol
  • rofl
  • lmao

because you dont want to miss anything funny! Well, there is also a  property for that named highlight_words :

/autosetbuffer add irc.freenode.#weechat highlight_words haha,lol,rofl,lmao

Note that you must close the buffer #weechat and open it again because buffer_autoset apply this upon buffer creation! (A simple /cycle do not works)


One thought on “WeeChat – the buffer_autoset script

  1. Pingback: WeeChat - my favorites scripts | pascalpoitraspascalpoitras

Leave a Reply

Your email address will not be published. Required fields are marked *