0

I've found out to edit Cinnamon panel I can use dconf:

dconf read /org/cinnamon/enabled-applets
['panel1:left:0:[email protected]:0', 'panel1:left:1:[email protected]:1', 'panel1:left:2:[email protected]:2', 'panel1:right:2:[email protected]:3', 'panel1:right:3:[email protected]:4', 'panel1:right:4:[email protected]:5', 'panel1:right:5:[email protected]:6', 'panel1:right:6:[email protected]:7', 'panel1:right:7:[email protected]:8', 'panel1:right:8:[email protected]:9', 'panel1:right:9:[email protected]:10', 'panel1:right:10:[email protected]:11', 'panel1:right:11:[email protected]:12', 'panel1:right:12:[email protected]:13', 'panel1:right:1:temperature@fevimu:14']

I have been able to add and remove applets by dconf write, but only for those that were enabled already as seen in GUI (panel right-click->applets) and/or after adding once by GUI.

How to add/load applet that was just added to /usr/share/cinnamon/applets via terminal commands?

1 Answer 1

0

On Github I got a suggestion to use schemes and overrides and wrote a script:

# edit panel
# editing /usr/share/glib-2.0/schemas/org.cinnamon.gschema.xml or 10_cinnamon.gschema.override
schema_override_file=/usr/share/glib-2.0/schemas/10_cinnamon.gschema.override
if [ ! -e "$schema_override_file" ]; then
    echo '[org.cinnamon]' | sudo tee "$schema_override_file" > /dev/null
fi

changed_panel=`grep 'panel1:right:' /usr/share/glib-2.0/schemas/org.cinnamon.gschema.xml | perl -pe 's/ *.{1,2}default.//g' | perl -pe 's/(right:)([0-9]+)/$1.($2+2)/eg' | perl -pe "s/]/, 'panel1:right:0:mem-monitor-text\@datanom.net', 'panel1:right:1:temperature\@fevimu']/"`

echo "enabled-applets=$changed_panel" | sudo tee --append "$schema_override_file" > /dev/null
sudo glib-compile-schemas /usr/share/glib-2.0/schemas

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .