User Feedback :: A TWM for Open DSL



I don't know...that looks like something a bit beyond my scope.  i'd thought about using a fluxbox-menu-related project as a Lua learning tool, though, if I ever get back to reading the docs.

One thing that wouldn't be too difficult is making a more basic version of this which just generates a personal menu.  Fluxbox-dev has the ability to include additional files within its menu file using '[include] (filename)'.  That line could be appended to the top of your menu and load the automatically-generated entries without touching the rest of the menu.  As I said, though, it's a flux-dev feature so it wouldn't work in a standard DSL system.  I also don't know how to keep track of which applications are being used without modifying the main menu

i think you dont have to put the submenus in a subsection!
you CAN make it i ONE just like in fluxbox.
i you read the example i gave you will see the subsection of "programs" in inside the main menu.
Code Sample

-- Main menu
defmenu("mainmenu", {
   submenu("Programs",{
     menuentry("XTerm", make_exec_fn("xterm")),
     menuentry("emelFM", make_exec_fn("emelfm")),
     menuentry("Xmms", make_exec_fn("xmms")),
     menuentry("Dillo", make_exec_fn("dillo")),
     menuentry("Xzgv", make_exec_fn("xzgv")),
     -- The query module must also be loaded for this binding to work.
     menuentry("Run...", querylib.query_exec),
   }),
--    menuentry("Lock screen", make_exec_fn("xlock")),
   menuentry("Help", querylib.query_man),
   menuentry("About Ion", querylib.show_aboutmsg),
   submenu("Styles", "stylemenu"),
   submenu("Exit", {
     --menuentry("Restart", querylib.query_restart),
     menuentry("Restart", restart_wm),
     menuentry("Restart Fluxbox", function() restart_other_wm("fluxbox") end),
     --menuentry("Exit", querylib.query_exit),
     menuentry("Exit", exit_wm),
   }),
})


This i a hole, valid, complete, ion menu. i has submenus and is not using subsections

Yes, but that would do two things to which I'm opposed =o)
1) It wouldn't exactly mimic the structure of the user's fluxbox menu.  I want to make it as seamless as possible to switch between the WMs.
2) Having everything under one subsection will mean you have a VERY LONG selection of items to search through.  

Fluxbox has nested menus inside nested menus, like most other window managers.  Keeping that submenu structure identical between the two window managers is my ultimate goal.  There are some WM-specific features that won't translate, but it can mostly be done.

please try this menu you wil see if works just like fuxbox.
menu level 1 shows
Programs >>
Help
About
Styles >>
Exit >>
then level 2 "Programs" shows
Xterm
Emelfm
XMMS

Yes, I know.....BUT.....You are digging in only one level.  Xterm, Emelfm, and XMMS will all be displayed directly under "Programs" (equivalent to "Apps" in DSL).  I've had a menu converter that can do that since July =o).
This doesn't account for the fact that a user made menu, as well as the default menu in DSL, is more complex than that.  It has multiple level2 entries, which contain level3 entries, which contain level4, etc, as well as various [exec] entries mixed in with submenus on various levels..  As the fluxbox is read in for conversion, there will be multiple times the level will fluctuate, and in order to properly convert to Ion format you need to pay close attention to not only which level you are on, but also which prior levels have not been fully constructed yet and you need to know where to pick up where the level left off.
Additionally, the 'defmenu' entries need to be kept up as well.  These can just be appended to the end of the file, but while each is being created they have to follow along with the submenu entries being created in case a submenu needs to be added to a particular defmenu.

I've got it working to small degree using the temp files, but I had to print out copies of the menus so I can work this out visually.  I think I will need to use mutiple counters in order to keep track of the various sections, and I'm also not going to use any of the default menu as a building block within the script...I thought that would make it easier, but it's just a hinderance.

//edit
I think I'm going to take a fresh approach with this.  I've been attempting to do it all with a linear text editor (sed), and that's causing me a lot of confusion.  Sed is great for converting the individual lines, but the overall layout of the file probably needs to be handled in another way...how that is I'm not sure, but I'm going to take my two menu hardcopies away from the computer and sit down with a pencil and a notebook.....

Next Page...
original here.