WeeChat – Create a layout menu

WeeChat - layout menu

I just discovered the menu.pl script by Nei. It adds a menubar at the top of WeeChat. You can use the mouse and it works very well. Tonight I played with it and that was nice. In this post, I will show you how to create a layout menu to switch between your layouts. Let’s start!

Install the script :

/script install menu.pl

Now you should have a menubar at the top of WeeChat :

WeeChat Layout 1

Change visual settings

You can change the foreground and background color of the bar as you want :

/set weechat.bar.main_menu.color_bg default
/set weechat.bar.main_menu.color_fg 31

And maybe add the separator :

/set weechat.bar.main_menu.separator on

WeeChat Layout 2

Now, if you click on a menu you should see a submenu appears. Let’s use the same color as the menubar :

/set weechat.bar.sub_menu.color_bg default
/set weechat.bar.sub_menu.color_fg 31

Click on File menu and you should see something like this :

WeeChat Layout 3

If you look closely, you should see that the menu items are side by side. If you want to have them stacked one above the others, type :

/set weechat.bar.sub_menu.filling_top_bottom vertical

It should give something similar to this :

WeeChat Layout 4

Create the menu and the menu items

Now that we like the way it looks, let’s remove all the menus and then add one called Layout.

/unset menu.var.1.*
/unset menu.var.2.*
/unset menu.var.3.*
/unset menu.var.4.*
/unset menu.var.5.*
/unset menu.var.6.*
/unset menu.var.7.*
/unset menu.var.8.*
/unset menu.var.9.*

Before we procede, do you have more than one layout? If you don’t know, you probably have only one. The example here is still possible but when you’ll click on a menu item nothing would appears except an error message from WeeChat. I already wrote a tutorial on how to create more than one layout. That beeing said, let’s create the menu and add two menu items, one for layout Normal and one for layout News :

/set menu.var.1.name "&Layout"
/set menu.var.1.1.name "Normal"
/set menu.var.1.1.command "/layout apply normal"
/set menu.var.1.2.name "News"
/set menu.var.1.2.command "/layout apply news"

WeeChat Layout 5

That’s it. Enjoy!

2 thoughts on “WeeChat – Create a layout menu

    • Hi XimTuS,

      I’m sorry i did not understandd what you mean.
      If you are talking about the colors of the nicks (cause it the only change I made about nicks) type :
      /set weechat.color.chat_nick_colors 19,25,31,37,43,49,55,61,67,73,79,85,91,97,103,109,115,121,127,133,139,145,151,157,163,169,175,181,187,193,199,205,211,217,223,229

Leave a Reply