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

4 Likes

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.

2 Likes

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?

Sorry to bring back this necro thread, but I have been trying to edit my panel layout. I can get some things to stick but for example, I am trying to add Brave to my panel next to or between the desktop icon and the evolution icon in the Redmond layout.

image

I think it’s my ā€œcodingā€ more than it is anything else because I have modified my .layout file and have seen the panel change accordingly for other things, so I know I am in the right file.

I have looked all over to try and find help/instructions on how to ā€œcodeā€ the .layout but have not been able to find a source other than some examples here and there.

Here is my layout for reference.

[Toplevel bottom]
enable-buttons=false
size=38
screen=0
monitor=0
expand=true
orientation=bottom

[Object briskmenu]
panel-right-stick=false
position=0
relative-to-edge=start
applet-iid=BriskMenuFactory::BriskMenu
locked=true
toplevel-id=bottom
object-type=applet

[Object showdesktopapplet]
panel-right-stick=false
position=10
relative-to-edge=start
applet-iid=WnckletFactory::ShowDesktopApplet
locked=true
toplevel-id=bottom
object-type=applet

[Object brave]
panel-right-stick=false
menu-path=applications:/
position=20
relative-to-edge=start
launcher-location=/user/share/applications/Brave
locked=true
toplevel-id=bottom
object-type=launcher

[Object evolution]
panel-right-stick=false
menu-path=applications:/
position=30
launcher-location=/usr/share/applications/org.gnome.Evolution.desktop
relative-to-edge=start
locked=true
toplevel-id=bottom
object-type=launcher

[Object window-list]
panel-right-stick=false
position=50
relative-to-edge=start
applet-iid=WnckletFactory::WindowListApplet
locked=true
toplevel-id=bottom
object-type=applet

[Object drivemountapplet]
panel-right-stick=true
position=20
relative-to-edge=end
applet-iid=DriveMountAppletFactory::DriveMountApplet
locked=true
toplevel-id=bottom
object-type=applet

[Object notification-area]
panel-right-stick=true
position=10
relative-to-edge=end
applet-iid=NotificationAreaAppletFactory::NotificationArea
locked=true
toplevel-id=bottom
object-type=applet

[Object indicatorappletcomplete]
panel-right-stick=true
position=0
relative-to-edge=end
applet-iid=IndicatorAppletCompleteFactory::IndicatorAppletComplete
locked=true
toplevel-id=bottom
object-type=applet

[Customsetting maximusdecoration]
mate-maximus-recorded=False

[Customsetting windowcontrollayout]
mate-general=:minimize,maximize,close
mate-interface=:minimize,maximize,close
gnome-wm-preferences=:minimize,maximize,close

For the {Object brave] I have tried the following variations:

[Object brave]
panel-right-stick=false
menu-path=applications:/
position=20
relative-to-edge=start
launcher-location=/user/share/applications/org.gnome..Brave.desktop
locked=true
toplevel-id=bottom
object-type=launcher

[Object brave]
panel-right-stick=false
menu-path=applications:/
position=20
relative-to-edge=start
applet-iid=BraveFactory::ShowBraveApplet
locked=true
toplevel-id=bottom
object-type=launcher

And I few others, but I did not document all of them. Plus I was totally guessing with the applet-iid. I had no idea what that was or where I could find it.

Any suggestions would be appreciated.

Is the ".." in the path a mis-type?

I know that we tend to vocalize /usr as "user", but is "/user" also a mis-type and should the path be

/usr/share/applications/org.gnome.Brave.desktop


I can understand the urge to "tweak" the panel via the stored configuration (text) file, but wouldn't it be simpler to just "drag+drop" the icon from the system menu onto the Panel, then do those tweaks on the resulting file?

Just make sure that before making changes to the Panel layout, you right-click on the icons that need to move, and "uncheck" the "Lock to panel" option. That will make those free to be dragged around for a new placement and allow auto-adjust if you want to drop a new icon between the other two that you mentioned.

To make sure there is no doubt as to which of the files under

/usr/share/mate-panel/layouts

that you then need to tweak, I strongly recommend you save the new configuration as a "Named Layout" using MATE Tweak.

To do that, follow the guidance provided in the bottom half of the this posting.

If you go straight to text editing of the *.layout file, I think you may need to either reboot or restart the systemd service that manages the Panel interraction to force it to reload your modified *.layout file.

IMPORTANT: When I saved my custom Panel layout, the system saved two files with the same "custom-named" basename, but one file with each of the suffixes as follows:

-rw-rw-r-- 1 root root 4266 Mar 21  2021 Oasis_DEFAULT-tweak.layout
-rw-rw-r-- 1 root root 3942 Mar 21  2021 Oasis_DEFAULT-tweak.panel


There is this other discussion, which does involve the dual-file custom panel setup. It may offer you some other insights.



This other discussion gets into a number of aspects and "gotchas" relating to Panel customization. It also may offer some other insights.

2 Likes

Thanks for the reply. I changed the misspelling and it did not help and I tried a reboot and no difference.

And yes, I would rather just drag and drop, but for whatever reason, I can’t drag anything to the section on the far left. Well, I drag and drop but nothing happens. It seems to be a special place on the panel. IDK. When I first installed MATE, there were three icons there, with one of them being Firefox, but I don’t use FF so I was easily able to delete it but I have not been able to add anything to that section since.

Also, I am using a custom panel with two files as you listed in your post.

2 Likes

Comparing your *.layout with my own, you seem to have the "relative-to-edge" in every App config.

There are no such references in my own *.layout file. Maybe consider removing all those references unless you know of a specific reason why they should be there?



Also, your *.layout file has this entry:

[Customsetting maximusdecoration]
mate-maximus-recorded=False

My own file has this entry:

[Customsetting maximusdecoration]
mate-maximus-undecorate=False
mate-maximus-recorded=True

Maybe substitute my version of that code segment to see what happens?



Your image shows a Panel layout which is horizontal.

One reference states that the "panel-right-stick" is intended for layout control on a vertical Panel!

HOWEVER ... my own 2-Panel horizontal layout does contains some references to that parameter so ... not sure whether you should or should not leave those in your layout file. I guess that choice is up to you!
:slight_smile:



Image for my two panels, "Top" and "Bottom" respectively:

SNAPSHOT__Panel_Top

SNAPSHOT__Panel_Bottom

Maybe we need to compare the two "*.panel" files.


My files are are follows:

[*.layout file]

[Toplevel top]
enable-buttons=false
size=28
screen=0
monitor=0
expand=true
orientation=top

[Toplevel bottom]
enable-buttons=false
size=28
screen=0
monitor=0
expand=true
orientation=bottom

[Object briskmenu]
locked=true
toplevel-id=top
position=0
object-type=applet
applet-iid=BriskMenuFactory::BriskMenu
panel-right-stick=false

[Object firefox]
launcher-location=/usr/share/applications/firefox.desktop
locked=true
toplevel-id=top
position=10
object-type=launcher
menu-path=applications:/
panel-right-stick=false

[Object notification-area]
locked=true
toplevel-id=top
position=10
object-type=applet
applet-iid=NotificationAreaAppletFactory::NotificationArea
panel-right-stick=true

[Object indicatorappletcomplete]
locked=true
toplevel-id=top
position=0
object-type=applet
applet-iid=IndicatorAppletCompleteFactory::IndicatorAppletComplete
panel-right-stick=true

[Object show-desktop]
locked=true
toplevel-id=bottom
position=0
object-type=applet
applet-iid=WnckletFactory::ShowDesktopApplet
panel-right-stick=false

[Object window-list]
locked=true
toplevel-id=bottom
position=20
object-type=applet
applet-iid=WnckletFactory::WindowListApplet
panel-right-stick=false

[Object workspace-switcher]
locked=true
toplevel-id=bottom
position=10
object-type=applet
applet-iid=WnckletFactory::WorkspaceSwitcherApplet
panel-right-stick=true

[Object trashapplet]
locked=true
toplevel-id=bottom
position=0
object-type=applet
applet-iid=TrashAppletFactory::TrashApplet
panel-right-stick=true

[Object object-1]
launcher-location=/usr/share/applications/gparted.desktop
locked=false
toplevel-id=top
position=248
object-type=launcher
menu-path=applications:/
panel-right-stick=false

[Object object-3]
launcher-location=mate-terminal.desktop
locked=false
toplevel-id=top
position=323
object-type=launcher
menu-path=applications:/
panel-right-stick=false

[Object object-0]
launcher-location=/usr/share/applications/caja-browser.desktop
locked=false
toplevel-id=top
position=362
object-type=launcher
menu-path=applications:/
panel-right-stick=false

[Object object-2]
launcher-location=/usr/share/applications/synaptic.desktop
locked=false
toplevel-id=top
position=283
object-type=launcher
menu-path=applications:/
panel-right-stick=false

[Object object-4]
launcher-location=/usr/share/applications/mate-screenshot.desktop
locked=false
toplevel-id=top
position=401
object-type=launcher
menu-path=applications:/
panel-right-stick=false

[Object object-5]
launcher-location=/usr/share/applications/libreoffice-startcenter.desktop
locked=false
toplevel-id=top
position=441
object-type=launcher
menu-path=applications:/
panel-right-stick=false

[Object object-6]
launcher-location=/usr/share/applications/org.gnome.Firmware.desktop
locked=false
toplevel-id=top
position=208
object-type=launcher
menu-path=applications:/
panel-right-stick=false

[Object object-7]
locked=true
toplevel-id=top
position=1092
object-type=applet
applet-iid=ClockAppletFactory::ClockApplet
panel-right-stick=false

[Object object-8]
locked=true
toplevel-id=top
position=972
object-type=applet
applet-iid=CPUFreqAppletFactory::CPUFreqApplet
panel-right-stick=false

[Object object-8]
locked=true
toplevel-id=top
position=972
object-type=applet
applet-iid=CPUFreqAppletFactory::CPUFreqApplet
panel-right-stick=false

[Object object-9]
locked=true
toplevel-id=top
position=1241
object-type=applet
applet-iid=CharpickerAppletFactory::CharpickerApplet
panel-right-stick=false

[Object object-10]
launcher-location=/usr/share/applications/thunderbird.desktop
locked=true
toplevel-id=top
position=118
object-type=launcher
menu-path=applications:/
panel-right-stick=false

[Object object-11]
launcher-location=/usr/share/applications/gimp.desktop
locked=false
toplevel-id=top
position=492
object-type=launcher
menu-path=applications:/
panel-right-stick=false

[Object object-12]
launcher-location=/usr/share/applications/tkcon-console.desktop
locked=false
toplevel-id=top
position=545
object-type=launcher
menu-path=applications:/
panel-right-stick=false

[Customsetting maximusdecoration]
mate-maximus-undecorate=False
mate-maximus-recorded=True

[Customsetting windowcontrollayout]
mate-general=:minimize,maximize,close
mate-interface=:minimize,maximize,close
gnome-wm-preferences=:minimize,maximize,close

[*.panel file]

[general]
object-id-list=['briskmenu', 'firefox', 'notification-area', 'indicatorappletcomplete', 'show-desktop', 'window-list', 'workspace-switcher', 'trashapplet', 'object-1', 'object-3', 'object-0', 'object-2', 'object-4', 'object-5', 'object-6', 'object-7', 'object-8', 'object-8', 'object-9', 'object-10', 'object-11', 'object-12']
toplevel-id-list=['top', 'bottom']

[objects/briskmenu]
applet-iid='BriskMenuFactory::BriskMenu'
locked=true
object-type='applet'
position=0
toplevel-id='top'

[objects/firefox]
launcher-location='/usr/share/applications/firefox.desktop'
locked=true
menu-path='applications:/'
object-type='launcher'
position=10
toplevel-id='top'

[objects/indicatorappletcomplete]
applet-iid='IndicatorAppletCompleteFactory::IndicatorAppletComplete'
locked=true
object-type='applet'
panel-right-stick=true
position=0
toplevel-id='top'

[objects/notification-area]
applet-iid='NotificationAreaAppletFactory::NotificationArea'
locked=true
object-type='applet'
panel-right-stick=true
position=10
toplevel-id='top'

[objects/object-0]
launcher-location='/usr/share/applications/caja-browser.desktop'
object-type='launcher'
panel-right-stick=false
position=362
toplevel-id='top'

[objects/object-1]
launcher-location='/usr/share/applications/gparted.desktop'
object-type='launcher'
panel-right-stick=false
position=248
toplevel-id='top'

[objects/object-10]
launcher-location='/usr/share/applications/thunderbird.desktop'
locked=true
object-type='launcher'
panel-right-stick=false
position=118
toplevel-id='top'

[objects/object-11]
launcher-location='/usr/share/applications/gimp.desktop'
object-type='launcher'
panel-right-stick=false
position=492
toplevel-id='top'

[objects/object-12]
launcher-location='/usr/share/applications/tkcon-console.desktop'
object-type='launcher'
panel-right-stick=false
position=545
toplevel-id='top'

[objects/object-2]
launcher-location='/usr/share/applications/synaptic.desktop'
object-type='launcher'
panel-right-stick=false
position=283
toplevel-id='top'

[objects/object-3]
launcher-location='mate-terminal.desktop'
object-type='launcher'
panel-right-stick=false
position=323
toplevel-id='top'

[objects/object-4]
launcher-location='/usr/share/applications/mate-screenshot.desktop'
object-type='launcher'
panel-right-stick=false
position=401
toplevel-id='top'

[objects/object-5]
launcher-location='/usr/share/applications/libreoffice-startcenter.desktop'
object-type='launcher'
panel-right-stick=false
position=441
toplevel-id='top'

[objects/object-6]
launcher-location='/usr/share/applications/org.gnome.Firmware.desktop'
object-type='launcher'
panel-right-stick=false
position=208
toplevel-id='top'

[objects/object-7]
applet-iid='ClockAppletFactory::ClockApplet'
locked=true
object-type='applet'
panel-right-stick=false
position=1092
toplevel-id='top'

[objects/object-7/prefs]
custom-format=''
format='24-hour'

[objects/object-8]
applet-iid='CPUFreqAppletFactory::CPUFreqApplet'
locked=true
object-type='applet'
panel-right-stick=false
position=972
toplevel-id='top'

[objects/object-9]
applet-iid='CharpickerAppletFactory::CharpickerApplet'
locked=true
object-type='applet'
panel-right-stick=false
position=1241
toplevel-id='top'

[objects/show-desktop]
applet-iid='WnckletFactory::ShowDesktopApplet'
locked=true
object-type='applet'
position=0
toplevel-id='bottom'

[objects/trashapplet]
applet-iid='TrashAppletFactory::TrashApplet'
locked=true
object-type='applet'
panel-right-stick=true
position=0
toplevel-id='bottom'

[objects/window-list]
applet-iid='WnckletFactory::WindowListApplet'
locked=true
object-type='applet'
position=20
toplevel-id='bottom'

[objects/workspace-switcher]
applet-iid='WnckletFactory::WorkspaceSwitcherApplet'
locked=true
object-type='applet'
panel-right-stick=true
position=10
toplevel-id='bottom'

[toplevels/bottom]
expand=true
orientation='bottom'
screen=0
size=28
y=872
y-bottom=0

[toplevels/top]
expand=true
orientation='top'
screen=0
size=28

Thanks for all the suggestions, but I still can’t get it the way I want it. I’m going to take a break from it for a bit. I find if I step away and come back to it later, the solution seems to present itself.

I will keep you posted.

On my side, I use the dock in the panel. Easy to pin any apps with it. Do you know? Did you test it?

I don’t know what the dock is, but I want to put things in the section of the panel where the Menu is, but I have never been able to figure it out.

Stephen, maybe I am missing something about what you want to do but dragging and dropping is not needed to add applications to the panel.

Here is my panel:

panel

Right click ā€˜add to panel’ does the same thing as dragging and dropping:

No dragging and dropping needed. Once there you can drag it to where you want it and lock it, you might have to unlock other applets first to get it where you want it. I always delete the show desktop and Firefox applets that are default after the menu and add the text editor, film manager and terminal.

Be careful if you use Windows list and to move it out of the way or the new applets will cover it up.

windows list

I am able to add things to the panel with either drag and drop or the + TO PANEL option as you described, but there is a specific section of the panel where the Menu is and that is the area I am trying to edit and as you can see, there are no options to add to the panel.

I can delete things like this by editing the .layout file…

But I can’t add anything. I think it has to do with not knowing the code for the .layout file but I can’t find any references for this.

It’s showing it locked to panel. I have you tried unlocking it and seeing if it will delete? You cannot delete applets if locked to panel.

I had something like that when I had put ā€˜notification area’ on my panel. Nothing there but I didn’t get any notifications either. Just trying to brainstorm no real answer for you.

Sure. I can delete them but there is no option to add to panel.

It’s maddening.

In my layout, the panel has 3 sections. There is a small section to the left with the Menu, Desktop and Evolution. Then there is a separator to the right of Evolution and that starts section two of the panel. I can add and delete anything I want to section two, but the first section, I can only remove things. I cannot add anything.

Here is my layout code… and this is the part that is frustrating… I cannot find any documentation on this code. If I could reference what all of the options are and what they mean, I might be able to figure this out. But I have searched the github MATE Panel and the MATE Wiki and there is nothing explaining what the code does.

[Toplevel bottom]
enable-buttons=false
size=38
screen=0
monitor=0
expand=true
orientation=bottom

[Object briskmenu]
panel-right-stick=false
position=0
relative-to-edge=start
applet-iid=BriskMenuFactory::BriskMenu
locked=true
toplevel-id=bottom
object-type=applet

[Object showdesktopapplet]
panel-right-stick=false
position=10
relative-to-edge=start
applet-iid=WnckletFactory::ShowDesktopApplet
locked=true
toplevel-id=bottom
object-type=applet

[Object brave]
panel-right-stick=false
menu-path=applications:/
position=20
relative-to-edge=start
launcher-location=/user/share/applications/Brave
locked=true
toplevel-id=bottom
object-type=launcher

[Object evolution]
panel-right-stick=false
menu-path=applications:/
position=30
launcher-location=/usr/share/applications/org.gnome.Evolution.desktop
relative-to-edge=start
locked=true
toplevel-id=bottom
object-type=launcher

Stephen, don't try to place the Brave launcher directly where you want it. Instead, you can place that App launcher anywhere that is allowed on the Panel, then move it to your desired placement position.

Have you tried that?

Just make sure the icons where you want to move it are all "unlocked".

Just be sure to save the new layout afterwards. :slight_smile:



Maybe you need to check out this earlier posting:

I didn't see anything too explicit, but maybe a review of that code would help. :slight_smile:



There is also this helpful "Intro" previously posted by Eugene:

2 Likes

For sh!ts and giggles remove the separator next to Evolution and then try and add a Brave launcher next to the Evolution launcher.If you can add the Brave launcher then re-add the separator next to the Brave launcher.

I've been digging around to see what I can find.


Two Panel "Help" pages (admittedly short on details), which may give you the kind of insights you are looking for, are the following:




But if we go "back in time" for insights, I scanned these pages and they might have what you are looking for:

Hopefully, some of that will help! :slight_smile:

1 Like

That sounds like a good idea, but I don’t know how to move/delete the separator. That’s part of the problem. I don’t see it in the code but it is there in practice.

HALLELUJAH, GESUNDHEIT AND GOODNIGHT!!!

Screenshot at 2025-08-18 22-04-55

@ericmarceau is my hero.

The trick is instead of dragging it and trying to drop it, I added it to the panel, unlocked all the icons, right clicked on Brave and then clicked on MOVE. I was then able to move it where I wanted it… which is exactly what you said.

Good grief. It is such a stupid, silly little fix that I should have figured it out but instead, it has been driving me nuts for the better part of 2 years. I just always assumed dragging and dropping the icon was the same functionality as the MOVE option on the context menu of the icon was so I simply never bothered.

I feel both stupid and relieved at the same time. Part of me feels like George Costanza when he walked out after telling a funny joke. I just want to shut down my pc and walk away and never come back because it just won’t get better than this.

Lol.

3 Likes