fixing comment
[xmenu] / README.md
CommitLineData
ba97c0d2
GW
1<p align="center">
2 <img src="/demo.gif", title="demo"/>
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.
571d99e1 10XMenu can be controlled both via mouse and via keyboard. The menu is a
11pop-up menu (that is, after selecting an option, the menu disappears).
12
47f3bbaf 13Check out my other project, [xclickroot](https://github.com/phillbush/xclickroot) for an application that can
d94ef325 14spawn xmenu by right clicking on the root window (i.e. on the desktop).
15
571d99e1 16
c1640685 17## Features
33376f54 18
19XMenu comes with the following features:
b3419d47
GW
20
21* XMenu reads something in and prints something out, the UNIX way.
22* Submenus (some menu entries can spawn another menu).
23* Separators (menu entries can be separated by a line).
24* Icons (menu entries can be preceded by an icon image).
c15958bd 25* X resources support (you don't need to recompile xmenu for configuring it).
33376f54 26
27
c1640685 28## Files
571d99e1 29
30The files are:
47f3bbaf
GW
31
32* `./README`: This file.
33* `./Makefile`: The makefile.
34* `./config.h`: The hardcoded default configuration for XMenu.
35* `./config.mk`: The setup for the makefile.
36* `./demo.gif`: A gif demonstrating how XMenu works.
37* `./xmenu.1`: The manual file (man page) for XMenu.
38* `./xmenu.c`: The source code of XMenu.
39* `./xmenu.sh`: A sample script illustrating how to use XMenu.
40* `./icons/`: Icons for the sample script
a7732690 41
27443900 42
c1640685 43## Installation
a7732690 44
47f3bbaf 45First, edit `./config.mk` to match your local setup.
571d99e1 46
47f3bbaf
GW
47In order to build XMenu you need the `Imlib2`, `Xlib` and `Xft` header files.
48The default configuration for XMenu is specified in the file `config.h`,
571d99e1 49you can edit it, but most configuration can be changed at runtime via
50X resources. Enter the following command to build XMenu. This command
47f3bbaf 51creates the binary file `./xmenu`.
a7732690 52
571d99e1 53 make
a7732690 54
47f3bbaf 55By default, XMenu is installed into the `/usr/local` prefix. Enter the
571d99e1 56following command to install XMenu (if necessary as root). This command
47f3bbaf
GW
57installs the binary file `./xmenu` into the `${PREFIX}/bin/` directory, and
58the manual file `./xmenu.1` into `${MANPREFIX}/man1/` directory.
a7732690 59
571d99e1 60 make install
a7732690 61
a7732690 62
c1640685 63## Running XMenu
571d99e1 64
65XMenu receives as input a menu specification where each line is a menu
a7732690 66entry. Each line can be indented with tabs to represent nested menus.
67Each line is made out of a label and a command separated by any number
7fbd1c5e 68of tabs. Lines without labels are menu separators.
a7732690 69
47f3bbaf 70See the script `./xmenu.sh` for an example of how to use XMenu to draw a
b3419d47 71simple menu with submenus and separators. The file `./demo.gif` shows how
4f898cc3 72the menu generated by that script looks like.
571d99e1 73
0bb24147 74Read the [manual](https://github.com/phillbush/xmenu/wiki) for more information on running XMenu.
571d99e1 75
76
c1640685 77## License
08f16589 78
cdeaefaa 79MIT/X Consortium License
80
81© 2020 phillbush
82
83Permission is hereby granted, free of charge, to any person obtaining a
84copy of this software and associated documentation files (the "Software"),
85to deal in the Software without restriction, including without limitation
86the rights to use, copy, modify, merge, publish, distribute, sublicense,
87and/or sell copies of the Software, and to permit persons to whom the
88Software is furnished to do so, subject to the following conditions:
89
90The above copyright notice and this permission notice shall be included in
91all copies or substantial portions of the Software.
92
93THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
94IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
95FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
96THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
97LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
98FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
99DEALINGS IN THE SOFTWARE.