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