1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
renu - recursive menu
=====================
renu uses a line selection program to choose and exectue options specified in a file.
Requirements
------------
To run renu you will need a program like dmenu or rofi.
Installation
------------
Enter the following command to compile and install:
```sh
make install
```
By default, everything is installed in /usr/local. To change the
install directory, edit config.mk.
Writing a menu file
-------------------
renu reads a file, to determine how the menu(s) should be constructed
and what should they do. Each line represents an option:
- Menu (m name)
This line represents the start of a menu. All the lines that follow,
until another menu line is found, represent the entries of this menu.
The default name the program will open is 'def'.
- Empty line and Comment (# ...)
If the line starts with a # or is empty, it is ignored and regarded as
a comment.
- Submenu (s entry name)
The submenu line will open the menu with the specified name, once
selected. Entry is the displayed name. The line takes two arguments.
- Print (p entry [value])
This option will print the value once selected. The value is an
optional argument and, if empty, entry will be printed.
- Run (r entry command)
This line takes two arguments. The option will run the command as if
it were run with sh -c "command".
- Arguments
Each line uses one or more arguments. The arguments are separated by
spaces, thus if you want to have spaces in the arguments, you should
either escape the space or use double quotes. You can escape a
character using backslash ('\'). Note that the double quotes ('"') and
backslashes ('\') inside the argument always have to be escaped.
Configuartion
-------------
The settings for compiling and installing renu are in config.mk
By default renu uses dmenu for selecting the options. To change the
program, edit the config.h file and recompile. If you don't see the
config.h file, try building renu.
|