spmenu/README.md

185 lines
6.5 KiB
Markdown
Raw Normal View History

2023-01-20 23:17:30 +01:00
# spmenu
2023-04-02 20:12:21 +02:00
![image](docs/preview.png)
2023-01-20 23:17:30 +01:00
## What is spmenu?
2023-01-20 23:17:30 +01:00
spmenu is an X11 menu application based on
[dmenu](https://tools.suckless.org/dmenu) which takes standard input, parses
it, and lets the user choose an option and sends the
selected option to standard output.
2023-03-29 23:08:24 +02:00
In addition to this, it also serves as a run launcher through the included
shell script `spmenu_run`. Alternatively you may use `spmenu_desktop` which
lists .desktop entries instead of $PATH.
It is designed to integrate well with my [dwm](https://dwm.suckless.org) fork, [speedwm](https://git.speedie.gq/speedwm).
2023-01-20 23:17:30 +01:00
## Special features
2023-01-20 23:17:30 +01:00
This build of spmenu has some features written for this build.
Of course if you want, this is free software so you can use it in your own build.
- Proper configuration file support
2023-04-02 18:22:32 +02:00
- dwm-like key/mouse bind array (See keybinds.h and mouse.h)
- Vim-like modes, including indicator.
- The ability to move around items with keybinds.
2023-03-29 23:08:24 +02:00
- Customizable/dynamic line/column size.
2023-04-02 18:22:32 +02:00
- IME support
- Was removed from suckless dmenu years ago due to issues I've resolved
2023-03-29 23:08:24 +02:00
- Powerlines
- Web browser like keybindings.
2023-01-20 23:17:30 +01:00
- 256 color support through SGR codes.
2023-04-02 18:22:32 +02:00
- Image support
- Somewhat based on [this repository](https://github.com/Cloudef/dmenu-pango-imlib)
2023-01-20 23:17:30 +01:00
- Option to block typing.
- Rewritten arguments, old arguments still work though.
- Hiding each part of the menu.
..and more!
2023-01-20 23:17:30 +01:00
## Other features
2023-01-20 23:17:30 +01:00
2023-03-29 23:08:24 +02:00
Note: This is an incomplete list, it's just here to give you an idea of what
this build has to offer.
2023-02-25 13:52:55 +01:00
2023-01-22 11:48:27 +01:00
- Pango markup support
2023-01-20 23:17:30 +01:00
- Alpha transparency
- Pywal/.Xresources support
- Grid
- Colored Emoji/Font support
- Highlighting
2023-01-22 11:48:27 +01:00
- Right-to-left language support
2023-01-20 23:17:30 +01:00
- Case-insensitive by default
- Padding; useful with patched dwm with barpadding or speedwm.
- Fuzzy-finding
- Preselect support
- Line-height
- History support
2023-02-26 05:59:44 +01:00
- Customizable bar height
2023-01-20 23:17:30 +01:00
## Dependencies
2023-01-20 23:17:30 +01:00
- libX11
- libXrender
- freetype
2023-02-25 13:52:55 +01:00
- imlib2
- Used for image support, can be disabled if you don't want this by:
- build.sh: Setting `imlib2=false` in `buildconf`.
- Makefile: Editing `toggle.mk` and commenting out a few lines.
2023-01-20 23:17:30 +01:00
- libXinerama
- Can be disabled if you don't want/need multi-monitor support by:
- build.sh: Setting `xinerama=false` in `buildconf`.
- Makefile: Editing `toggle.mk` and commenting out a few lines.
- tcc compiler
- You can swap it out for GCC or any other C99 compatible compiler by:
- Makefile: Passing `CC="gcc"` to the `make` command.
- build.sh: Adding `CC="gcc"` to the `buildconf`.
command if you want)
- OpenSSL
- Used to calculate MD5 of images if image support is enabled, can be
disabled if you don't want this by:
- build.sh: Setting `imlib2=false` and `openssl=false` in `buildconf`.
- Makefile: Editing `toggle.mk` and commenting out a few lines.
- Pango
- Can be disabled if you don't want/need Pango markup by:
- build.sh: Setting `pango=false` and `pangoxft=false` in `buildconf`.
- Makefile: Editing `toggle.mk` and commenting out a few lines.
- libconfig
- Can be disabled if you don't want/need config file support by:
- build.sh: Setting `libconfig=false` in `buildconf`.
- Makefile: Editing `toggle.mk` and commenting out a few lines.
2023-01-20 23:17:30 +01:00
## Installation (GNU/Linux, \*BSD, macOS/OS X/Mac OS X)
2023-01-20 23:17:30 +01:00
`emerge dev-vcs/git # Install dev-vcs/git using your favorite package manager`
2023-03-20 16:18:50 +01:00
`git clone https://git.speedie.gq/spmenu`
2023-01-20 23:17:30 +01:00
`cd spmenu/`
`./build.sh # Run as root.`
Report any issues with the build.sh script. There's also a Makefile which
you can use but it may require editing host.mk and toggle.mk manually.
2023-01-20 23:17:30 +01:00
## Installation (Gentoo GNU/Linux)
2023-01-20 23:17:30 +01:00
If you are on Gentoo GNU/Linux, you can add
2023-03-02 10:07:56 +01:00
[my overlay](https://git.speedie.gq/speedie-overlay) which includes
2023-01-20 23:17:30 +01:00
`x11-misc/spmenu` as well as other useful packages.
## Installation (Arch GNU/Linux)
2023-03-02 10:07:56 +01:00
If you are on Arch GNU/Linux, you can add
[my repository](https://git.speedie.gq/speedie-repository) which includes
`spmenu` as well as other useful packages.
2023-03-31 18:05:12 +02:00
There's also a PKGBUILD. To use it, simply `make install_arch` in the directory
the PKGBUILD is located.
If you wish to package spmenu for your GNU/Linux distribution, feel free to add
it to this list.
## TODO
Pull requests would be greatly appreciated for any of these issues!
### General
- Config file: Add mouse/keybind configuration
- Image support: Stop using OpenSSL for caching images, mostly because MD5()
is deprecated as of OpenSSL 3.0, but this would also make it very easy to
have LibreSSL compatibility.
2023-04-03 00:53:42 +02:00
- Image support: Ability to display icons, similar to rofi
- Matching: Add support for contextual completions similar to xprompt
- Text drawing: Use cairo for text drawing over Xft.
- Matching: FIFO, used to dynamically refresh entries.
### Unlikely, but maybe at some point in the distant future
- Wayland: Wayland support, but only if it doesn't require writing any extra
code which as of now seems unlikely.
- Before this can even be done, replace Xft with cairo,
deal with keybinds in some Wayland compatible way, and
figure out a way to preserve X11 compatibility as I do
not want to use Wayland anyway.
- You can just use XWayland anyway if you happen to use Wayland, so it's not
like you will be unable to use spmenu in its current state.
### Bugs
2023-03-29 23:08:24 +02:00
- Text drawing: Pango will sometimes spit out errors for invalid markup.
Silencing this would be a good idea.
- Items: If we have zero lines, the width of items that contain SGR sequences
will be the max size of one item. This is fine, and there is not much I can do
about it without significant rewrites I don't think are worth doing.
- Image support: Images take a long time to load sometimes, particularly when
2023-04-02 13:44:47 +02:00
items are selected using the cursor so what we really need is a way to
skip over images after a set time limit
2023-02-25 14:00:22 +01:00
## Scripts
2023-02-25 14:00:22 +01:00
This build of spmenu should work with all spmenu/dmenu scripts.
[Here](https://git.speedie.gq/speedwm-extras) are a few I've written/use.
If your scripts are useful enough, and written with spmenu in mind, feel free
to pull request and put your scripts here!
2023-02-25 15:31:06 +01:00
## More information
2023-01-20 23:17:30 +01:00
See the included `man` page.
2023-01-20 23:17:30 +01:00
## License
2023-01-20 23:17:30 +01:00
spmenu is licensed under the MIT license. See the included LICENSE file for
more information!
2023-04-02 20:12:21 +02:00
## Screenshots
If you do something cool with spmenu, feel free to add yours here!
![image](https://codeberg.org/speedie/spmenu-screenshots/raw/branch/master/preview.png)
![image](https://codeberg.org/speedie/spmenu-screenshots/raw/branch/master/spmenu-iron.png)
2023-04-02 20:14:36 +02:00
![image](https://codeberg.org/speedie/spmenu-screenshots/raw/branch/master/spmenu-gruvbox.png)
2023-04-02 20:12:21 +02:00
![image](https://codeberg.org/speedie/spmenu-screenshots/raw/branch/master/colorscheme3.png)