Using xfconf-query to modify panels and panel items

Mike Massonnet mmassonnet at xfce.org
Mon Jun 17 06:28:06 CEST 2013


Hello Havard,

2013/6/14 Havard Blok <w301 at hblok.net>:
> On Thu, Jun 13, 2013 at 07:19:19PM +0200, Mike Massonnet wrote:
>> > E.g. deleting an item with the '-r' option will remove it from the list of items if I query with '-l -v', however the item will not disappear from the panel. Looking at the config file under .config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml, it is also unchanged. If I log out and back again, everything remains the same, and the item is also back on the xfconf-query list.
>>
>> Please paste the commands (or some of them) you run with xfconf-query.
>
> Here are the commands and their output. Notice how "/plugins/plugin-7" is present in the first listing, but not the second. Despite this, the "showdesktop" panel item does not disapear. Investigating the xfce4-panel.xml closer, it seems the item is actually removed, however, after a log-out/in, it is back again.

Ok. So after some tests this needs to be addressed as a bug.

First off there is another property, but the panel doesn't listen to
it either on changes.

/panels/panel-<ID>/plugin-ids

This property is an array of integers which contains all the IDs of
/plugins/plugin-<ID>. You can't remove or add items with xfconf-query
in one command, you can only reorder them.

xfconf-query -c xfce4-panel -p /panels/panel-2/plugin-ids -s 3 -s 4 -s 2

Nonetheless, this is not important, but needs also to be addressed as
a bug. So not important because when the plugin-<ID> property gets
reset the plugin will disappear after restarting the panel. Therefore
what you can do in the meantime is to restart the panel with the
command xfce4-panel -r.

To sum it up bellow, this should work for you:
xfconf-query -c xfce4-panel -p /panels/panel-<PANELID>/plugin-ids
xfconf-query -c xfce4-panel -p /plugins/plugin-<PLUGINID> -r
xfce4-panel -r
xfconf-query -c xfce4-panel -p /panels/panel-<PANELID>/plugin-ids

> Regards,
> Havard

Regards,
Mike

>
> $ xfconf-query -c xfce4-panel -l -v
>
> /panels                            2
> /panels/panel-0/length             100
> /panels/panel-0/plugin-ids         <<UNSUPPORTED>>
> /panels/panel-0/position           p=6;x=0;y=0
> /panels/panel-0/position-locked    true
> /panels/panel-1/length             100
> /panels/panel-1/plugin-ids         <<UNSUPPORTED>>
> /panels/panel-1/position           p=10;x=0;y=0
> /panels/panel-1/position-locked    true
> /panels/panel-1/size               40
> /plugins/plugin-1                  applicationsmenu
> /plugins/plugin-10                 launcher
> /plugins/plugin-10/items           <<UNSUPPORTED>>
> /plugins/plugin-11                 launcher
> /plugins/plugin-12                 launcher
> /plugins/plugin-12/items           <<UNSUPPORTED>>
> /plugins/plugin-13                 battmon
> /plugins/plugin-14                 xfsm-logout-plugin
> /plugins/plugin-14/base-directory  /home/havardb
> /plugins/plugin-15                 xfce4-mixer-plugin
> /plugins/plugin-3                  tasklist
> /plugins/plugin-4                  pager
> /plugins/plugin-5                  clock
> /plugins/plugin-6                  systray
> /plugins/plugin-6/names-visible    <<UNSUPPORTED>>
> /plugins/plugin-7                  showdesktop
> /plugins/plugin-8                  separator
> /plugins/plugin-9                  launcher
> /plugins/plugin-9/items            <<UNSUPPORTED>>
>
>
> $ xfconf-query -c xfce4-panel -p /plugins/plugin-7 -r
> $ xfconf-query -c xfce4-panel -l -v
>
> /panels                            2
> /panels/panel-0/length             100
> /panels/panel-0/plugin-ids         <<UNSUPPORTED>>
> /panels/panel-0/position           p=6;x=0;y=0
> /panels/panel-0/position-locked    true
> /panels/panel-1/length             100
> /panels/panel-1/plugin-ids         <<UNSUPPORTED>>
> /panels/panel-1/position           p=10;x=0;y=0
> /panels/panel-1/position-locked    true
> /panels/panel-1/size               40
> /plugins/plugin-1                  applicationsmenu
> /plugins/plugin-10                 launcher
> /plugins/plugin-10/items           <<UNSUPPORTED>>
> /plugins/plugin-11                 launcher
> /plugins/plugin-12                 launcher
> /plugins/plugin-12/items           <<UNSUPPORTED>>
> /plugins/plugin-13                 battmon
> /plugins/plugin-14                 xfsm-logout-plugin
> /plugins/plugin-14/base-directory  /home/havardb
> /plugins/plugin-15                 xfce4-mixer-plugin
> /plugins/plugin-3                  tasklist
> /plugins/plugin-4                  pager
> /plugins/plugin-5                  clock
> /plugins/plugin-6                  systray
> /plugins/plugin-6/names-visible    <<UNSUPPORTED>>
> /plugins/plugin-8                  separator
> /plugins/plugin-9                  launcher
> /plugins/plugin-9/items            <<UNSUPPORTED>>
>
>
>
>
> ** xfce4-panel.xml
>
> This line will be removed, but be back after re-login.
> <property name="plugin-7" type="string" value="showdesktop"/>
>
> This line (value="7") will stay.
>
> <property name="panel-1" type="empty">
>       <property name="plugin-ids" type="array">
>         <value type="int" value="7"/>
>


More information about the Xfce mailing list