Skip to content

Commit 923db23

Browse files
committed
Merge branch 'Newt'
2 parents 5e3805e + 4b4f307 commit 923db23

File tree

6 files changed

+411
-265
lines changed

6 files changed

+411
-265
lines changed

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,16 @@
11
/menu
2+
/newt4
3+
/newt4.c
4+
/newt
5+
/newt.c
6+
/newt2
7+
/newt2.c
8+
/newt3
9+
/newt3.c
10+
testnewt.c
11+
newtmenu
12+
testnewt
13+
newtmenu.c
14+
/newtmenu.c
15+
*.swp
16+
menufile3

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,27 @@ NOTE:
77
- The menu app will decide whether to draw the menu in one or two columns depending on how many entries are in the menufile.
88
- If you use it or modify it, I'd appreciate a mention in the source code (taking into account [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](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.
99

10-
![](menu-gif2.gif)
10+
![](menu-gif3.gif)
1111

1212
Build on Ubuntu 16.04
1313
=====================
1414
1. Install curses libraries: `sudo apt-get install libncurses5-dev libncursesw5-dev`
15-
2. Compile the menu.c: `gcc -v -o menu menu.c -lncurses`
16-
3. Create a menu file - sample in repo
17-
4. Start it up: `./menu menufile`
15+
2. Install newt libraries: `sudo apt-get install libnewt-dev`
16+
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).
1825

1926
menufile - format
2027
=================
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.
2231
- 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 :).
2332
- Max number of options - 30.
2433

@@ -44,6 +53,7 @@ As time permits - here's the plan:
4453
- General code improvements
4554
- [x] Changed kerbpass to passwd
4655
- [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
4757

4858
Licensing
4959
=========

menu-gif2.gif

-130 KB
Binary file not shown.

menu-gif3.gif

132 KB
Loading

0 commit comments

Comments
 (0)