Xfce Forum

Sub domains
 

You are not logged in.

#1 2024-05-18 00:06:25

sqwuade
Member
Registered: 2024-05-17
Posts: 5

whiskermenu-10.rc file no longer at it's previous location.

Hi,  This question is in regards to the Whisker Menu.  Is there a discussion board just for the Whisker Menu or do people usually come to the main Xfce board, here, for questions?

Here's the Whisker Menu question I have:
Does anyone know what happened to the file that used to be located at $HOME/.config/xfce4/panel/whiskermenu-10.rc in Whisker Menu 2.8?  Specifically I'm trying to figure out what replaced the functionality that used to happen on line 2 of that file - it held the list of recently used apps:

Example from the $HOME/.config/xfce4/panel/whiskermenu-10.rc file in Whisker Menu 2.71:
recent=firefox-nightly.desktop,xfce4-file-manager.desktop,google-chrome.desktop,network-connections.desktop,libreoffice7.4-writer.desktop,putty.desktop,filezilla.desktop

And when you would delete that line down to just "recent=" or, do it via the GUI by right mouse-clicking a recently used app in the menu and choose the "Clear Recently Used" option, it would also delete that data from the whiskermenu-10.rc file.

This functionality looks like it's changed in Whisker Menu 2.8 (Although it still works the same way via the GUI).  Where is the list of Recently Used apps stored in v2.8 if it is no longer stored in $HOME/.config/xfce4/panel/whiskermenu-10.rc?  And is there a way to clear the Recently Used apps via a terminal command or can it now only be done via the GUI?

Thanks for any help and info!  Sqwuade

Last edited by sqwuade (2024-05-18 00:07:40)

Offline

#2 2024-05-18 01:21:03

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

Re: whiskermenu-10.rc file no longer at it's previous location.

Hello and welcome.

sqwuade wrote:

Hi,  This question is in regards to the Whisker Menu.  Is there a discussion board just for the Whisker Menu or do people usually come to the main Xfce board, here, for questions?

Here is fine. The whiskermenu is an official Xfce component.

Does anyone know what happened to the file that used to be located at $HOME/.config/xfce4/panel/whiskermenu-10.rc in Whisker Menu 2.8?

The Whiskermenu migrated to using xfconf for its settings in 2.8. You can view them through the xfce4-settings-editor - look in the xfce4-panel channel, /plugins tree.

Specifically I'm trying to figure out what replaced the functionality that used to happen on line 2 of that file

Its now stored in the "/plugins/plugin-XX/recent" property.

And is there a way to clear the Recently Used apps via a terminal command or can it now only be done via the GUI?

You can use xfconf-query. Here are some examples (my whiskermenu has an ID of 13):

Display the current list of recent applications:

xfconf-query -c xfce4-panel -p /plugins/plugin-13/recent

Edit an array:
Unfortunately there is no easy way to delete and insert entries via the command line (you can do it much easier through xfce4-settings-editor). To do so via the command line, you need to re-create the array with all entries:

xfconf-query -c xfce4-panel -p /plugins/plugin-13/recent -t string -s "gimp" -t string -s "inkscape"

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

#3 2024-05-18 04:28:38

sqwuade
Member
Registered: 2024-05-17
Posts: 5

Re: whiskermenu-10.rc file no longer at it's previous location.

Thanks ToZ!  That's a plethora of good info to go on.  Much appreciated!

One more question for you.  I found the recent apps list, as you said, but for me it was at this path: /plugins/plugin-10/recent.  You mentioned the path /plugins/plugin-13/recent.  Is that number not always going to be the same?  I'm trying to work this into an app and if that number might change it might not work for us.  Maybe a wildcard might work if the path won't always be the same?

Last edited by sqwuade (2024-05-18 05:59:44)

Offline

#4 2024-05-18 10:27:44

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

Re: whiskermenu-10.rc file no longer at it's previous location.

sqwuade wrote:

One more question for you.  I found the recent apps list, as you said, but for me it was at this path: /plugins/plugin-10/recent.  You mentioned the path /plugins/plugin-13/recent.  Is that number not always going to be the same?

Correct. Its an arbitrary number that is selected as the widgetID that your system sets up when the plugin is added to the panel. It can be different from system to system. Here is a command line way to determine that key name:

xfconf-query -c xfce4-panel -lv | grep whiskermenu | awk '{print $1}'

Maybe a wildcard might work if the path won't always be the same?

xfconf-query doesn't support wildcards like that. Use the command above to get the key name, then use that in the script.


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

#5 2024-05-18 23:52:42

sqwuade
Member
Registered: 2024-05-17
Posts: 5

Re: whiskermenu-10.rc file no longer at it's previous location.

Thanks Toz!  The final script for Whisker Menu 2.8 ended up looking like this:

xfconf-query -c xfce4-panel -p xfconf-query -c xfce4-panel -lv | grep whiskermenu | awk '{print $1}'/recent -t string -s "gimp" -t string -s "inkscape"

The old script for Whisker Menu 2.7.1 looked like this:

sed -i 's/^recent=.*$/recent=/g' ~/.config/xfce4/panel/whiskermenu-*.rc

*** Also, why do they have to list gimp and linkscape in there?  That seems odd.  I noticed last night that they show up in the array but I haven't seen them on the Recently Used Apps menu.

Thanks again!  Sqwuade

Last edited by sqwuade (2024-05-19 00:11:53)

Offline

#6 2024-05-19 00:02:15

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

Re: whiskermenu-10.rc file no longer at it's previous location.

sqwuade wrote:

*** Also, why do they have to list gimp and linkscape in there?  That seems odd.  I noticed last night that they are there but I haven't seen them on the Recently Used Apps menu.

I was just using them as an example. Perhaps you executed the command?


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

#7 2024-05-20 19:28:50

trinidad
Member
From: Chicago
Registered: 2024-05-20
Posts: 3
Website

Re: whiskermenu-10.rc file no longer at it's previous location.

I'm not quite sure here, but I'm working on the same problem. What I'm looking for is the command executed when right click on any app gives the option to clear the recent array. It doesn't matter if the shell is different as I'll just switch it. I'm backgrounding the terminal anyway and running zenity for the interface. I'll sort out the rest as I go. Any help is appreciated.

TC

Offline

#8 2024-05-20 19:47:33

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

Re: whiskermenu-10.rc file no longer at it's previous location.

trinidad wrote:

I'm not quite sure here, but I'm working on the same problem. What I'm looking for is the command executed when right click on any app gives the option to clear the recent array. It doesn't matter if the shell is different as I'll just switch it. I'm backgrounding the terminal anyway and running zenity for the interface. I'll sort out the rest as I go. Any help is appreciated.

TC

Hello and welcome.

To manually clear the recent array, you can run this command:

xfconf-query -c xfce4-panel -p /plugins/plugin-13/recent -r

... the "-r" resets (deleted) the property. It will be re-created again when needed. Note: the "13" value is dependent on your widgetID. Above is a programmatic way to identify it.

Edit: for completeness sake:

xfconf-query -c xfce4-panel -p $(xfconf-query -c xfce4-panel -lv | grep whiskermenu | awk '{print $1}')/recent -r

Last edited by ToZ (2024-05-20 19:51:06)


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

#9 2024-05-21 12:44:04

trinidad
Member
From: Chicago
Registered: 2024-05-20
Posts: 3
Website

Re: whiskermenu-10.rc file no longer at it's previous location.

Yes that's it. Thank you. I was trying to clear it with C++. Simple is better.

TC

Offline

#10 2024-05-30 06:22:39

sqwuade
Member
Registered: 2024-05-17
Posts: 5

Re: whiskermenu-10.rc file no longer at it's previous location.

Hi ToZ,
Is there a more simple way to output/print the number of elements in the array?

This works but adds two to the output (I think because it is counting the two rows before the actual list starts):

xfconf-query -c xfce4-panel -p $(xfconf-query -c xfce4-panel -lv | grep whiskermenu | awk '{print $1}')/recent | wc -l

Basically with the output of the command:
xfconf-query -c xfce4-panel -p $(xfconf-query -c xfce4-panel -lv | grep whiskermenu | awk '{print $1}')/recent
where it states on the first line of the output: "Value is an array with n items:" how to get the "n" value?  Piping the command above with the "wc -l" adds two to the number I'm hoping to output.

Thanks!

Last edited by sqwuade (2024-05-30 07:02:24)

Offline

#11 2024-05-30 09:54:28

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

Re: whiskermenu-10.rc file no longer at it's previous location.

sqwuade wrote:

Hi ToZ,
Is there a more simple way to output/print the number of elements in the array?

If you just want the number of items in the array, you can use:

xfconf-query -c xfce4-panel -p $(xfconf-query -c xfce4-panel -lv | grep whiskermenu | awk '{print $1}')/recent | tail +3 | wc -l

To get just a list of items without the 2 top lines:

xfconf-query -c xfce4-panel -p $(xfconf-query -c xfce4-panel -lv | grep whiskermenu | awk '{print $1}')/recent | tail +3

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

#12 2024-05-30 16:30:23

sqwuade
Member
Registered: 2024-05-17
Posts: 5

Re: whiskermenu-10.rc file no longer at it's previous location.

Super!  Thanks ToZ!

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.010 seconds, 7 queries executed - Memory usage: 598.8 KiB (Peak: 615.64 KiB) ]