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