I will do such customization on Ubuntu MATE 20.04 LTS in four steps:
-
Save current Dconf settings for MATE Panel to text file by
dconf dump /org/mate/panel/ > ~/dconf-panel-old
-
Do configuration customizations as usual by mouse and keyboard (without script).
-
Save updated Dconf settings to text file by
dconf dump /org/mate/panel/ > ~/dconf-panel-new
-
Load updated settings by
dconf load /org/mate/panel/ < ~/dconf-panel-new
Then you can change MATE Panel configuration programmatically as follows:
dconf load /org/mate/panel/ << EOF
# below are the contents of file ~/dconf-panel-new
[general]
object-id-list=['firefox', 'notification-area', 'indicatorappletcomplete', 'show-desktop', 'workspace-switcher', 'trashapplet', 'object-0']
toplevel-id-list=['top']
[objects/firefox]
launcher-location='/usr/share/applications/firefox.desktop'
locked=false
menu-path='applications:/'
object-type='launcher'
position=262
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]
applet-iid='MateMenuAppletFactory::MateMenuApplet'
object-type='applet'
panel-right-stick=false
position=0
toplevel-id='top'
[objects/show-desktop]
applet-iid='WnckletFactory::ShowDesktopApplet'
locked=false
object-type='applet'
position=206
toplevel-id='top'
[objects/trashapplet]
applet-iid='TrashAppletFactory::TrashApplet'
locked=false
object-type='applet'
panel-right-stick=false
position=238
toplevel-id='top'
[objects/workspace-switcher]
applet-iid='WnckletFactory::WorkspaceSwitcherApplet'
locked=false
object-type='applet'
panel-right-stick=false
position=70
toplevel-id='top'
[toplevels/top]
expand=true
orientation='top'
screen=0
size=32
[toplevels/top/background]
color='rgba(0,0,0,0.499992)'
type='color'
EOF
then logout and login back to get new settings applied.
Optionally you can Install Meld diff-tool by sudo apt-get update && sudo apt-get install -y meld
and compare two files with settings by meld ~/dconf-panel-old ~/dconf-panel-new
to identify what really changed.
If you want to conduct more experiments - backup current Dconf settings with dconf dump /org/mate/ > ~/dconf-mate-full
and then reset them to defaults by dconf reset -f /org/mate/
and play with the configuration, check diffs, apply settings on current or different user profile and so on.