How to tweak your panel layouts

I'm a chronic tweaker; I can't help myself and if I can edit a config file by hand I'm even happier. I love being able to switch layouts easily using Mate Tweak or the command line (mate-panel --reset --layout) and figured that by editing the existing layouts I could easily reset or migrate my preferred layout without having manually change the way I prefer my panel as I reset them.

In particular, I found re-adding my program short cuts was quite tedious using the UI, not least because I could never seem to drag into the position that I wanted without uneven gaps.

By default, the panel layouts are located in /usr/share/mate-panel/layouts

Open this directory and you'll find a config file for each of the available layouts, each corresponding to what you'll find in the Mate Tweak tool. They are just text files so open them up and have a look; the syntax is very straight forward.

From here, I suggest you start with the layout closest to what you want to achieve and copy it. For me that was the redmond-fresh layout. I wanted my new layout to be the default so I backed up the old one and copied redmond-fresh.layout to default.layout.

Once I did that I opened it up and made the following changes:

  • Moved the panel to the top of the screen
  • Made the top panel 20 pixels (hey, I have a small laptop!)
  • Added all the program shortcuts I wanted

You get the idea. Now when reset the panel to default, it refreshes it exactly the way I like and it even spaces my short cuts exactly the way I like. I can also take this file with me (it now lives in my config files git repo) and reuse it elsewhere or when I nuke and pave.

Here's a screen shot of my panel, with my default layout file open in Pluma


You can also customise a panel layout to suit your needs and then use my panel dumper script to backup the layout☺

I’m hoping to integrate this into Ubuntu MATE at some point.


That’s awesome @Wimpy, thanks

Thank you for this. But how to set default colors for panels? That’s important too. Awfully it took me a lot of time to figure out that there’s not a command to change layouts without mate-tweak. I want to put a layout change button on screen because I have a work layout and a normal everyday layout. Now I can change the default layout, but I don’t know how to set the default colors which are stored in the same folder with “.panel” ending. I can compromise with having the same colors for both of my layouts. But still why is this so complicated if mate-tweak can do it?