Merge pull request #9 from GideonWolfe/master

Reformat README to be nicer looking
This commit is contained in:
phillbush 2020-07-29 21:17:58 +00:00 committed by GitHub
commit 486784ca8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,8 @@
XMenu <p align="center">
<img src="/demo.gif", title="demo"/>
</p>
# XMenu
XMenu is a menu utility for X. XMenu is a menu utility for X.
XMenu receives a menu specification in stdin, shows a menu for the user XMenu receives a menu specification in stdin, shows a menu for the user
@ -6,70 +10,70 @@ 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 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). pop-up menu (that is, after selecting an option, the menu disappears).
Check out my other project, xclickroot[0] for an application that can Check out my other project, [xclickroot](https://github.com/phillbush/xclickroot) for an application that can
spawn xmenu by right clicking on the root window (i.e. on the desktop). spawn xmenu by right clicking on the root window (i.e. on the desktop).
[0]: https://github.com/phillbush/xclickroot
## Features
§ Features
XMenu comes with the following 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). * XMenu reads something in and prints something out, the UNIX way.
• Separators (menu entries can be separated by a line). * Submenus (some menu entries can spawn another menu).
• Icons (menu entries can be preceded by an icon image). * Separators (menu entries can be separated by a line).
* Icons (menu entries can be preceded by an icon image).
§ Files ## Files
The files are: The files are:
• ./README: This file.
• ./Makefile: The makefile. * `./README`: This file.
• ./config.h: The hardcoded default configuration for XMenu. * `./Makefile`: The makefile.
• ./config.mk: The setup for the makefile. * `./config.h`: The hardcoded default configuration for XMenu.
• ./demo.gif: A gif demonstrating how XMenu works. * `./config.mk`: The setup for the makefile.
• ./xmenu.1: The manual file (man page) for XMenu. * `./demo.gif`: A gif demonstrating how XMenu works.
• ./xmenu.c: The source code of XMenu. * `./xmenu.1`: The manual file (man page) for XMenu.
• ./xmenu.sh: A sample script illustrating how to use XMenu. * `./xmenu.c`: The source code of XMenu.
• ./icons/: Icons for the sample script * `./xmenu.sh`: A sample script illustrating how to use XMenu.
* `./icons/`: Icons for the sample script
§ Installation ## Installation
First, edit ./config.mk to match your local setup. First, edit `./config.mk` to match your local setup.
In order to build XMenu you need the Imlib2, Xlib and Xft header files. 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, 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 you can edit it, but most configuration can be changed at runtime via
X resources. Enter the following command to build XMenu. This command X resources. Enter the following command to build XMenu. This command
creates the binary file ./xmenu. creates the binary file `./xmenu`.
make make
By default, XMenu is installed into the /usr/local prefix. Enter the By default, XMenu is installed into the `/usr/local` prefix. Enter the
following command to install XMenu (if necessary as root). This command following command to install XMenu (if necessary as root). This command
installs the binary file ./xmenu into the ${PREFIX}/bin/ directory, and installs the binary file `./xmenu` into the `${PREFIX}/bin/` directory, and
the manual file ./xmenu.1 into ${MANPREFIX}/man1/ directory. the manual file `./xmenu.1` into `${MANPREFIX}/man1/` directory.
make install make install
§ Running XMenu ## Running XMenu
XMenu receives as input a menu specification where each line is a menu 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. 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 Each line is made out of a label and a command separated by any number
of tabs. Lines without labels are menu separators. of tabs. Lines without labels are menu separators.
See the script ./xmenu.sh for an example of how to use XMenu to draw a 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 simple menu with submenus and separators. The file `./demo.gif` shows how
the menu generated by that script looks like. the menu generated by that script looks like.
Read the manual for more information on running XMenu. Read the manual for more information on running XMenu.
§ License ## License
MIT/X Consortium License MIT/X Consortium License