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: (6) </ 1 2 [3] 4 5 6 >/

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

reply to topic new topic new poll
Topic: recommend a menu, /app launcher/panel/...< Next Oldest | Next Newest >
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: Oct. 25 2007,23:59 QUOTE

Quote
Maybe, but I still think it's a window manager issue. 0,0 works for me. I haven't tried it with Fluxbox or JWM yet.
Heh, well this is my first glance at lua/flua/etc... but just trying an actual test run with the changes with the latest release on Fluxbox (some RC on v1.0) seems to allow the WM to take over with 0,0 whereas other values are actually used (I had my WM settings on tiling, so it did that).  Could be a versioning behaviour discrepancy?
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Oct. 26 2007,00:34 QUOTE

I tested it on dwm, swm, jwm, fluxbox 0.1.14, and fluxbox 1.0.0 (final). All of these window managers placed the app in the correct place except for fluxbox 0.1.14 (the one in DSL). I could see forced tiling being a factor, but I never thought to check that.

I made some changes to the script. It now does not cover the whole width of the screen. The width is determined by the number of buttons. The configuration is marked at the top of the file. If you use more or less than three buttons, both the size of the my_menu table and the table_size variable must be equal. I thought it was easier to have the user change table_size rather than traverse the table just to find its length (table.maxn doesn't work on non-numerical tables).

The app now appears in the top-middle of the screen if your window manager supports it. As I said it works as desired with jwm and swm. With fluxbox you will need to either use a newer version or place it manually.

The "X" button has been removed, but the w:callback is still there, so you will need to force it to close with killall or xkill or something similar.

I would like to be able to stop it from creating a toolbar button in fluxbox/jwm, but I don't know if this is possible.

Code Sample

---- CONFIGURATION
-- menu: label="command"
my_menu={
Aterm="aterm -fn proggy",
Dillo="dillo",
DSLpanel="cpanel.lua"
}

size=11 -- text size
bh=16 -- button height
bw=100 -- button width
table_size=3 -- number of table items
---- END CONFIGURATION

barw=table_size*bw
w=fltk:Fl_Window(Fl:w()/2-barw/2,0,barw,bh,"MLmenu")
w:callback(function() end)
butt_pack=fltk:Fl_Pack(0,0,barw,bh)
butt_pack:type(fltk.FL_HORIZONTAL)

butt={}
cnt=1
for k,v in pairs(my_menu) do
butt[cnt]=fltk:Fl_Button(0,0,bw,bh)
butt[cnt]:label(k)
butt[cnt]:labelsize(size)
butt[cnt]:callback(function() os.execute(v.." &") end)
butt[cnt]:box(fltk.FL_BORDER_BOX)
cnt=cnt+1
end

fltk:Fl_End()
w:border(0)
w:show()
Fl:run()


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





Group: Members
Posts: 3275
Joined: July 2006
Posted: Oct. 26 2007,02:04 QUOTE

Using the default settings for fluxbox under DSL 4.0 there is no window/frame decoration, although I still had to issue position() to set it in the correct location (with width being the same copied from Fl_Window ... it seems that one is ignored then?)
Back to top
Profile PM 
curaga Offline





Group: Members
Posts: 2163
Joined: Feb. 2007
Posted: Oct. 26 2007,13:15 QUOTE

Nice. I actually want it not to be user-closable.

I will be using it under failsafewm, which doesn't have any decoration at all..

edit:
Hey, can the buttons' text have spaces? If I quote the name?


--------------
There's no such thing as life. Those mean little jocks invented it ;)
-
Windows is not a virus. A virus does something!
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Oct. 26 2007,13:21 QUOTE

As far as I know, DSL 4.0 uses Fluxbox 0.1.14, which I already mentioned doesn't properly position the app. Are you saying position() works now? It didn't work for me when I tried it last night (DSL 4.0RC5/Fluxbox), any better than putting the coordinates in Fl_Window did. I wonder if putting them in both places is necessary for some wms that need to be given a second nudge =o)

--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
26 replies since Oct. 21 2007,14:40 < Next Oldest | Next Newest >

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

Pages: (6) </ 1 2 [3] 4 5 6 >/
reply to topic new topic new poll
Quick Reply: recommend a menu

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