A mirror of phillbush's xmenu.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 3.7 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <p align="center">
  2. <img src="/demo.gif", title="demo"/>
  3. </p>
  4. # XMenu
  5. XMenu is a menu utility for X.
  6. XMenu receives a menu specification in stdin, shows a menu for the user
  7. to select one of the options, and outputs the option selected to stdout.
  8. XMenu can be controlled both via mouse and via keyboard. The menu is a
  9. pop-up menu (that is, after selecting an option, the menu disappears).
  10. Check out my other project, [xclickroot](https://github.com/phillbush/xclickroot) for an application that can
  11. spawn xmenu by right clicking on the root window (i.e. on the desktop).
  12. ## Features
  13. XMenu comes with the following features:
  14. * XMenu reads something in and prints something out, the UNIX way.
  15. * Submenus (some menu entries can spawn another menu).
  16. * Separators (menu entries can be separated by a line).
  17. * Icons (menu entries can be preceded by an icon image).
  18. * X resources support (you don't need to recompile xmenu for configuring it).
  19. ## Files
  20. The files are:
  21. * `./README`: This file.
  22. * `./Makefile`: The makefile.
  23. * `./config.h`: The hardcoded default configuration for XMenu.
  24. * `./config.mk`: The setup for the makefile.
  25. * `./demo.gif`: A gif demonstrating how XMenu works.
  26. * `./xmenu.1`: The manual file (man page) for XMenu.
  27. * `./xmenu.c`: The source code of XMenu.
  28. * `./xmenu.sh`: A sample script illustrating how to use XMenu.
  29. * `./icons/`: Icons for the sample script
  30. ## Installation
  31. First, edit `./config.mk` to match your local setup.
  32. In order to build XMenu you need the `Imlib2`, `Xlib` and `Xft` header files.
  33. The default configuration for XMenu is specified in the file `config.h`,
  34. you can edit it, but most configuration can be changed at runtime via
  35. X resources. Enter the following command to build XMenu. This command
  36. creates the binary file `./xmenu`.
  37. make
  38. By default, XMenu is installed into the `/usr/local` prefix. Enter the
  39. following command to install XMenu (if necessary as root). This command
  40. installs the binary file `./xmenu` into the `${PREFIX}/bin/` directory, and
  41. the manual file `./xmenu.1` into `${MANPREFIX}/man1/` directory.
  42. make install
  43. ## Running XMenu
  44. XMenu receives as input a menu specification where each line is a menu
  45. entry. Each line can be indented with tabs to represent nested menus.
  46. Each line is made out of a label and a command separated by any number
  47. of tabs. Lines without labels are menu separators.
  48. See the script `./xmenu.sh` for an example of how to use XMenu to draw a
  49. simple menu with submenus and separators. The file `./demo.gif` shows how
  50. the menu generated by that script looks like.
  51. Read the [manual](https://github.com/phillbush/xmenu/wiki) for more information on running XMenu.
  52. ## License
  53. MIT/X Consortium License
  54. © 2020 phillbush
  55. Permission is hereby granted, free of charge, to any person obtaining a
  56. copy of this software and associated documentation files (the "Software"),
  57. to deal in the Software without restriction, including without limitation
  58. the rights to use, copy, modify, merge, publish, distribute, sublicense,
  59. and/or sell copies of the Software, and to permit persons to whom the
  60. Software is furnished to do so, subject to the following conditions:
  61. The above copyright notice and this permission notice shall be included in
  62. all copies or substantial portions of the Software.
  63. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  64. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  65. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  66. THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  67. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  68. FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  69. DEALINGS IN THE SOFTWARE.