Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-05-17 05:23:09

PmGs
Member
Registered: 2020-05-06
Posts: 12

Applications menu - remove, ...

Hello everybody,

With the GUI, it's possible to remove the applications menu.
- How can we retrieve it?
- What are the commands (parameters) to do these actions in CLI?

Thanks in advance

Last edited by PmGs (2020-05-17 05:23:23)

Offline

#2 2020-05-17 09:04:41

alcornoqui
Member
Registered: 2014-07-28
Posts: 832

Re: Applications menu - remove, ...

PmGs wrote:

With the GUI, it's possible to remove the applications menu.
- How can we retrieve it?

You mean reinstate it? Like... put it again on the panel? There's two GUI ways:

1. Right click in the desired panel, select 'Panel' and 'Add new items', then select and click 'Add', or just drag it to the desired position.
2. Open the 'Panel' preferences app in 'Settings', and go to the 'Items' tab.

PmGs wrote:

- What are the commands (parameters) to do these actions in CLI?

This thread, and particularly this comment, have a lot of useful info on that topic.

Hope it helps. Good luck and don't forget to tell us how it goes, or any further question you have!

Offline

#3 2020-05-17 14:32:24

PmGs
Member
Registered: 2020-05-06
Posts: 12

Re: Applications menu - remove, ...

Thanks alcornoqui
1) New to Xfce, I did not find your solutions.
2) I know 'xfconf-query' but it seems that the machine must be rebooted to update the parameters, ie if you remove "Application menu", xfconf-query does not see this modif if you do not reboot the host.

Offline

#4 2020-05-17 15:39:49

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,000

Re: Applications menu - remove, ...

PmGs wrote:

2) I know 'xfconf-query' but it seems that the machine must be rebooted to update the parameters, ie if you remove "Application menu", xfconf-query does not see this modif if you do not reboot the host.

No need to reboot, just restart the panel:

xfce4-panel -r
PmGs wrote:

With the GUI, it's possible to remove the applications menu.
- How can we retrieve it?
- What are the commands (parameters) to do these actions in CLI?

Programatically adding a plugin to the panel:
If you have only one panel,

xfce4-panel --add=applicationsmenu

...will add it to that panel. Otherwise, a dialog will pop up asking which panel to add it to.

It will be added to the end of that panel, so if you want to position it somewhere else programmatically, you will need to use xfconf-query as alcornoqui advises.

Here is an example of what it might look like. Multiple panels complicate things.

  • add the applicationsmenu

    xfce4-panel --add=applicationsmenu
  • find its plugin ID

    xfconf-query -c xfce4-panel -lv | grep applicationsmenu | awk '{print $1}' | awk -F'-' '{print $2}'
  • list the array of existing plugin IDs

    xfconf-query -c xfce4-panel -p /panels/panel-1/plugin-ids
  • extract and reorder the list

    some voodoo script magic
  • write the new list back to plugin-ids (this is an example of an array write back)

    xfconf-query -c xfce4-panel -p /panels/panel-1/plugin-ids -a -s 15 -s 1 -s 2 -s 3 -s 4 -s 5 -s 6 -s 7 -s 8 -s 9 -s 10 -s 11 -s 12 -s 13 -s 14
  • restart the panel to re-read plugin-ids

    xfce4-panel -r

Programatically removing a plugin from the panel:
Removing a plugin is a similar process in that you need to identify it's ID, but this time just remove it from the array, re-write that array, and restart xfce4-panel.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Board footer

Powered by FluxBB