Hi dibblego, welcome to the community
In MATE-desktop 1.24 ~/.config/mate/panel2.d/default/launchers/
is indeed generated when you add a launcher.
In MATE-desktop 1.26 this is no longer the case, everything is done in dconf
I guess the panel2.d directory is deprecated.
If you want to make a script to add panel-applets and launchers there are two commands you can use to get or set variables
dconf and gsettings
dconf examples:
dconf read /org/mate/panel/objects/workspace-switcher/locked
dconf write /org/mate/panel/objects/workspace-switcher/locked true
gsettings examples:
gsettings get org.mate.panel locked-down
gsettings set org.mate.panel locked-down false
gsettings is to edit keyvalues by following schemas
dconf is to edit keyvalues by following paths
(see the respective man pages)
To get into the mindset of gsettings try:
gsettings list-schemas
or:
gsettings list-recursively org.mate.panel
To get an idea what dconf can do:
dconf dump /org/mate/panel/
Actually, gsettings and dconf are the only commands you can use to do what you want. Luckily these are also the only ones you need
As a last example -> I added dconf-editor to the panel:
To list the visible items:
dconf read /org/mate/panel/general/object-id-list
which gives something like:
[ 'object-0' , 'object-1' , 'object-2' , 'object-3' ]
to add a launcher description:
cat<<LAUNCHER | dconf load /org/mate/panel/objects/
[object-4]
launcher-location='/usr/share/applications/ca.desrt.dconf-editor.desktop'
object-type='launcher'
panel-right-stick=false
position=116
toplevel-id='top'
LAUNCHER
To make your own item visible:
dconf write /org/mate/panel/general/object-id-list "[ 'object-0' , 'object-1' , 'object-2' , 'object-3' , 'object-4' ]"
Now you have added your launcher, it should be visible on the panel
P.S. I named the launcher 'object-4' but actually it can be any name as long as it's unique