mikshaw
Group: Members
Posts: 4856
Joined: July 2004 |
|
Posted: Oct. 27 2007,01:25 |
|
Quote | the easiest would be to implement 2 different tables | That had crossed my mind, and I've used that method in the past. However, it presents a greater challenge for the end user in that you need to keep track of the order of two tables instead of just one. I think it's much easier to use the label=command syntax in a single table rather than having to make sure that item 12 in table one is the appropriate label for the command specified by item 12 in table two. With the latest version of this script I no longer have to be concerned about how many items are in the table, since it uses the k and cnt variables to keep track of it while the labels and commands are being read.
One thing I don't understand is the fact that the order of the tables is not necessarily the same when the items are displayed, but I think this is a limitation of Lua. This might be one benefit of using two numerical tables.
Quote | I'd implement the reading of the buttons from a external text file instead | Also something I've considered =o) I don't know if that's something I'll do, though. Personally I like to keep things as simple as possible, and in the case of small files simplicity means not splitting things up unnecessarily. With tiny scripts I tend to prefer keeping everything in a single file. I still haven't decided whether a split of the menu content and the script is unnecessary.
Then again, I'm not really making this for me anyway. For a minimalistic menu I still much prefer dmenu, so I can't see myself using this script for anything other than learning and future reference.
-------------- http://www.tldp.org/LDP/intro-linux/html/index.html
|