The time now is Sun 22 Apr 2018, 03:01
All times are UTC - 4 |
Page 100 of 283 [4236 Posts] |
Goto page: Previous 1, 2, 3, ..., 98, 99, 100, 101, 102, ..., 281, 282, 283 Next |
Author |
Message |
mcewanw
Joined: 16 Aug 2007 Posts: 3194 Location: New Zealand
|
Posted: Sun 23 Feb 2014, 18:18 Post subject:
Re: Alternative menu solution |
|
saintless wrote: |
Hi, William.
See the result on the picture after changing false to true.
Is this what I should see or I have to make other changes?
Isn't less submenus what we are looking for or I do something wrong and the result is different for you?
Toni |
Toni, it was because I had some other applications installed and debian menu system is semi-intelligent so reorganises menus best it can when hint_optimize=true.
However, when booting without a live-rw, in menu.h please try:
Code: | #If you want menu to optimize the tree, set this to true:
hint_optimize=true
#for more info on the other variables, see /usr/share/doc/menu/
#hint_nentry=6
hint_topnentry=7
hint_mixedpenalty=64 |
Then update-menus again. The resulting menu should be very similar to what you achieved by modifying icewm-common but without having to alter that one.
The meaning of these hints is given in sections 7.3 and 7.4 here:
http://www.debian.org/doc/packaging-manuals/menu.html/ch7.html
You can play with these hint values for different results. Terry... it's not that I understand debian menu system - it is all a bit of black magic...
Advantage of using menu.h only is that changes there should reflect also when using other wm such as jwm, but the results, being dynamic and programmably achieved via 'hints', are not guaranteed. If you want to just cut out submenus in fixed way then your alternative method to modify icewm-common script might be best way, but then you'd have to find similar scheme for jwm etc, so it would be nice if mod to menu.h would do.
_________________ SomeOfMyWork with links:
dCoreDog
weX, scrox, Precord, Premote, fokSyfEyeR, xhippo-mod, flite_hts_pet
|
Back to top
|
|
 |
saintless

Joined: 11 Jun 2011 Posts: 3882 Location: Bulgaria
|
Posted: Mon 24 Feb 2014, 09:41 Post subject:
|
|
Hi, William.
Experimented a little with menu.h hints and this is the best change I can make to the moment.
Code: |
sort=$sort ":" ifelse($command, "1", "0" ) ":" title()
hint_optimize=true
hint_nentry=5
hint_topnentry=7
hint_mixedpenalty=15
hint_max_ntry=3 # maybe not needed if hints_max_iter_hint=10 is on
hints_max_iter_hint=10 # may be not needed if hint_max_ntry=3 is on
|
The problem is mpaint stays program menu entry and there is no Graphics folder. To get it in Graphics folder we need to install xpaint first or another Graphic appication. It is like minimum 2 programs are needed for menu folder but I can't find the right combinantion. Every simple change in some hint breaks everything.
Please. test this combination and write if it is Ok for you. It gives almost the same (but not the same) menu for JWM and IceWM
Toni
|
Back to top
|
|
 |
mcewanw
Joined: 16 Aug 2007 Posts: 3194 Location: New Zealand
|
Posted: Mon 24 Feb 2014, 14:23 Post subject:
|
|
saintless wrote: |
The problem is mpaint stays program menu entry and there is no Graphics folder. To get it in Graphics folder we need to install xpaint first or another Graphic appication. It is like minimum 2 programs are needed for menu folder but I can't find the right combinantion. Every simple change in some hint breaks everything.
Please. test this combination and write if it is Ok for you. It gives almost the same (but not the same) menu for JWM and IceWM
|
Hi Toni, Yes, I had previously also tried various hints to see if I could encourage mplayer into the Graphics folder but realised it wouldn't do it when only graphics program. The combination you suggest is fine as far as I am concerned though. Anyway, should anyone ever install another graphics program, the Graphics folder will automagically appear anyway, so no problem really! :-) Main thing is that the long sequence of submenus has gone. Very good I feel. I imagine Debian will eventually come up with some modification to menu system that uses .desktop files instead of /usr/share/menu items, but using hints like this saves needing to add the 5MB perl addition at least and with similar result. A machine-created menu can never be as aesthetically pleasing as one specially crafted by a human I feel. Nevertheless, it's not bad and saves a lot of human tinkering.
_________________ SomeOfMyWork with links:
dCoreDog
weX, scrox, Precord, Premote, fokSyfEyeR, xhippo-mod, flite_hts_pet
|
Back to top
|
|
 |
fredx181

Joined: 11 Dec 2013 Posts: 2895 Location: holland
|
Posted: Mon 24 Feb 2014, 15:23 Post subject:
|
|
saintless wrote: | Hi, William.
Experimented a little with menu.h hints and this is the best change I can make to the moment.
Code: |
sort=$sort ":" ifelse($command, "1", "0" ) ":" title()
hint_optimize=true
hint_nentry=5
hint_topnentry=7
hint_mixedpenalty=15
hint_max_ntry=3 # maybe not needed if hints_max_iter_hint=10 is on
hints_max_iter_hint=10 # may be not needed if hint_max_ntry=3 is on
|
The problem is mpaint stays program menu entry and there is no Graphics folder. To get it in Graphics folder we need to install xpaint first or another Graphic appication. It is like minimum 2 programs are needed for menu folder but I can't find the right combinantion. Every simple change in some hint breaks everything.
Please. test this combination and write if it is Ok for you. It gives almost the same (but not the same) menu for JWM and IceWM
Toni |
Hi Toni, William
I think Toni's previous solution with the edited icewm-common only was just about perfect.
Why change it with some problematic setup that could possibly also work with JWM.
After all DebianDog uses icewm, nothing else.
Maybe it's possible to make same sort of solution (simular to editing icewm-common) with JWM and include that in the JWM.deb.
Just some thoughts..
EDIT;
btw, I just noticed that gpicview appears not in the menu (because not present in /usr/share/menu but it is in /usr/share/applications)
Regards
Fred
|
Back to top
|
|
 |
mcewanw
Joined: 16 Aug 2007 Posts: 3194 Location: New Zealand
|
Posted: Mon 24 Feb 2014, 15:58 Post subject:
|
|
fredx181 wrote: | saintless wrote: | Hi, William.
Experimented a little with menu.h hints and this is the best change I can make to the moment.
Code: |
sort=$sort ":" ifelse($command, "1", "0" ) ":" title()
hint_optimize=true
hint_nentry=5
hint_topnentry=7
hint_mixedpenalty=15
hint_max_ntry=3 # maybe not needed if hints_max_iter_hint=10 is on
hints_max_iter_hint=10 # may be not needed if hint_max_ntry=3 is on
|
The problem is mpaint stays program menu entry and there is no Graphics folder. To get it in Graphics folder we need to install xpaint first or another Graphic appication. It is like minimum 2 programs are needed for menu folder but I can't find the right combinantion. Every simple change in some hint breaks everything.
Please. test this combination and write if it is Ok for you. It gives almost the same (but not the same) menu for JWM and IceWM
Toni |
Hi Toni, William
I think Toni's previous solution with the edited icewm-common only was just about perfect.
Why change it with some problematic setup that could possibly also work with JWM.
After all DebianDog uses icewm, nothing else.
Maybe it's possible to make same sort of solution (simular to editing icewm-common) with JWM and include that in the JWM.deb.
Just some thoughts..
EDIT;
btw, I just noticed that gpicview appears not in the menu (because not present in /usr/share/menu but it is in /usr/share/applications)
Regards
Fred |
I'm fine with either method Fred.
_________________ SomeOfMyWork with links:
dCoreDog
weX, scrox, Precord, Premote, fokSyfEyeR, xhippo-mod, flite_hts_pet
|
Back to top
|
|
 |
saintless

Joined: 11 Jun 2011 Posts: 3882 Location: Bulgaria
|
Posted: Mon 24 Feb 2014, 16:02 Post subject:
|
|
Hi, Fred.
Thanks about gpicview. I will create /usr/share/menu file.
About Icewm+JWM - DebianDog will have JWM in the next testing module. I have it included but not ready to be uploaded yet.
I also just found the changes in menu.h + commening only one line - treewalk= in /etc/menu-methods/icewm-common and /etc/menu-methods/jwm gives exactly the result as changing only icewm-common
Creating Screenshot /usr/share/menu file fixes Graphic folder with mtpaint and screenshot to appear.
I think we can close start menu issue. We need only to create system and utilities folders for jwm manual as they are in icewm menu.
Toni
|
Back to top
|
|
 |
mcewanw
Joined: 16 Aug 2007 Posts: 3194 Location: New Zealand
|
Posted: Mon 24 Feb 2014, 16:06 Post subject:
|
|
That's great Toni. A step closer to a beta iso release!
_________________ SomeOfMyWork with links:
dCoreDog
weX, scrox, Precord, Premote, fokSyfEyeR, xhippo-mod, flite_hts_pet
|
Back to top
|
|
 |
fredx181

Joined: 11 Dec 2013 Posts: 2895 Location: holland
|
Posted: Mon 24 Feb 2014, 16:36 Post subject:
|
|
Hi Toni, William
Quote: | About Icewm+JWM - DebianDog will have JWM in the next testing module. I have it included but not ready to be uploaded yet. |
Oops, didn't know that.
Quote: | I also just found the changes in menu.h + commening only one line - treewalk= in /etc/menu-methods/icewm-common and /etc/menu-methods/jwm gives exactly the result as changing only icewm-common |
Ah, I spoke to soon, that's nice
Just had the feeling this would be a never ending story of trying to understand the mysterious debian menu
Fred
|
Back to top
|
|
 |
saintless

Joined: 11 Jun 2011 Posts: 3882 Location: Bulgaria
|
Posted: Mon 24 Feb 2014, 16:41 Post subject:
|
|
fredx181 wrote: | Just had the feeling this would be a never ending story of trying to understand the mysterious debian menu  |
Yes, Fred. I had the same feeling one hour ago
We have luck this time.
Toni
_________________ Farewell, Nooby, you will be missed...
|
Back to top
|
|
 |
fredx181

Joined: 11 Dec 2013 Posts: 2895 Location: holland
|
Posted: Mon 24 Feb 2014, 17:26 Post subject:
|
|
saintless wrote: | fredx181 wrote: | Just had the feeling this would be a never ending story of trying to understand the mysterious debian menu  |
Yes, Fred. I had the same feeling one hour ago
We have luck this time.
Toni |
Well, don't want to spoil the party... but I think still the problem persists that there are more than one items needed to have a category appearing.
e.g. I have iceweasel installed and the "Webbrowsing" category is missing and iceweasel is at bottom of menu.
Also mpaint you solved by creating screenshots in the "Graphics" folder.
So what if the user uninstalls mpaint?
To be sure I've done right, here's my edited icewm-common:
Code: | #!/usr/bin/install-menu
compat="menu-1"
!include menu.h
outputencoding="LOCALE"
function iconordash()=ifelse(icon(),"\"" icon() "\"","-")
function q($com)=esc($com,"\"")
supported
x11= " prog \"" q(title()) "\" " iconordash() " /bin/sh -c \"" q($command) "\"\n"
text= " prog \"" q(title()) "\" " iconordash() " /bin/sh -c \"" q(term()) "\"\n"
wm= " restart \"" q(title()) "\" " iconordash() " /bin/sh -c \"" q($command) "\"\n"
endsupported
startmenu=ifneq($title,"Debian menu",ifroot("menu \"" q(title()) "\" folder {\n","menu \"" q(title()) "\" folder {\n"))
endmenu=ifneq($title,"Debian menu","}\n")
genmenu="programs"
submenutitle=""
#submenutitle=" menu \"" $title "\" folder {\n"
preoutput="\n"
rootprefix="/etc/X11/icewm/"
mainmenutitle="Debian menu"
#treewalk="(M)"
userprefix=".icewm" |
And menu.h:
Code: | # -*- mode: shell-script; -*-
#The definitions here are used by all window managers that !include menu.h.
#This way, you can set your preferences (like whether to use xterm/rxvt,
#how long do you want your menu titles, etc) for all window-managers.
#
#This file is part of the menu package (version 1.4 and higher).
#For more information, see /usr/share/doc/menu/html
#If you prefer long titles, change the definition below accordingly.
function title()=$title
#function title()=ifelse($longtitle,$longtitle,$title)
#If you don't like to see the icons, (un)comment (out) the lines below:
function icon()=ifelse($icon32x32, $icon32x32, \
ifelse($icon16x16, $icon16x16, $icon))
#function icon()= ""
#Define the X terminal emulator to use for text apps under X11.
#The following use the x-terminal-emulator alternative.
function term()=\
"x-terminal-emulator " ifnempty($visible,"-ut") \
ifnempty($geometry,"-geometry ") $geometry \
" -T \"" esc(title(),"\\\"") "\"" \
" -e sh -c \"" esc($command,"\\\"") "\""
#The above is more correct but unfortunately, some menu-methods
#do not support ''.
#function term()=\
# "x-terminal-emulator " ifnempty($visible,"-ut") \
# ifnempty($geometry,"-geometry ") $geometry \
# " -T '" escwith(title(),"'","'\\'") \
# "' -e sh -c '" escwith($command,"'","'\\'") "'"
#Examples:
#Use a specially cooked xterm instead:
#function term()=\
# "xterm -sb -sl 500 -j -ls -fn 7x14 -geometry 80x30"\
# " -T '" escwith(title(),"'","'\\'") \
# "' -e sh -c '" escwith($command,"'","'\\'") "'"
#Force use of rxvt:
#function term()=\
# "rxvt " ifnempty($visible,"-ut") \
# ifnempty($geometry,"-geometry ") $geometry \
# " -T '" escwith(title(),"'","'\\'") \
# "' -e sh -c '" escwith($command,"'","'\\'") "'"
# This sort menu entry case-insensitively.
#sort=$sort ":" tolower(title())
#If you want your submenus to come before the commands themselves
#in the menus (in case of mixed menus):
#
sort=$sort ":" ifelse($command, "1", "0" ) ":" title()
#Activate menu section translations:
outputlanguage="LOCALE"
#menu-methods need to set 'outputencoding' before translations are really
#enabled.
#The following is for the hints (or optimised tree structure):
# (For more info on these variables, see /usr/share/doc/menu/*)
#If you want menu to optimize the tree, set this to true:
#hint_optimize=false
#for more info on the other variables, see /usr/share/doc/menu/
#hint_nentry=6
#hint_topnentry=4
#hint_mixedpenalty=15
#
#The variables below are only useful if you want to speedup
#the finding of the best tree.
#hint_minhintfreq=0.1
#hint_mlpenalty=2000
#hint_max_ntry=4
#hint_max_iter_hint=5
#hint_debug=false
sort=$sort ":" ifelse($command, "1", "0" ) ":" title()
hint_optimize=true
hint_nentry=5
hint_topnentry=7
hint_mixedpenalty=15
hint_max_ntry=3 # maybe not needed if hints_max_iter_hint=10 is on
hint_max_iter_hint=10 # may be not needed if hint_max_ntry=3 is on
forcetree
#Due to the existance of both /Apps/System and /System,
#menu gets confused. So, force /System in it's own section
System
endforcetree
|
EDIT:got it well now with towards the end of menu.h (difference is: hint_max_ntry=1 )
Code: | hint_optimize=true
hint_nentry=5
hint_topnentry=7
hint_mixedpenalty=15
hint_max_ntry=1 # maybe not needed if hints_max_iter_hint=10 is on
#hint_max_iter_hint=10 # may be not needed if hint_max_ntry=3 is on |
Iceweasel is now single item in "Network" category and mtpaint single item in "Graphics"
And all the rest is also fine
Fred
|
Back to top
|
|
 |
saintless

Joined: 11 Jun 2011 Posts: 3882 Location: Bulgaria
|
Posted: Mon 24 Feb 2014, 18:17 Post subject:
|
|
fredx181 wrote: | EDIT:got it well now with towards the end of menu.h (difference is: hint_max_ntry=1 )
Code: | hint_optimize=true
hint_nentry=5
hint_topnentry=7
hint_mixedpenalty=15
hint_max_ntry=1 # maybe not needed if hints_max_iter_hint=10 is on
#hint_max_iter_hint=10 # may be not needed if hint_max_ntry=3 is on |
Iceweasel is now single item in "Network" category and mtpaint single item in "Graphics"
And all the rest is also fine |
Thanks, Fred. I will test it this way.
Here is another solution for single item in folder: change hint_mixedpenalty=100
Here is my menu.h content:
Code: | # -*- mode: shell-script; -*-
#The definitions here are used by all window managers that !include menu.h.
#This way, you can set your preferences (like whether to use xterm/rxvt,
#how long do you want your menu titles, etc) for all window-managers.
#
#This file is part of the menu package (version 1.4 and higher).
#For more information, see /usr/share/doc/menu/html
#If you prefer long titles, change the definition below accordingly.
function title()=$title
#function title()=ifelse($longtitle,$longtitle,$title)
#If you don't like to see the icons, (un)comment (out) the lines below:
function icon()=ifelse($icon32x32, $icon32x32, \
ifelse($icon16x16, $icon16x16, $icon))
#function icon()= ""
#Define the X terminal emulator to use for text apps under X11.
#The following use the x-terminal-emulator alternative.
function term()=\
"x-terminal-emulator " ifnempty($visible,"-ut") \
ifnempty($geometry,"-geometry ") $geometry \
" -T \"" esc(title(),"\\\"") "\"" \
" -e sh -c \"" esc($command,"\\\"") "\""
#The above is more correct but unfortunately, some menu-methods
#do not support ''.
#function term()=\
# "x-terminal-emulator " ifnempty($visible,"-ut") \
# ifnempty($geometry,"-geometry ") $geometry \
# " -T '" escwith(title(),"'","'\\'") \
# "' -e sh -c '" escwith($command,"'","'\\'") "'"
#Examples:
#Use a specially cooked xterm instead:
#function term()=\
# "xterm -sb -sl 500 -j -ls -fn 7x14 -geometry 80x30"\
# " -T '" escwith(title(),"'","'\\'") \
# "' -e sh -c '" escwith($command,"'","'\\'") "'"
#Force use of rxvt:
#function term()=\
# "rxvt " ifnempty($visible,"-ut") \
# ifnempty($geometry,"-geometry ") $geometry \
# " -T '" escwith(title(),"'","'\\'") \
# "' -e sh -c '" escwith($command,"'","'\\'") "'"
# This sort menu entry case-insensitively.
sort=$sort ":" tolower(title())
#If you want your submenus to come before the commands themselves
#in the menus (in case of mixed menus):
#
sort=$sort ":" ifelse($command, "1", "0" ) ":" title()
#Activate menu section translations:
outputlanguage="LOCALE"
#menu-methods need to set 'outputencoding' before translations are really
#enabled.
#The following is for the hints (or optimised tree structure):
# (For more info on these variables, see /usr/share/doc/menu/*)
#If you want menu to optimize the tree, set this to true:
hint_optimize=true
#for more info on the other variables, see /usr/share/doc/menu/
hint_nentry=5
hint_topnentry=7
hint_mixedpenalty=100
#
#The variables below are only useful if you want to speedup
#the finding of the best tree.
#hint_minhintfreq=0.1
#hint_mlpenalty=2000
hint_max_ntry=3
hint_max_iter_hint=10
#hint_debug=false
forcetree
#Due to the existance of both /Apps/System and /System,
#menu gets confused. So, force /System in it's own section
System
endforcetree |
Toni
_________________ Farewell, Nooby, you will be missed...
|
Back to top
|
|
 |
fredx181

Joined: 11 Dec 2013 Posts: 2895 Location: holland
|
Posted: Mon 24 Feb 2014, 19:00 Post subject:
|
|
Hi Toni
Quote: | Here is another solution for single item in folder: change hint_mixedpenalty=100 |
I'm starting to like the debian menu now
Very flexible, it needs some studying but then you got something.
I like both your last setup and mine in previous post.
The difference is that your last setup is more compact (less categories); it has the "System" category which includes all apps from: "Package Management", "Monitoring" and "Administration"
My setup in previous post has those last 3 categories but no "System"
Now which one to choose, shall we vote?
Thanks Toni and William for trying the impossible
Fred
|
Back to top
|
|
 |
sunburnt

Joined: 08 Jun 2005 Posts: 5087 Location: Arizona, U.S.A.
|
Posted: Mon 24 Feb 2014, 19:14 Post subject:
|
|
My vote... I hate lots of sub menus, so ours is pretty bad compared to most I`ve seen.
Puppy is nice because most of them have menus that are only one sub menu deep.
Mostly Categories in the root menu, and all the apps are only one sub menu down.
Maybe the default browser in the root menu as it`s the only real common app.
If the link default_web-browser points to a desktop file, I think the icon is shown.
|
Back to top
|
|
 |
mcewanw
Joined: 16 Aug 2007 Posts: 3194 Location: New Zealand
|
Posted: Mon 24 Feb 2014, 22:25 Post subject:
|
|
sunburnt wrote: | My vote... I hate lots of sub menus,
...
Maybe the default browser in the root menu as it`s the only real common app.
If the link default_web-browser points to a desktop file, I think the icon is shown. |
Yes, my vote is also for whichever gives least submenus (within reasonable limits of there being categories of course).
I also like idea of default browser being in the root menu (which I guess would require a small tweak to ~/.icewm/menu), since it is the main app most people use. I note webbrowser is also in Fred's Porteus-Wheezy root menu.
It has certainly been a time-consuming piece of work 'just for a menu', but it is said that testing and fine-tuning the user-experience is what takes longest and most effort. Buy hey guys, we avoid having to install that extra 5MB uncompressed perl module that was contemplated to address the menu situation. 5 MB may not be a lot but enough for some small apps. Better really just to make the iso as small as possible per the 'Light' objective, which better allows users to install their own preferred apps and keeps resource usage lower.
_________________ SomeOfMyWork with links:
dCoreDog
weX, scrox, Precord, Premote, fokSyfEyeR, xhippo-mod, flite_hts_pet
|
Back to top
|
|
 |
sunburnt

Joined: 08 Jun 2005 Posts: 5087 Location: Arizona, U.S.A.
|
Posted: Mon 24 Feb 2014, 23:51 Post subject:
|
|
Toni; I couldn`t get the same results you spoke of, but I did find a flaw in desktop.ctrl.
I had thought that WallPapers would be "off" on first boot, but I see you run it as default.
Here are fixes to both desktop.ctrl and wallpapers.gui
And new ArcDrop that extracts Squash and ISO files, and makes Squash files.
It has a new menu, so all the files are new. You can see it now adds PID to file name.
If these apps prove good, I`ll post the BaCon files for you to upload to Smoky`s.
# Also a Debian girlie pix to add to DebianDog. Too racy...?
Description |
|

Download |
Filename |
NEW_3-Items_18693.zip |
Filesize |
120.12 KB |
Downloaded |
184 Time(s) |
Description |
|
Filesize |
24.56 KB |
Viewed |
142 Time(s) |

|
|
Back to top
|
|
 |
|
Page 100 of 283 [4236 Posts] |
Goto page: Previous 1, 2, 3, ..., 98, 99, 100, 101, 102, ..., 281, 282, 283 Next |
|
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
|