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. 12 2005,21:36 QUOTE

I've been trying to work up a script that will convert a fluxbox menu into an Ion menu, but so far all it does is throw everything into a single submenu.  It'll get better after a while, but mostly it just makes my head spin so far.

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






Posted: Jan. 13 2005,04:06 QUOTE

I was reading the updates on the Ion site and came across WMi...  This looks really promising as it's intended to integrated all the features of all the major efforts in TWM UI design, and do it in a stand alone very compact, low resource environment.

WMii sounds even more promising, Noob friendly and capable of being 'all things to all users' that are looking for a light-weight desktop alternative with some really forward looking features.

I look at this stuff purely from a User's POV so it could all be hooey as far as how good these various TWMs are and how appropriate for DSL...  

What do you guys think?
Back to top
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Jan. 13 2005,18:53 QUOTE

I have wmi installed....apparently it didn't make much of an impact on me because I haven't used it since it was first installed, and I don't remember why.


This menu conversion is giving me a headache.  I've had the conversion of individual lines working for months, but the way each WM handles submenus is driving me nuts.
Fluxbox is something like this:
Code Sample

mainmenu
    submenu1
         command-a
         command-b
         submenu2
              command-c
              command-d
          end
    end
    submenu3
         command-e
         command-f
    end
end


Ion is like this:
Code Sample

define_mainmenu
    submenu1
    submenu3
end
define_submenu1
    command-a
    command-b
    submenu2
end
define_submenu2
    command-c
    command-d
end
define_submenu3
    command-e
    command-f
end


It seems simple until I start dealing with nested submenus, then my hair starts turning grey.  Both of them make sense in their own way, but switching from one to the other is rather confusing.


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





Group: Members
Posts: 570
Joined: June 2004
Posted: Jan. 13 2005,19:30 QUOTE

mikshaw, what program are you trying to write this in?  Bash?  Anyone else I'd say couldn't, but I've seen what you can do.

In psuedo code, you could try this:

Code Sample
set X=1
set menu[30] = string <= an array of strings
setup the main menu[1] <= maybe a function, adds header stuff to string
Loop while there are still lines to read & X>0
    if the line is an executable then
         cons a string for the entry to the end of menu[X]
    if the line is the start of a submenu then
         cons a string for the submenu to the end of menu[X]
         set X=X+1
         add header stuff for the new menu to the new string (now X+1)
    if the line is an end
         add end menu stuff to the current menu
         X=X-1
Loop End
for each X, print menu[X]


Since a string can have embeded carriage returns, you can havce multiple "lines" of output in each string.

I don't know what the best language would be.  Perl would be good for separating the 3 parts of the fluxbox menu out [exec](name){action}
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Jan. 13 2005,19:59 QUOTE

Using Bash...I don't know anything else.  Separating the 3 parts is no problem.  As I said, the conversion of individual lines has been working for a while.  It's the splitting up of submenus that has me stumped, particularly when there is a submenu within a submenu:
Code Sample
[submenu] (submenu1)
[exec] (something) {some command}
[submenu] (submenu 2)
[exec] (something) {some command}
[exec] (something) {some command}
[end]
[exec] (something) {some command}
[exec] (something) {some command}
[end]

As you can see, submenu1 and submenu2 are both terminated by the same string.  I just don't know how to determine which submenu is being terminated.  I'm thinking of using a bunch of temp files.  If it reads a '[submenu]' it starts writing to a file until it reads '[end]' UNLESS it reads another '[submenu]' first, in which case it will write to a second file until it reads '[end]' UNLESS it reads another '[submenu]'.  Then it continues writing to the previous file until it reads '[end]' UNLESS it reads another '[submenu]'...etc....
Then I may be able to read those temp files back as I'm building the Ion submenus.

To me this is like thinking about how big the universe is, and how tiny atoms are....i follow it so far until my heads spins, and then I have to stop.  I'll get it eventually, but it's one of those situations where I have to stay calm, with no distractions, and stay aware of how all the pieces connect.  Just writing that last paragraph was beginning to confuse me.

I'll read your pseudo script over a few more times...I'm not completely following it at the moment.  Thank you.

I've already got Ion3 working well in DSL...there's just this last part I want to add in order to keep up with fluxbox menu changes.


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