wm-agnostic, X11 menu
Go to file
phillbush 585e3de1a3 Squashed commit of the following:
commit b0f37c9fdb2deb09fa7af59067d57420bfaa87ea
Author: phillbush <phillbush@cock.li>
Date:   Mon Jun 29 09:58:36 2020 -0300

    Compile time error fixes

commit e6bf27768ff2ceeafb4713e90df6a35fa2294d1b
Author: Karl Martin <karlmartin895@gmail.com>
Date:   Sun Jun 28 23:08:02 2020 -0400

    v1.01

    add: user can set gap width prefs

commit 0cca2163092b9aed2823ca65b02959440ef24f41
Author: Karl Martin <karlmartin895@gmail.com>
Date:   Sun Jun 28 23:04:10 2020 -0400

    INIT: func addition + error fix

    hack + prefs: extra x,y padding for initial menu
    add: x padding for child menus
    fix: 2x compile time errors
2020-06-29 10:01:54 -03:00
icons Adding some icons samples 2020-05-31 20:32:05 -03:00
config.h Configuring height directly by setting the height. 2020-06-12 11:37:13 -03:00
config.mk Updating config.mk, manual and README 2020-06-01 11:24:24 -03:00
demo.gif Adding the demo gif to the repository. 2020-05-29 22:41:52 -03:00
Makefile Build: remove slashes after DESTDIR from commands in uninstall target 2020-06-16 18:12:09 +02:00
README Adding reference to xclickroot. 2020-06-24 14:24:22 -03:00
xmenu.1 Configuring height directly by setting the height. 2020-06-12 11:37:13 -03:00
xmenu.c Squashed commit of the following: 2020-06-29 10:01:54 -03:00
xmenu.sh Merging icons branch on master branch. 2020-05-31 20:29:46 -03:00

                                 XMenu

XMenu is a menu utility for X.
XMenu receives a menu specification in stdin, shows a menu for the user
to select one of the options, and outputs the option selected to stdout.
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).

Check out my other project, xclickroot[0] for an application that can
spawn xmenu by right clicking on the root window (i.e. on the desktop).

[0]: https://github.com/phillbush/xclickroot


§ Features

XMenu comes with the following features:
• XMenu reads something in and prints something out, the UNIX way.
• 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).


§ 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.
• ./demo.gif:   A gif demonstrating how XMenu works.
• ./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.
• ./icons/:     Icons for the sample script


§ Installation

First, edit ./config.mk to match your local setup.

In order to build XMenu you need the Imlib2, Xlib and 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.

	make

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.

	make install


§ Running XMenu

XMenu 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
of tabs.  Lines without labels are menu separators.

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.

Read the manual for more information on running XMenu.


§ License

This software is in public domain and is provided AS IS, with NO WARRANTY.