prepare for 4.5.1
[xmenu] / README.md
... / ...
CommitLineData
1<p align="center">
2 <img src="/demo.gif", title="demo"/>
3</p>
4
5# XMenu
6
7XMenu is a menu utility for X.
8XMenu receives a menu specification in stdin, shows a menu for the user
9to select one of the options, and outputs the option selected to stdout.
10XMenu can be controlled both via mouse and via keyboard.
11
12In order to generate a menu of applications based on .desktop entries,
13as specified by XDG, checkout [xdg-xmenu](https://github.com/OliverLew/xdg-xmenu)
14by [OliverLew](https://github.com/OliverLew).
15
16Check out my other project, [xclickroot](https://github.com/phillbush/xclickroot) for an application that can
17spawn xmenu by right clicking on the root window (i.e. on the desktop).
18
19
20## Features
21
22XMenu comes with the following features:
23
24* XMenu reads something in and prints something out, the UNIX way.
25* Submenus (some menu entries can spawn another menu).
26* Separators (menu entries can be separated by a line).
27* Icons (menu entries can be preceded by an icon image).
28* X resources support (you don't need to recompile xmenu for configuring it).
29
30
31## Files
32
33The files are:
34
35* `./README`: This file.
36* `./Makefile`: The makefile.
37* `./config.h`: The hardcoded default configuration for XMenu.
38* `./config.mk`: The setup for the makefile.
39* `./demo.gif`: A gif demonstrating how XMenu works.
40* `./xmenu.1`: The manual file (man page) for XMenu.
41* `./xmenu.c`: The source code of XMenu.
42* `./xmenu.sh`: A sample script illustrating how to use XMenu.
43* `./icons/`: Icons for the sample script
44
45
46## Installation
47
48First, edit `./config.mk` to match your local setup.
49
50In order to build XMenu you need the `Imlib2`, `Xlib`, `Xinerama` and `Xft` header files.
51The default configuration for XMenu is specified in the file `config.h`,
52you can edit it, but most configuration can be changed at runtime via
53X resources. Enter the following command to build XMenu. This command
54creates the binary file `./xmenu`.
55
56 make
57
58By default, XMenu is installed into the `/usr/local` prefix. Enter the
59following command to install XMenu (if necessary as root). This command
60installs the binary file `./xmenu` into the `${PREFIX}/bin/` directory, and
61the manual file `./xmenu.1` into `${MANPREFIX}/man1/` directory.
62
63 make install
64
65
66## Running XMenu
67
68XMenu receives as input a menu specification where each line is a menu
69entry. Each line can be indented with tabs to represent nested menus.
70Each line is made out of a label and a command separated by any number
71of tabs. Lines without labels are menu separators.
72
73See the script `./xmenu.sh` for an example of how to use XMenu to draw a
74simple menu with submenus and separators. The file `./demo.gif` shows how
75the menu generated by that script looks like.
76
77Read the [manual](https://github.com/phillbush/xmenu/wiki) for more information on running XMenu.