Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 21 Sep 2014, 04:15
All times are UTC - 4
 Forum index » Taking the Puppy out for a walk » Suggestions
MJWM - alternative menu generator for JWM
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [19 Posts]   Goto page: 1, 2 Next
Author Message
disciple

Joined: 20 May 2006
Posts: 6435
Location: Auckland, New Zealand

PostPosted: Sat 15 Mar 2014, 19:12    Post subject:  MJWM - alternative menu generator for JWM
Subject description: Formerly MJM
 

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.

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7802
Location: qld

PostPosted: Sat 15 Mar 2014, 19:34    Post subject:  

Quote:
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:
# time ./mjwm

real   0m0.020s
user   0m0.010s
sys   0m0.007s


Code:
# time fixmenus
Generating /root/.jwmrc...

real   0m1.404s
user   0m0.280s
sys   0m0.103s


I was going to say it felt about 10 times faster. With puppy's non standard .desktop files it puts most stuff into "other" category.

Compiles in a few seconds (using 64 bit).

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
disciple

Joined: 20 May 2006
Posts: 6435
Location: Auckland, New Zealand

PostPosted: Sun 16 Mar 2014, 05:55    Post subject:  

01micko wrote:
With puppy's non standard .desktop files it puts most stuff into "other" category.

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.
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...

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7802
Location: qld

PostPosted: Sun 16 Mar 2014, 07:37    Post subject:  

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.

Couldn't agree more.

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...

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.

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.

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: Sun 16 Mar 2014, 17:52    Post subject:  

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-spec/latest/apa.html#main-category-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
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6435
Location: Auckland, New Zealand

PostPosted: Sun 16 Mar 2014, 18:52    Post subject:  

01micko wrote:
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...

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.

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?

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7802
Location: qld

PostPosted: Sun 16 Mar 2014, 19:12    Post subject:  

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;
Code:
-s, --input-directory   Directory to scan for '.desktop' files [Default: /usr/share/applications/]


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.

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
disciple

Joined: 20 May 2006
Posts: 6435
Location: Auckland, New Zealand

PostPosted: Sun 16 Mar 2014, 19:15    Post subject:  

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.

OK, I've filed an issue for that.

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6435
Location: Auckland, New Zealand

PostPosted: Sun 16 Mar 2014, 19:20    Post subject:  

01micko 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;
Code:
-s, --input-directory   Directory to scan for '.desktop' files [Default: /usr/share/applications/]


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.

Yes, I knew mjwm had its categories hard-coded, but I thought other menu generators almost always used /etc/xdg/menus

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6435
Location: Auckland, New Zealand

PostPosted: Sun 16 Mar 2014, 19:34    Post subject:  

Does anybody know: is /etc/xdg/menus/hierarchy only used by dir2pet? I don't think it exists in any other distro.
_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: Sun 16 Mar 2014, 19:50    Post subject:  

disciple wrote:
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.

OK, I've filed an issue for that.


disciple,

One other item - quotes inside exec commands are being encoded which breaks jwm.

Quote:
rxvt -font 7x14 -bg "#c0c0c0" -fg becomes
rxvt -font 7x14 -bg "#c0c0c0" -fg


Cheers,
s
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6435
Location: Auckland, New Zealand

PostPosted: Sun 16 Mar 2014, 20:09    Post subject:  

01micko wrote:
IIRC, technosaurus used the .desktop files only to build the menu with jwm_menu_create.

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 ones Smile ), and don't want to cooperate with people or projects who use different categories.

This is what he said:
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)


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).

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6435
Location: Auckland, New Zealand

PostPosted: Sun 16 Mar 2014, 20:20    Post subject:  

01micko 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.

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 at
http://www.murga-linux.com/puppy/viewtopic.php?t=85757

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6435
Location: Auckland, New Zealand

PostPosted: Sun 16 Mar 2014, 20:23    Post subject:  

seaside wrote:
One other item - quotes inside exec commands are being encoded which breaks jwm.

OK, filed.

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5030
Location: Arizona, U.S.A.

PostPosted: Sun 16 Mar 2014, 23:47    Post subject:  

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/viewtopic.php?t=90660&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 ).
.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [19 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Taking the Puppy out for a walk » Suggestions
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0967s ][ Queries: 13 (0.0088s) ][ GZIP on ]