MJWM - alternative menu generator for JWM
MJWM - alternative menu generator for JWM
https://github.com/chiku/mjwm
I don't know how the performance of this compares with the Puppy solution, but I imagine someone will be interested in checking it out.
One of the guys from Arch wrote it in C as "MJM", but it always segfaulted for me, and didn't use subcategories. It has now been adopted by another guy at Arch, ported to C++, renamed, and had those things fixed.
I don't know how the performance of this compares with the Puppy solution, but I imagine someone will be interested in checking it out.
One of the guys from Arch wrote it in C as "MJM", but it always segfaulted for me, and didn't use subcategories. It has now been adopted by another guy at Arch, ported to C++, renamed, and had those things fixed.
Do you know a good gtkdialog program? Please post a link here
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
I don't know how the performance of this compares with the Puppy solution, but I imagine someone will be interested in checking it out.
Code: Select all
# time ./mjwm
real 0m0.020s
user 0m0.010s
sys 0m0.007s
Code: Select all
# time fixmenus
Generating /root/.jwmrc...
real 0m1.404s
user 0m0.280s
sys 0m0.103s
Compiles in a few seconds (using 64 bit).
Puppy Linux Blog - contact me for access
Since it is being actively developed, if it was going to be used in Puppy it would be much better to get it officially supporting custom categories, rather than doing a straightforward hard-coded patch or fork.01micko wrote:With puppy's non standard .desktop files it puts most stuff into "other" category.
Puppy has files in /etc/xdg/menus relating to this. This system (not the actual categories) is actually a "standard" system, isn't it (not unique to Puppy)? So a "proper" implementation would use these...
Do you know a good gtkdialog program? Please post a link here
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Couldn't agree more.disciple wrote:Since it is being actively developed, if it was going to be used in Puppy it would be much better to get it officially supporting custom categories, rather than doing a straightforward hard-coded patch or fork.
Yes and no. Standards seem to have "evolved" (diverged?) so it seems everything is reliant on the .desktop files; my (very) rough perusal of the code seems to support this theory.disciple wrote:Puppy has files in /etc/xdg/menus relating to this. This system (not the actual categories) is actually a "standard" system, isn't it (not unique to Puppy)? So a "proper" implementation would use these...
I was hoping technosaurus would chime in here as he has the nouse for jwm and code.
Whatever, it does look like a good solution to a slow problem and could probably be shoehorned in (to woof-CE) without too much disruption upstream.
I'll test it out in my slackware install soon enough.
Puppy Linux Blog - contact me for access
I played around with this today.
This program is fast and accurate for distros using the "standard" categories as stated here.
http://standards.freedesktop.org/menu-s ... y-registry
As 01micko said, when run with puppy's desktop files, most are dumped in the default category of "other".
Around 3/4 of puppy's desktop categories are not in the "standard" category list, so any use would require either a massive change to puppy's desktop categories to match the standard or a category customization feature.
One other thing I noticed was that if the category name was not followed by a ";" , it was not found. Many of puppy's desktop files are missing that semicolon, if only a single category is there.
cheers,
s
This program is fast and accurate for distros using the "standard" categories as stated here.
http://standards.freedesktop.org/menu-s ... y-registry
As 01micko said, when run with puppy's desktop files, most are dumped in the default category of "other".
Around 3/4 of puppy's desktop categories are not in the "standard" category list, so any use would require either a massive change to puppy's desktop categories to match the standard or a category customization feature.
One other thing I noticed was that if the category name was not followed by a ";" , it was not found. Many of puppy's desktop files are missing that semicolon, if only a single category is there.
cheers,
s
What do you mean? .desktop files don't define which menu categories a distro uses... or are there some .desktop files I don't know about?01micko wrote:Yes and no. Standards seem to have "evolved" (diverged?) so it seems everything is reliant on the .desktop files; my (very) rough perusal of the code seems to support this theory.disciple wrote:Puppy has files in /etc/xdg/menus relating to this. This system (not the actual categories) is actually a "standard" system, isn't it (not unique to Puppy)? So a "proper" implementation would use these...
Do you know a good gtkdialog program? Please post a link here
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
mjwm doesn't use anything in the current system category wise. It doesn't use gnome-menus. It has it's own categories.h file.
IIRC, technosaurus used the .desktop files only to build the menu with jwm_menu_create.
From the help;
I can't see anywhere where apart from .desktop files where it looks for categories.
As an experiment, I removed /etc/xdg and ran mjwm, Identical results as before.
IIRC, technosaurus used the .desktop files only to build the menu with jwm_menu_create.
From the help;
Code: Select all
-s, --input-directory Directory to scan for '.desktop' files [Default: /usr/share/applications/]
As an experiment, I removed /etc/xdg and ran mjwm, Identical results as before.
Puppy Linux Blog - contact me for access
OK, I've filed an issue for that.seaside wrote:One other thing I noticed was that if the category name was not followed by a ";" , it was not found. Many of puppy's desktop files are missing that semicolon, if only a single category is there.
Do you know a good gtkdialog program? Please post a link here
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Yes, I knew mjwm had its categories hard-coded, but I thought other menu generators almost always used /etc/xdg/menus01micko wrote:mjwm doesn't use anything in the current system category wise. It doesn't use gnome-menus. It has it's own categories.h file.
IIRC, technosaurus used the .desktop files only to build the menu with jwm_menu_create.
From the help;I can't see anywhere where apart from .desktop files where it looks for categories.Code: Select all
-s, --input-directory Directory to scan for '.desktop' files [Default: /usr/share/applications/]
As an experiment, I removed /etc/xdg and ran mjwm, Identical results as before.
Do you know a good gtkdialog program? Please post a link here
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Does anybody know: is /etc/xdg/menus/hierarchy only used by dir2pet? I don't think it exists in any other distro.
Do you know a good gtkdialog program? Please post a link here
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
disciple,disciple wrote:OK, I've filed an issue for that.seaside wrote:One other thing I noticed was that if the category name was not followed by a ";" , it was not found. Many of puppy's desktop files are missing that semicolon, if only a single category is there.
One other item - quotes inside exec commands are being encoded which breaks jwm.
Cheers,rxvt -font 7x14 -bg "#c0c0c0" -fg becomes
rxvt -font 7x14 -bg "#c0c0c0" -fg
s
Yes, Technosaurus hard-coded the categories as well, which is fine if you don't want to help users use different categories (perhaps the standard ones01micko wrote:IIRC, technosaurus used the .desktop files only to build the menu with jwm_menu_create.

This is what he said:
I guess most of the time people just need to rebuild the menu because they installed a program, not because they changed the categories structure, so if the speed of reading the categories structure is really an issue there could be a separate tool to build some sort of intermediate file (perhaps /etc/xdg/menus/hierarchy would be suitable).technosaurus wrote:it doesn't even touch the .menu files because the whole menu spec is targeted toward multiuser systems in such a way that the C implementation is 15X slower than my shell implementation that ignores the puppy-irrelevant parts of the spec. (mostly due to the "exclude" directive)
Do you know a good gtkdialog program? Please post a link here
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
The other issue if you wanted to use mjwm and get it to support /etc/xdg/menus, is that (at least some) current Puppies don't actually use a main menu file e.g. /etc/xdg/menus/applications.menu, as detailed at01micko wrote:it does look like a good solution to a slow problem and could probably be shoehorned in (to woof-CE) without too much disruption upstream.
http://www.murga-linux.com/puppy/viewtopic.php?t=85757
Do you know a good gtkdialog program? Please post a link here
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
OK, filed.seaside wrote:One other item - quotes inside exec commands are being encoded which breaks jwm.
Do you know a good gtkdialog program? Please post a link here
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Hi guys; mcewanw suggested I take a look at this.
Looking at the categories.h file it seems it could be made to read a file instead.
I`m working on the DebianDog project, and I wrote a JWM menu maker in BaCon.
http://www.murga-linux.com/puppy/viewto ... start=1815
It seems like they are both very similar.
Mine also has only one level of sub menus, but this is easily changed of course.
Mine uses a menu-root.lst file to set the main menu items and their icons.
Another file, categories.lst does translations of the desktop file Categories= ( custom menus ).
.
Looking at the categories.h file it seems it could be made to read a file instead.
I`m working on the DebianDog project, and I wrote a JWM menu maker in BaCon.
http://www.murga-linux.com/puppy/viewto ... start=1815
It seems like they are both very similar.
Mine also has only one level of sub menus, but this is easily changed of course.
Mine uses a menu-root.lst file to set the main menu items and their icons.
Another file, categories.lst does translations of the desktop file Categories= ( custom menus ).
.
OK, guys, he's fixed both those issues you reported.
So Terry, what are the reasons for your one? Did you write it specifically because you wanted to implement a menu-root.lst, because Barry's and Techno's ones both hard-code the categories? Or are there other reasons for it as well?
And were you aware of the thread I linked above on implementing the /etc/xdg/menus/applications.menu? I saw your complaint about different menu systems using "proprietary crap", so I would have thought you'd go for that, instead of inventing your own proprietary system. Even if you had a tool that build menu-root.lst from applications.menu...
So Terry, what are the reasons for your one? Did you write it specifically because you wanted to implement a menu-root.lst, because Barry's and Techno's ones both hard-code the categories? Or are there other reasons for it as well?
And were you aware of the thread I linked above on implementing the /etc/xdg/menus/applications.menu? I saw your complaint about different menu systems using "proprietary crap", so I would have thought you'd go for that, instead of inventing your own proprietary system. Even if you had a tool that build menu-root.lst from applications.menu...
Do you know a good gtkdialog program? Please post a link here
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Tried this in Slackware. Has all the usual problems; JWM needs the extension of the icons ; JWM doesn't handle the %f,%F, %u and %U very nicely. Perhaps the %X issues should be reported to Joe as this has been standard for a while. Puppy strips those off with a sed call if something is installed through PPM. Categories worked fine. No KDE programs are found because /usr/share/applications/kde4/ isn't searched unless you tell mjwm to, but I don't think it handles 2 locations at once. No big deal. Could work around that with a separate include. Not that I will bother.
For a long time the Icon= entry had the file extension of the icon but now it seems most have dropped this.
EDIT: on second thought, JWM has never tried to generate menus so it's not Joe's problem.
For a long time the Icon= entry had the file extension of the icon but now it seems most have dropped this.
EDIT: on second thought, JWM has never tried to generate menus so it's not Joe's problem.
Puppy Linux Blog - contact me for access
disciple; It looks like Mobeus was addressing what I looked at awhile back.
I decided that it is way more than I really wanted, and I began to make a simpler setup.
My Puppy has only root menu and it`s sub app items, so it`s quick and easy to access apps.
All that`s needed then is a file to set the root menu categories.
And a translation file to resolve the desktop file`s Categories= to those root menu categories.
Nothing`s fool proof, but this works and is so simple.
But it doesn`t use menu files, so I made a menu file to desktop file converter utility.
I know it departs from the FreeDesktop standard. If I see a good implementation of it, I`ll use it.
.
I decided that it is way more than I really wanted, and I began to make a simpler setup.
My Puppy has only root menu and it`s sub app items, so it`s quick and easy to access apps.
All that`s needed then is a file to set the root menu categories.
And a translation file to resolve the desktop file`s Categories= to those root menu categories.
Nothing`s fool proof, but this works and is so simple.
But it doesn`t use menu files, so I made a menu file to desktop file converter utility.
I know it departs from the FreeDesktop standard. If I see a good implementation of it, I`ll use it.
.
Prototype for "Standard" menus in puppy
Here's a prototype of what puppy might look like utilizing the "Standard" menu categories. It consists of three files, "pup_desk_parse_standard", "jwmrc_build" and the original "mjwm".
"pup_desk_parse_standard" grossly reassigns all of Categories in the /usr/share/applications/*.desktop files to the "standard menu" without submenus and terminates each "Category=Somename" with a semicolon.
"jwmrc_build" then builds a new .jwmrc file using the new .desktop category assignments with "mjwm", and restarts Jwm.
Just decompress the attached file "pup_standard.tar.gz" to /root, run "pup_desk_parse_standard", followed by "jwmrc_build".
Probably better to run this without a save file, because while modifying the desktop files doesn't impact the normal creation of the jwm menu, some empty sed tmp error files appear in /usr/share/applications.
The main category icons are missing, but can be easily supplied with a category link file pointing to an icon.
The rebuild clocks at time.026 vs 2.042 for fixmenus. (And the fixmenus time doesn't include the jwm -restart.)
Pretty fast and probably could be further optimized.
Cheers,
s
"pup_desk_parse_standard" grossly reassigns all of Categories in the /usr/share/applications/*.desktop files to the "standard menu" without submenus and terminates each "Category=Somename" with a semicolon.
"jwmrc_build" then builds a new .jwmrc file using the new .desktop category assignments with "mjwm", and restarts Jwm.
Just decompress the attached file "pup_standard.tar.gz" to /root, run "pup_desk_parse_standard", followed by "jwmrc_build".
Probably better to run this without a save file, because while modifying the desktop files doesn't impact the normal creation of the jwm menu, some empty sed tmp error files appear in /usr/share/applications.
The main category icons are missing, but can be easily supplied with a category link file pointing to an icon.
The rebuild clocks at time.026 vs 2.042 for fixmenus. (And the fixmenus time doesn't include the jwm -restart.)
Pretty fast and probably could be further optimized.
Cheers,
s
- Attachments
-
- standard_menu.png
- (61.64 KiB) Downloaded 508 times
-
- pup_standard.tar.gz
- (99.55 KiB) Downloaded 242 times