You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-5Lines changed: 15 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,18 +7,27 @@ NOTE:
7
7
- The menu app will decide whether to draw the menu in one or two columns depending on how many entries are in the menufile.
8
8
- If you use it or modify it, I'd appreciate a mention in the source code (taking into account [](https://www.gnu.org/licenses/gpl-3.0) ) - drop me an email to let me know what you're using it for, I'd be really interested.
3. Compile the menu.c: `gcc -o menu menu.c -lncurses`
17
+
4. Create a menu file - sample in repo
18
+
5. Start it up - see usage below
19
+
20
+
Usage
21
+
=====
22
+
-`$ menu -c menufile` (display the menufile using simple curses based menu)
23
+
-`$ menu -n menufile` (display the menufile using newt character graphics menu)
24
+
- NOTE: In the menufile you can call menus of other types (e.g. a newt menu can call a curses menu) but you have to hard code that into the menufile - example in the repo (menufile calls menufile2 as a curses menu).
18
25
19
26
menufile - format
20
27
=================
21
-
- Max length of each line - 80 chars.
28
+
- NOTE: IF you exceed these lenghts it will mess your menu's up
29
+
- Max lengh of description line is 30 chars
30
+
- Max length of each command line - 80 chars.
22
31
- NOTE: If you're in any doubt about the length of the command, wrap it up in a script (you wouldn't want your 'rm' command to land on the 80 char boundary :).
23
32
- Max number of options - 30.
24
33
@@ -44,6 +53,7 @@ As time permits - here's the plan:
44
53
- General code improvements
45
54
-[x] Changed kerbpass to passwd
46
55
-[x] Fixed a bug where after an execution the menu would redraw and leave the last menu option number selected displayed at the bottom of the screen - there was an redundant printw() - echo() had already been set.
56
+
-[ ] Handle the lines longer than 30 or 80 chars so it doesn't mess up the menu
0 commit comments