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