2020-05-27 16:19:49 +02:00
|
|
|
XMenu
|
2020-05-16 00:02:23 +02:00
|
|
|
|
2020-05-27 16:19:49 +02:00
|
|
|
XMenu is a menu utility for X.
|
|
|
|
XMenu receives a menu specification in stdin, shows a menu for the user
|
2020-05-16 00:02:23 +02:00
|
|
|
to select one of the options, and outputs the option selected to stdout.
|
2020-05-27 16:19:49 +02:00
|
|
|
XMenu can be controlled both via mouse and via keyboard. The menu is a
|
|
|
|
pop-up menu (that is, after selecting an option, the menu disappears).
|
|
|
|
|
|
|
|
NOTE:
|
|
|
|
The -w (windowed) option was removed from the master branch. It was too
|
|
|
|
buggy in tiled window managers and required more code to be maintained.
|
|
|
|
|
|
|
|
|
|
|
|
§ Files
|
|
|
|
|
|
|
|
The files are:
|
|
|
|
• ./README: This file.
|
|
|
|
• ./Makefile: The makefile.
|
|
|
|
• ./config.h: The hardcoded default configuration for XMenu.
|
|
|
|
• ./config.mk: The setup for the makefile.
|
2020-05-30 05:05:47 +02:00
|
|
|
• ./demo.gif: A gif demonstrating how XMenu works.
|
2020-05-27 16:19:49 +02:00
|
|
|
• ./xmenu.1: The manual file (man page) for XMenu.
|
|
|
|
• ./xmenu.c: The source code of XMenu.
|
|
|
|
• ./xmenu.sh: A sample script illustrating how to use XMenu.
|
2020-05-30 16:07:25 +02:00
|
|
|
• ./patches/ See the §Patches section
|
|
|
|
|
|
|
|
|
|
|
|
§ Patches
|
|
|
|
|
|
|
|
There are some patches that can be applied to XMenu in order to obtain
|
|
|
|
novel functionalities. The patches are located at ./patches. There
|
|
|
|
are the following patches:
|
|
|
|
|
|
|
|
• ./patches/icons.diff: Add suport to image icons before menu entries.
|
|
|
|
|
|
|
|
To apply a patch, use the following command:
|
|
|
|
|
|
|
|
patch -p1 < patches/patch.diff
|
2020-05-16 00:02:23 +02:00
|
|
|
|
2020-05-24 03:06:21 +02:00
|
|
|
|
2020-05-16 00:02:23 +02:00
|
|
|
§ Installation
|
|
|
|
|
2020-05-27 16:19:49 +02:00
|
|
|
First, edit ./config.mk to match your local setup.
|
|
|
|
|
|
|
|
In order to build XMenu you need the Xlib and the Xft header files.
|
|
|
|
The default configuration for XMenu is specified in the file config.h,
|
|
|
|
you can edit it, but most configuration can be changed at runtime via
|
|
|
|
X resources. Enter the following command to build XMenu. This command
|
|
|
|
creates the binary file ./xmenu.
|
2020-05-16 00:02:23 +02:00
|
|
|
|
2020-05-27 16:19:49 +02:00
|
|
|
make
|
2020-05-16 00:02:23 +02:00
|
|
|
|
2020-05-27 16:19:49 +02:00
|
|
|
By default, XMenu is installed into the /usr/local prefix. Enter the
|
|
|
|
following command to install XMenu (if necessary as root). This command
|
|
|
|
installs the binary file ./xmenu into the ${PREFIX}/bin/ directory, and
|
|
|
|
the manual file ./xmenu.1 into ${MANPREFIX}/man1/ directory.
|
2020-05-16 00:02:23 +02:00
|
|
|
|
2020-05-27 16:19:49 +02:00
|
|
|
make install
|
2020-05-16 00:02:23 +02:00
|
|
|
|
|
|
|
|
2020-05-27 16:19:49 +02:00
|
|
|
§ Running XMenu
|
|
|
|
|
|
|
|
XMenu receives as input a menu specification where each line is a menu
|
2020-05-16 00:02:23 +02:00
|
|
|
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
|
2020-05-16 03:51:26 +02:00
|
|
|
of tabs. Lines without labels are menu separators.
|
2020-05-16 00:02:23 +02:00
|
|
|
|
2020-05-30 03:41:52 +02:00
|
|
|
See the script ./xmenu.sh for an example of how to use XMenu to draw a
|
|
|
|
simple menu with submenus and separators. The file ./demo.gif shows how
|
|
|
|
the menu generated by that script looks like.
|
2020-05-27 16:19:49 +02:00
|
|
|
|
|
|
|
Read the manual for more information on running XMenu.
|
|
|
|
|
|
|
|
|
|
|
|
§ License
|
2020-05-17 05:08:23 +02:00
|
|
|
|
2020-05-27 16:19:49 +02:00
|
|
|
This software is in public domain and is provided AS IS, with NO WARRANTY.
|