Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (9) </ ... 2 3 4 5 6 [7] 8 9 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: A TWM for Open DSL< Next Oldest | Next Newest >
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Jan. 14 2005,19:51 QUOTE

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


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
henk1955 Offline





Group: Members
Posts: 249
Joined: June 2004
Posted: Jan. 14 2005,20:26 QUOTE

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


--------------
You have a Q or just want to chat?
Come to #damnsmalllinux on irc.freenode.net!
Open 24/7

dell latitude c640 p4@1.6Ghz 256Mb DSL0.9.1-remaster
asus p4p800-vm p4@2.8Ghz HT / celeron@2.4Ghz 512Mb DSL0.9.1-remaster (alsadebs.dsl)
ABit BE6 celeron@466 256Mb DSL0.9.1-remaster (xawtv)
Back to top
Profile PM WEB MSN 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Jan. 14 2005,20:46 QUOTE

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.


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
henk1955 Offline





Group: Members
Posts: 249
Joined: June 2004
Posted: Jan. 14 2005,20:52 QUOTE

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


--------------
You have a Q or just want to chat?
Come to #damnsmalllinux on irc.freenode.net!
Open 24/7

dell latitude c640 p4@1.6Ghz 256Mb DSL0.9.1-remaster
asus p4p800-vm p4@2.8Ghz HT / celeron@2.4Ghz 512Mb DSL0.9.1-remaster (alsadebs.dsl)
ABit BE6 celeron@466 256Mb DSL0.9.1-remaster (xawtv)
Back to top
Profile PM WEB MSN 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Jan. 14 2005,21:23 QUOTE

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


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
41 replies since Jan. 10 2005,01:43 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (9) </ ... 2 3 4 5 6 [7] 8 9 >/
reply to topic new topic new poll
Quick Reply: A TWM for Open DSL

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code