spmenu/README.md

187 lines
6.5 KiB
Markdown
Raw Normal View History

# spmenu
2023-08-09 00:46:15 +02:00
![preview](/screenshots/preview.png)
2023-07-03 19:22:01 +02:00
spmenu is an X11 and Wayland menu application which takes standard input, parses
it, lets the user choose an option and sends the selected option to standard output.
2023-01-20 23:17:30 +01:00
In addition to this, it also serves as a run launcher and desktop launcher
through the included shell script `spmenu_run`, which handles both $PATH
listing, .desktop entries, and file listing.
2023-03-29 23:08:24 +02:00
spmenu also serves as a proper dmenu replacement for Wayland users, and
can be themed to look identical to dmenu.
2023-07-03 20:14:29 +02:00
## Features
2023-08-10 11:38:59 +02:00
- True color, 256 color and 16 color support
2023-07-03 20:14:29 +02:00
- Reading entries from standard input and file
- Run launcher, supporting both .desktop entries and $PATH
2023-08-10 11:38:59 +02:00
- X11 and Wayland support, most run launchers support only one
- Image and icon support
- Pango markup support
- Right to left language support
2023-08-08 20:53:56 +02:00
- FIFO, allowing programs to communicate with spmenu
- Vi-like modes (see docs/binds-vim.conf)
2023-07-03 20:14:29 +02:00
- History buffer
- Configuration file, allowing customizable keybinds
- Mouse binds
- Theming
- ..and more
## Dependencies
2023-01-20 23:17:30 +01:00
- wayland-client
- For Wayland support, which is optional.
- wayland-scanner
- For Wayland support, which is optional.
- wayland-protocols
- For Wayland support, which is optional.
- wl-clipboard
- For Wayland support, which is optional.
- Only required at runtime, and only if pasting is desired.
- xkbcommon
- For Wayland support, which is optional.
2023-01-20 23:17:30 +01:00
- libX11
2023-06-06 22:06:06 +02:00
- For X11 support, which is optional.
2023-01-20 23:17:30 +01:00
- libXrender
2023-06-06 22:06:06 +02:00
- For X11 support, which is optional.
2023-02-25 13:52:55 +01:00
- imlib2
2023-05-13 21:27:12 +02:00
- Used for image support, can be disabled during compile time.
2023-01-20 23:17:30 +01:00
- libXinerama
2023-06-06 22:06:06 +02:00
- For X11 support, which is optional.
2023-05-13 21:27:12 +02:00
- Used for multi-monitor support, can be disabled during compile time.
- OpenSSL
- Used to calculate MD5 of images if image support is enabled, can be
2023-05-13 21:27:12 +02:00
disabled during compile time.
- pango
- cairo
- libconfig
2023-05-13 21:27:12 +02:00
- Can be disabled if you don't want/need config file support during compile time.
2023-05-08 11:39:34 +02:00
- meson
2023-05-13 21:27:12 +02:00
- Used to compile spmenu, not optional unless you're experienced with build systems.
2023-01-20 23:17:30 +01:00
2023-05-13 21:27:12 +02:00
## Installation
2023-01-20 23:17:30 +01:00
2023-05-13 21:27:12 +02:00
- If you are on Arch GNU/Linux, you can add
2023-06-09 06:12:23 +02:00
[my repository](https://git.speedie.site/speedie/speedie-aur) which includes
2023-05-13 21:27:12 +02:00
`spmenu` as well as other useful packages. Then simply `pacman -S spmenu`.
2023-01-20 23:17:30 +01:00
2023-05-13 21:27:12 +02:00
- Or if you are on Gentoo GNU/Linux, you can add
2023-06-03 02:47:39 +02:00
[my overlay](https://git.speedie.site/speedie/speedie-overlay) which includes
2023-05-13 21:27:12 +02:00
`x11-misc/spmenu` as well as other useful packages. Then simply `emerge spmenu`.
2023-01-20 23:17:30 +01:00
2023-05-13 21:27:12 +02:00
If you still need/want to manually compile, follow along with manual compilation.
2023-05-13 21:27:12 +02:00
Here we're manually compiling spmenu. This is likely what you'll want to do
if you're using any distribution but Arch or Gentoo.
2023-01-20 23:17:30 +01:00
2023-05-13 21:27:12 +02:00
Git is required to clone the repository, but you can also use
[releases](https://ls.speedie.site). Those can be unpacked
using `tar -xpvf /path/to/spmenu-version.tar.gz`.
2023-04-26 11:28:44 +02:00
2023-05-13 21:27:12 +02:00
To install Git:
2023-04-27 08:21:46 +02:00
2023-05-13 21:27:12 +02:00
- Gentoo: `emerge dev-vcs/git`
2023-04-27 08:21:46 +02:00
2023-05-13 21:27:12 +02:00
- Arch: `pacman -S git`
2023-04-26 11:28:44 +02:00
2023-05-13 21:27:12 +02:00
- Debian: `apt-get install git`
2023-04-26 11:28:44 +02:00
2023-05-13 21:27:12 +02:00
You will also need the dependencies for spmenu. You'll
have to find those packages in your distribution repositories.
2023-01-20 23:17:30 +01:00
2023-05-13 21:27:12 +02:00
To clone the repository using Git:
2023-06-03 02:47:39 +02:00
`git clone https://git.speedie.site/speedie/spmenu`
2023-05-13 21:27:12 +02:00
`cd spmenu/`
2023-01-20 23:17:30 +01:00
2023-05-13 21:27:12 +02:00
Configure the build by running these commands:
2023-03-02 10:07:56 +01:00
2023-05-13 21:27:12 +02:00
`mkdir -p build/ # Create a build/ directory, Meson will use this as the working
directory`
`meson setup build # This will check to make sure all dependencies are found.
If you're recompiling you may want to pass --reconfigure as an argument`
2023-05-21 22:13:47 +02:00
This is where you can enable/disable certain features, as well as set
compiler options.
2023-05-13 21:27:12 +02:00
Now, to build it run `ninja -C build`. If all went well you should have a
binary in the `build/` directory.
Finally, to install it all, run:
2023-03-02 10:07:56 +01:00
2023-05-21 22:13:47 +02:00
`meson install -C build --prefix /usr # /usr may be overriden to /usr/local
2023-06-06 22:06:06 +02:00
or anything else`
2023-07-29 18:06:10 +02:00
## For developers
For convenience, in the scripts directory is a script called `spmenu_make`.
This script is not installed, and should be used as is. This script handles
the creation of distro packages, documentation and the installation of spmenu
itself. It's also useful if you don't feel like running three commands every
time you want to rebuild spmenu.
To enable/disable features, write `<feature>=<bool>` to a new file called
`buildconf`. This must be executable or the script will not load it.
For a list of features that can be used, look at the top of the `spmenu_make`
script. Now, to build spmenu with it you can simply run `scripts/spmenu_make`
with no arguments. If you want to install spmenu, you can do
`scripts/spmenu_make install`.
2023-05-13 21:27:12 +02:00
To generate documentation, which may be necessary if you're pushing new changes
to your Git repository, run `scripts/spmenu_make docs` **in the current
2023-07-29 18:06:10 +02:00
directory**. This requires the use of `pandoc`.
2023-05-13 21:27:12 +02:00
To generate a tarball, run `scripts/spmenu_make dist` **in the current
directory**. If you want to generate a pacman package, run
2023-07-29 18:06:10 +02:00
`scripts/spmenu_make pkg_arch` instead. This requires `makepkg`.
When creating a release, do the following:
1. Bump version in meson.build and src/libspmenu/meson.build (optional)
2023-07-29 18:06:10 +02:00
2. Run `scripts/spmenu_make docs`. This will generate new documentation.
3. `git commit -a` to bump version
4. Run `scripts/spmenu_make dist`. This will generate a tarball, along
with the GPG signature for that and a MD5 and SHA256 hash for it.
5. Run `scripts/spmenu_make pkg_arch`. This will create an Arch Linux
built binary. This (again) requires `makepkg`.
6. Run `scripts/spmenu_make pkg_gentoo`. This does **not** require any
Gentoo Linux tools. It will output an ebuild along with the GPG signature
for that and a MD5 and SHA256 hash for it.
7. Create a release/host the resulting files.
2023-05-13 21:27:12 +02:00
## Vim like keybinds
For those who are familiar with Vim and like Vi-style keybinds,
you can copy `docs/binds-vim.conf` to `~/.config/spmenu/binds.conf`.
This will re-enable normal mode. In other words, it will restore the
keybinds spmenu 3.1.1 had.
## Scripts
2023-02-25 14:00:22 +01:00
2023-05-06 15:02:25 +02:00
There's a page dedicated to user scripts
2023-06-10 14:36:44 +02:00
[over on the wiki](https://spmenu.speedie.site/User+scripts). Feel
2023-05-06 15:02:25 +02:00
free to contribute and try scripts on there.
2023-02-25 15:31:06 +01:00
2023-07-03 20:14:29 +02:00
## Screenshots
See [this page](https://spmenu.speedie.site/Screenshots) for screenshots.
2023-07-03 20:14:29 +02:00
2023-07-03 22:15:30 +02:00
## License
2023-07-03 20:14:29 +02:00
2023-07-03 22:15:30 +02:00
spmenu is licensed under the MIT license. See the included LICENSE file for
more information!
2023-07-05 03:04:42 +02:00
Before contributing, please see [this article](https://spmenu.speedie.site/Contributing+to+spmenu).
2023-07-03 22:15:30 +02:00
## Wiki
spmenu has [a wiki](https://spmenu.speedie.site) for more extensive
documentation. Contributions to the wiki are appreciated, and
can be done through [the Git repository](https://git.speedie.site/speedie/spmenu-wiki).
2023-09-09 19:00:15 +02:00
If you need help, you can also check out [my Matrix space](https://matrix.speedie.site).