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) </ 1 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,04:36 QUOTE

well I haven't given up on it entirely, since I'm making some progress.  Lua supposedly doesn't have trouble with nested quotes regardless of what type of quotes they are, but Ion apparently does have a problem with it.  I converted all the double quotes in my fluxbox menu to single quotes, and that allowed Ion to load the menu.  However, it still gives numerous errors that dont make any sense to me...I look at the line in question, and there's nothing wrong with it.  It seems like Ion guesses a lot...some of the errors it gave were in relation to nearby lines and not the line specified in the error message.

Overall, Ion has a long way to go before it's what I'd consider stable.  When you can't use certain commands in its menu its pretty much useless to me.
I'm definitely not going to bother with v3 until it gets some of these bugs fixed....so back to Ion2 I go....


/* EDIT: the more I mess around with Ion the less I like it.  It's not just the menu items.  When I first tried it I thought it was a great idea...and i still do.  Unfortunately the configuration is unnecessarily complex, with multiple files relating to what I consider to be very basic features.
The biggest annoyance I have with it is its keybindings.  First, no window manager should grab single keystrokes by default....that's just plain stupid.  Single-key bindings are for applications.  Ok, we can change that.  But in order to do it you have at least two separate files to edit.  One file defines what your Mod keys are, and another file defines what the bindings are.  Oh...and did I mention that window managers should never grab single keystrokes?
In order to use midnight commander with any sort of efficiency I have to rebind every damn F key to use a Modifier in Ion, and the keybinding in Ion3 uses an entirely different method than Ion2, so that's double the work.
Bah...humbug.   I'm going back to messing with Screen and Fluxbox.... */


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





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: Jan. 14 2005,06:57 QUOTE

You need a counter to keep track of your submenu nesting.

In other words:

You enter a submenu and set submenu_nest=1

You then enter a second (nested) submenu and set submenu_nest=submenu_net +1  (is now set to 2)

Then when you hit your first "End" you decrease the submenu_nest counter by 1

When you hit your second "End" you decrease the counter again and now it's value is 0 and you know that you are no longer nesting anymore.


Hopefully my example gets the point across. I am not a programmer, but this is my understanding of the technique used in the whitebox program.

For a better understanding, download the source code from the website and read it.

Hope this helps.

[Edit] Maybe I should read the 2nd page of the thread before replying.  At least the suggestion to download and read the whitebox source code is still relevent.
Back to top
Profile PM 
henk1955 Offline





Group: Members
Posts: 249
Joined: June 2004
Posted: Jan. 14 2005,08:16 QUOTE

to make things a like more complicated it looks like this
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", "exitmenu"),
})

is a valid ion-menu

as you will see the "Programs" menu is nesteted within the:mainmenu.


--------------
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,19:18 QUOTE

I've quit complaining for now :D

Yeah...that's alright, though.  Adding a submenu into the main menu is easy enough, but then you've got nested submenus inside of other submenus.  It wouldn't be so confusing except that Ion defines its submenus in a different section, so when you hit a submenu in Fluxbox, not only do you need to know where the submenu is placed but you also need to define the contents of that submenu in a different part of the menu.  That definition can also include submenu items.

I've made a tiny bit of progress today.  The nested quotes have been fixed so that they are escaped in the Ion conversion...now they don't cause errors.  However, I'm still having trouble just getting a single level of submenus to be properly written.  Many of them overlap each other, making a bit of a mess.  When I manually edit the file and move the misplaced 'defmenu' lines to their proper places the Ion menu will load with all of the submenus listed on the same level under the main menu....so I know the individual lines now have the proper syntax (except for commands which include curly braces...that's something that troubles me in other fluxbox-related scripts as well).

So next time I get back to it I'm going to start by just gettint the 'defmenu' lines and their terminators properly placed, before considering how to deal with multiple nested submenus.

Thanks for the input guys!


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





Group: Guests
Posts: 935
Joined: Dec. 2003
Posted: Jan. 14 2005,19:29 QUOTE

mikshaw -

With your bash skills I was wondering if you would be interested in creating something along the lines of MenuRank for DSL. I think the guy who created MenuRank lost interest because I haven't seen anything new for a long time. According to the site, it has a few bugs. I suggested something like this to John awhile back but not sure if he found it worth messing with. It's just a nice little utility for putting your most used programs at the top of your menu. Mainly a convenience app.

I am reading up on bash scripting but have a LONG way to go!

Chris
Back to top
Profile PM MSN YIM 
41 replies since Jan. 10 2005,01:43 < Next Oldest | Next Newest >

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

Pages: (9) </ 1 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