remove typo
[xmenu] / README.md
CommitLineData
ba97c0d2
GW
1<p align="center">
2 <img src="/demo.gif", title="demo"/>
70063f16 3</p>
c15958bd 4
c1640685 5# XMenu
c15958bd 6
571d99e1 7XMenu is a menu utility for X.
8XMenu receives a menu specification in stdin, shows a menu for the user
a7732690 9to select one of the options, and outputs the option selected to stdout.
883ec17f 10XMenu can be controlled both via mouse and via keyboard.
571d99e1 11
70063f16 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
47f3bbaf 16Check out my other project, [xclickroot](https://github.com/phillbush/xclickroot) for an application that can
d94ef325 17spawn xmenu by right clicking on the root window (i.e. on the desktop).
18
571d99e1 19
c1640685 20## Features
33376f54 21
22XMenu comes with the following features:
b3419d47
GW
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).
c15958bd 28* X resources support (you don't need to recompile xmenu for configuring it).
33376f54 29
30
c1640685 31## Files
571d99e1 32
33The files are:
47f3bbaf 34
70063f16 35* `./README`: This file.
47f3bbaf
GW
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
a7732690 44
27443900 45
c1640685 46## Installation
a7732690 47
47f3bbaf 48First, edit `./config.mk` to match your local setup.
571d99e1 49
47f3bbaf
GW
50In order to build XMenu you need the `Imlib2`, `Xlib` and `Xft` header files.
51The default configuration for XMenu is specified in the file `config.h`,
571d99e1 52you can edit it, but most configuration can be changed at runtime via
53X resources. Enter the following command to build XMenu. This command
47f3bbaf 54creates the binary file `./xmenu`.
a7732690 55
571d99e1 56 make
a7732690 57
47f3bbaf 58By default, XMenu is installed into the `/usr/local` prefix. Enter the
571d99e1 59following command to install XMenu (if necessary as root). This command
47f3bbaf
GW
60installs the binary file `./xmenu` into the `${PREFIX}/bin/` directory, and
61the manual file `./xmenu.1` into `${MANPREFIX}/man1/` directory.
a7732690 62
571d99e1 63 make install
a7732690 64
a7732690 65
c1640685 66## Running XMenu
571d99e1 67
68XMenu receives as input a menu specification where each line is a menu
a7732690 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
7fbd1c5e 71of tabs. Lines without labels are menu separators.
a7732690 72
47f3bbaf 73See the script `./xmenu.sh` for an example of how to use XMenu to draw a
b3419d47 74simple menu with submenus and separators. The file `./demo.gif` shows how
4f898cc3 75the menu generated by that script looks like.
571d99e1 76
0bb24147 77Read the [manual](https://github.com/phillbush/xmenu/wiki) for more information on running XMenu.