Joined: July 2004
||Posted: Oct. 26 2007,00:34
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 |
-- menu: label="command"
Aterm="aterm -fn proggy",
size=11 -- text size
bh=16 -- button height
bw=100 -- button width
table_size=3 -- number of table items
---- END CONFIGURATION
for k,v in pairs(my_menu) do
butt[cnt]:callback(function() os.execute(v.." &") end)