2021-04-17 21:11:47 +00:00
|
|
|
# πmenu(eXkc build)
|
2020-12-04 04:25:32 +00:00
|
|
|
|
|
|
|
πmenu is a pie menu utility for X.
|
2021-01-23 07:32:56 +00:00
|
|
|
πmenu receives a menu specification in stdin, shows a pie menu for the user
|
2020-12-04 04:25:32 +00:00
|
|
|
to select one of the options, and outputs the option selected to stdout.
|
2021-01-23 07:32:56 +00:00
|
|
|
πmenu can be controlled both via mouse and via keyboard.
|
|
|
|
|
|
|
|
## Features
|
2020-12-04 04:25:32 +00:00
|
|
|
|
|
|
|
πmenu comes with the following features:
|
|
|
|
|
|
|
|
* πmenu reads something in and prints something out, the UNIX way.
|
2021-01-23 07:32:56 +00:00
|
|
|
* Submenus (some menu entries can spawn another menu).
|
|
|
|
* Separators (menu entries can be separated by a line).
|
|
|
|
* Icons (menu entries can be preceded by an icon image).
|
2020-12-04 04:25:32 +00:00
|
|
|
|
|
|
|
## Files
|
|
|
|
|
|
|
|
The files are:
|
2021-01-23 07:32:56 +00:00
|
|
|
|
|
|
|
* `./README`: This file.
|
|
|
|
* `./Makefile`: The makefile.
|
|
|
|
* `./config.h`: The hardcoded default configuration for πmenu.
|
|
|
|
* `./config.mk`: The setup for the makefile.
|
|
|
|
* `./demo.gif`: A gif demonstrating how πmenu works.
|
|
|
|
* `./pmenu.1`: The manual file (man page) for πmenu.
|
|
|
|
* `./pmenu.c`: The source code of πmenu.
|
|
|
|
* `./pmenu.sh`: A sample script illustrating how to use πmenu.
|
|
|
|
* `./icons/`: Icons for the sample script
|
2020-12-04 04:25:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
2021-01-23 07:32:56 +00:00
|
|
|
First, edit `./config.mk` to match your local setup.
|
2020-12-04 04:25:32 +00:00
|
|
|
|
2021-01-23 07:32:56 +00:00
|
|
|
In order to build πmenu you need the `Imlib2`, `Xlib` and `Xft` header files.
|
|
|
|
The default configuration for πmenu is specified in the file `config.h`,
|
2020-12-04 04:25:32 +00:00
|
|
|
you can edit it, but most configuration can be changed at runtime via
|
|
|
|
X resources. Enter the following command to build πmenu. This command
|
2021-01-23 07:32:56 +00:00
|
|
|
creates the binary file `./pmenu`.
|
|
|
|
````
|
|
|
|
# sudo make
|
2020-12-04 04:25:32 +00:00
|
|
|
|
2021-01-23 07:32:56 +00:00
|
|
|
````
|
|
|
|
By default, πmenu is installed into the `/usr/local` prefix. Enter the
|
2020-12-04 04:25:32 +00:00
|
|
|
following command to install πmenu (if necessary as root). This command
|
2021-01-23 07:32:56 +00:00
|
|
|
installs the binary file `./pmenu` into the `${PREFIX}/bin/` directory, and
|
|
|
|
the manual file `./pmenu.1` into `${MANPREFIX}/man1/` directory.
|
|
|
|
````
|
|
|
|
# sudo make install
|
2020-12-04 04:25:32 +00:00
|
|
|
|
2021-01-23 07:32:56 +00:00
|
|
|
````
|
2020-12-04 04:25:32 +00:00
|
|
|
## Running πmenu
|
|
|
|
|
|
|
|
πmenu receives as input a menu specification where each line is a menu
|
|
|
|
entry. Each line can be indented with tabs to represent nested menus.
|
|
|
|
Each line is made out of a label and a command separated by any number
|
2021-01-23 07:32:56 +00:00
|
|
|
of tabs. Lines without labels are menu separators.
|
2020-12-04 04:25:32 +00:00
|
|
|
|
2021-01-23 07:32:56 +00:00
|
|
|
See the script `./pmenu.sh` for an example of how to use πmenu to draw a
|
|
|
|
simple menu with submenus and separators. The file `./demo.gif` shows how
|
|
|
|
the menu generated by that script looks like.
|
2020-12-04 04:25:32 +00:00
|
|
|
|
2021-01-23 07:32:56 +00:00
|
|
|
Read the [manual](https://github.com/phillbush/pmenu/wiki) for more information on running πmenu.
|