You are not logged in.

#21 2021-06-30 01:11:08

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,557
Website

Re: tweak the BL menu?

^Never mind, if it's non-trivial.

Are you referring to the use of keywords, or to the treatment of a pipemenu root as a "searchable object" though?
If the former, we can live without it, but if the latter... yes it would be nice if even only the pipemenu root title (eg "Conky") were recognised and displayed for searches on "conky". How it would then be opened is less important IMO.

I guess the best solution would be to allow a submenu to be opened whilst in search mode.

Static submenus are already opened, so you mean pipemenus? The implication, though, would be running every pipemenu when doing a search, would it not?!  yikes
Performance issues, maybe...


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#22 2021-07-13 19:58:09

malm
jgmenu developer
Registered: 2016-10-13
Posts: 735
Website

Re: tweak the BL menu?

^John - sorry, I think I've wasted your time here.

Filtering on the keywords for pipemenus can be achieved by just tweaking one line, but it leads to plenty of segfaults. I don't think there is a way of achieving this (=opening a submenu whilst in search mode) without significant refactoring and mostly likely regressions. I think jgmenu tries to cater for so many use-cases that changing something at that depth is now pretty hard.

Happy to talk through the relevant code-paths if any one is interested, but I really think it would be easier to start from scratch with a clear set of acceptance criteria from the outset.

I wrote this https://github.com/Misko-2083/blurmenu in a couple of days. It's a good basis for a menu - but it would still take a few weeks' work I guess.

Offline

#23 2021-07-14 01:05:20

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,557
Website

Re: tweak the BL menu?

Don't worry about it @Johan. So, pipemenus can't be added to the search menu as if they were regular csv entries? OK drop that idea.

---
Possible clunky workaround?
Put .desktop files in /usr/share/applications, one for each BL pipemenu, name=something pipemenu, exec= to an appropriate jgmenu_run command to open that menu, possibly put some keywords in "categories" (sounds like a hack though). Might those <name>pipemenu.desktop files show up in the search?

In fact, I'll try one later today if I have time, and see what happens...


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#24 2021-07-28 01:13:19

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,557
Website

Re: tweak the BL menu?

@malm, I didn't do it then, but finally tried a .desktop file:

[Desktop Entry]
Type=Application
Name=Conky Pipemenu
TryExec=jgmenu
Exec=sh -c 'jgmenu_run ob --cmd="bl-conky-pipemenu" | jgmenu --simple'
Icon=obconf
Terminal=false
Categories=Settings;DesktopSettings

Put that in /usr/share/applications and "Conky Pipemenu" appears in a "Conky" search (also "pipe" search) and opens the pipemenu if clicked. We could easily ship files like that for the more important pipemenus to make them findable via search.

Two checks:
1)The keys [Comment] and [Keywords] are ignored, right?
2) The search is OR not AND, ie "Conky manager" will bring up results for both words?

Anyway, this could be implemented without any tweaking of jgmenu itself.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#25 2021-08-02 14:49:30

malm
jgmenu developer
Registered: 2016-10-13
Posts: 735
Website

Re: tweak the BL menu?

@John
Yes to both questions (1) and (2).
Rather than creating a .desktop file, we could simply add a line to the prepend file.

Conky Pipemenu,sh -c 'jgmenu_run ob --cmd="bl-conky-pipemenu" | jgmenu --simple'

Regardless of method, there is a BUT with this approach in that it spawns a new instance of jgmenu, so the behaviour will be a bit different. For example, the pipemenu will launch at the pointer (or wherever is specified in the config file) and you can't return to the parent menu without launching the whole menu again. It would be good to get people's views on this, but I think that's quite a compromise.

Last edited by malm (2021-08-02 14:50:21)

Offline

#26 2021-08-03 06:15:46

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,557
Website

Re: tweak the BL menu?

malm wrote:

Rather than creating a .desktop file, we could simply add a line to the prepend file.
Type 1)

Conky Pipemenu,sh -c 'jgmenu_run ob --cmd="bl-conky-pipemenu" | jgmenu --simple'

As compared to the entries we have now, eg:
Type 2)

Conky,^pipe(jgmenu_run ob --cmd="bl-conky-pipemenu" --tag="bl-conky-pipemenu")

So the difference as far as jgmenu is concerned is the ^pipe at the start of the command in type 2), as opposed to the simple call to sh?

If the "Conky" in type 2) were recognized by the search mechanism as easily as the "Conky Pipemenu" in type 1) then our troubles would be over. But you've already spent some time establishing that it wouldn't be easy at all, right?

We could replace the type 2) entries in their regular places in the menu (mostly under Preferences) with the equivalent type 1), at the cost of the BUT you describe below.

I was thinking that the extra entries which got auto-added to Applications by .desktop files might be less intrusive - depending of course on individual users' work flows. (I seldom go into Applications myself.)

Regardless of method, there is a BUT with this approach in that it spawns a new instance of jgmenu, so the behaviour will be a bit different. For example, the pipemenu will launch at the pointer (or wherever is specified in the config file) and you can't return to the parent menu without launching the whole menu again.

And you have to click the label to see the menu contents, as opposed to hovering in the regular menu.

Anyway, this:

It would be good to get people's views on this


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#27 2021-08-04 05:52:14

malm
jgmenu developer
Registered: 2016-10-13
Posts: 735
Website

Re: tweak the BL menu?

Yes to all.

Offline

#28 2021-11-22 07:52:07

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,557
Website

Re: tweak the BL menu?

johnraff wrote:

@malm, I didn't do it then, but finally tried a .desktop file:

[Desktop Entry]
Type=Application
Name=Conky Pipemenu
TryExec=jgmenu
Exec=sh -c 'jgmenu_run ob --cmd="bl-conky-pipemenu" | jgmenu --simple'
Icon=obconf
Terminal=false
Categories=Settings;DesktopSettings

Put that in /usr/share/applications and "Conky Pipemenu" appears in a "Conky" search (also "pipe" search) and opens the pipemenu if clicked.

If bl-jgpop is available (ship it in bunsen-utilities?) the command can be simplified:

[Desktop Entry]
Type=Application
Name=Conky Pipemenu
TryExec=jgmenu
Exec=bl-jgpop -o bl-conky-pipemenu
Icon=obconf
Terminal=false
Categories=Settings;DesktopSettings

Still not quite sure which package should ship those .desktop files (not too many anyway) - bunsen-pipemenus or possibly bunsen-utilities or bunsen-configs? EDIT I guess it has to be bunsen-pipemenus.

EDIT2: looking at the pipemenus, the only ones which seemed to "deserve" being searchable in the main menu seemed to be:
bl-compositor
bl-conky-pipemenu
bl-tint2-pipemenu
So I've made desktop files for thise three for now.

These others are all OK just being in their regular places in the menu I guess?

bl-beepmein-pipemenu (this one from the tint2 clock)
bl-dropbox-pipemenu
bl-install-pipemenu
bl-kb-pipemenu
bl-places-pipemenu
bl-printing-pipemenu
bl-recent-files-pipemenu
bl-remote-desktop-pipemenu
bl-scrot-pipemenu
bl-sshconfig-pipemenu

Last edited by johnraff (2021-11-22 09:43:06)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#29 2021-11-25 09:23:26

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,557
Website

Re: tweak the BL menu?

I posted this here, but try replacing the "Appearance" line with this:

Appearance,sh -c 'lxappearance; bl-reload-gtk23',preferences-desktop-theme

Now if you set a new theme in lxappearance, when you close it all the open windows will be theme-switched too. (Only GTK of course - openbox theme still has to be changed by hand.)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#30 2022-01-01 09:02:51

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,557
Website

Re: tweak the BL menu?

^I've been using the above menu item in my regular Lithium desktop and a Beryllium VM for some time now and it seems to work pretty well. Committing to bunsen-configs since no-one objected. smile


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

Board footer

Powered by FluxBB