forked from speedie/spmenu
move TODO into readme.md and/or readme.html
This commit is contained in:
parent
f4eb756860
commit
1d39136f8a
2
Makefile
2
Makefile
|
@ -6,7 +6,7 @@ include host.mk
|
||||||
include toggle.mk
|
include toggle.mk
|
||||||
|
|
||||||
# spmenu version
|
# spmenu version
|
||||||
VERSION = 0.3.2
|
VERSION = 0.3.3
|
||||||
|
|
||||||
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\" $(XINERAMATOGGLE) $(BDTOGGLE) $(PANGOTOGGLE) $(IMLIB2TOGGLE)
|
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\" $(XINERAMATOGGLE) $(BDTOGGLE) $(PANGOTOGGLE) $(IMLIB2TOGGLE)
|
||||||
CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations $(OPT) $(INCS) $(CPPFLAGS)
|
CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations $(OPT) $(INCS) $(CPPFLAGS)
|
||||||
|
|
190
README.html
Normal file
190
README.html
Normal file
|
@ -0,0 +1,190 @@
|
||||||
|
<h1 id="spmenu">spmenu</h1>
|
||||||
|
<figure>
|
||||||
|
<img src="/docs/preview.png" alt="image" />
|
||||||
|
<figcaption aria-hidden="true">image</figcaption>
|
||||||
|
</figure>
|
||||||
|
<h2 id="what-is-spmenu">What is spmenu?</h2>
|
||||||
|
<p>spmenu is an X11 menu application based on <a
|
||||||
|
href="https://tools.suckless.org/dmenu">dmenu</a> which takes standard
|
||||||
|
input, parses it, and lets the user choose an option and sends the
|
||||||
|
selected option to standard output.</p>
|
||||||
|
<p>In addition to this, it also serves as a run launcher through the
|
||||||
|
included shell script <code>spmenu_run</code>. Alternatively you may use
|
||||||
|
<code>spmenu_desktop</code> which lists .desktop entries instead of
|
||||||
|
$PATH.</p>
|
||||||
|
<p>It is designed to integrate well with my <a
|
||||||
|
href="https://dwm.suckless.org">dwm</a> fork, <a
|
||||||
|
href="https://git.speedie.gq/speedwm">speedwm</a>.</p>
|
||||||
|
<h2 id="special-features">Special features</h2>
|
||||||
|
<p>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.</p>
|
||||||
|
<ul>
|
||||||
|
<li>dwm-like keybind array (See keybinds.h)</li>
|
||||||
|
<li>Vim-like modes, including indicator.</li>
|
||||||
|
<li>The ability to move around items with keybinds.</li>
|
||||||
|
<li>Customizable/dynamic line/column size.</li>
|
||||||
|
<li>Powerlines</li>
|
||||||
|
<li>Web browser like keybindings.</li>
|
||||||
|
<li>256 color support through SGR codes.</li>
|
||||||
|
<li>Image support (somewhat based on <a
|
||||||
|
href="https://github.com/Cloudef/dmenu-pango-imlib">this
|
||||||
|
repository</a>)</li>
|
||||||
|
<li>Option to block typing.</li>
|
||||||
|
<li>Rewritten arguments, old arguments still work though.</li>
|
||||||
|
<li>Hiding each part of the menu.</li>
|
||||||
|
</ul>
|
||||||
|
<p>..and more!</p>
|
||||||
|
<h2 id="other-features">Other features</h2>
|
||||||
|
<p>Note: This is an incomplete list, it’s just here to give you an idea
|
||||||
|
of what this build has to offer.</p>
|
||||||
|
<ul>
|
||||||
|
<li>Pango markup support</li>
|
||||||
|
<li>Alpha transparency</li>
|
||||||
|
<li>Pywal/.Xresources support</li>
|
||||||
|
<li>Grid</li>
|
||||||
|
<li>Colored Emoji/Font support</li>
|
||||||
|
<li>Highlighting</li>
|
||||||
|
<li>Right-to-left language support</li>
|
||||||
|
<li>Case-insensitive by default</li>
|
||||||
|
<li>Padding; useful with patched dwm with barpadding or speedwm.</li>
|
||||||
|
<li>Fuzzy-finding</li>
|
||||||
|
<li>Preselect support</li>
|
||||||
|
<li>Line-height</li>
|
||||||
|
<li>History support</li>
|
||||||
|
<li>Customizable bar height</li>
|
||||||
|
</ul>
|
||||||
|
<h2 id="dependencies">Dependencies</h2>
|
||||||
|
<ul>
|
||||||
|
<li>libX11</li>
|
||||||
|
<li>libXrender</li>
|
||||||
|
<li>freetype</li>
|
||||||
|
<li>imlib2
|
||||||
|
<ul>
|
||||||
|
<li>Used for image support, can be disabled if you don’t want this by:
|
||||||
|
<ul>
|
||||||
|
<li>build.sh: Setting <code>imlib2=false</code> in
|
||||||
|
<code>buildconf</code>.</li>
|
||||||
|
<li>Makefile: Editing <code>toggle.mk</code> and commenting out a few
|
||||||
|
lines.</li>
|
||||||
|
</ul></li>
|
||||||
|
</ul></li>
|
||||||
|
<li>libXinerama
|
||||||
|
<ul>
|
||||||
|
<li>Can be disabled if you don’t want/need multi-monitor support by:
|
||||||
|
<ul>
|
||||||
|
<li>build.sh: Setting <code>xinerama=false</code> in
|
||||||
|
<code>buildconf</code>.</li>
|
||||||
|
<li>Makefile: Editing <code>toggle.mk</code> and commenting out a few
|
||||||
|
lines.</li>
|
||||||
|
</ul></li>
|
||||||
|
</ul></li>
|
||||||
|
<li>tcc compiler
|
||||||
|
<ul>
|
||||||
|
<li>You can swap it out for GCC or any other C99 compatible compiler by:
|
||||||
|
<ul>
|
||||||
|
<li>Makefile: Passing <code>CC="gcc"</code> to the <code>make</code>
|
||||||
|
command.</li>
|
||||||
|
<li>build.sh: Adding <code>CC="gcc"</code> to the
|
||||||
|
<code>buildconf</code>. command if you want)</li>
|
||||||
|
</ul></li>
|
||||||
|
</ul></li>
|
||||||
|
<li>OpenSSL
|
||||||
|
<ul>
|
||||||
|
<li>Used to calculate MD5 of images if image support is enabled, can be
|
||||||
|
disabled if you don’t want this by:
|
||||||
|
<ul>
|
||||||
|
<li>build.sh: Setting <code>imlib2=false</code> and
|
||||||
|
<code>openssl=false</code> in <code>buildconf</code>.</li>
|
||||||
|
<li>Makefile: Editing <code>toggle.mk</code> and commenting out a few
|
||||||
|
lines.</li>
|
||||||
|
</ul></li>
|
||||||
|
</ul></li>
|
||||||
|
<li>Pango
|
||||||
|
<ul>
|
||||||
|
<li>Can be disabled if you don’t want/need Pango markup by:
|
||||||
|
<ul>
|
||||||
|
<li>build.sh: Setting <code>pango=false</code> and
|
||||||
|
<code>pangoxft=false</code> in <code>buildconf</code>.</li>
|
||||||
|
<li>Makefile: Editing <code>toggle.mk</code> and commenting out a few
|
||||||
|
lines.</li>
|
||||||
|
</ul></li>
|
||||||
|
</ul></li>
|
||||||
|
</ul>
|
||||||
|
<h2 id="installation-gnulinux-bsd-macosos-xmac-os-x">Installation
|
||||||
|
(GNU/Linux, *BSD, macOS/OS X/Mac OS X)</h2>
|
||||||
|
<p><code>emerge dev-vcs/git # Install dev-vcs/git using your favorite package manager</code></p>
|
||||||
|
<p><code>git clone https://git.speedie.gq/spmenu</code></p>
|
||||||
|
<p><code>cd spmenu/</code></p>
|
||||||
|
<p><code>./build.sh # Run as root.</code></p>
|
||||||
|
<p>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.</p>
|
||||||
|
<h2 id="installation-gentoo-gnulinux">Installation (Gentoo
|
||||||
|
GNU/Linux)</h2>
|
||||||
|
<p>If you are on Gentoo GNU/Linux, you can add <a
|
||||||
|
href="https://git.speedie.gq/speedie-overlay">my overlay</a> which
|
||||||
|
includes <code>x11-misc/spmenu</code> as well as other useful
|
||||||
|
packages.</p>
|
||||||
|
<h2 id="installation-arch-gnulinux">Installation (Arch GNU/Linux)</h2>
|
||||||
|
<p>If you are on Arch GNU/Linux, you can add <a
|
||||||
|
href="https://git.speedie.gq/speedie-repository">my repository</a> which
|
||||||
|
includes <code>spmenu</code> as well as other useful packages.</p>
|
||||||
|
<p>There’s also a PKGBUILD. To use it, simply <code>makepkg -Si</code>
|
||||||
|
in the directory the PKGBUILD is located.</p>
|
||||||
|
<p>If you wish to package spmenu for your GNU/Linux distribution, feel
|
||||||
|
free to add it to this list.</p>
|
||||||
|
<h2 id="todo">TODO</h2>
|
||||||
|
<p>Pull requests would be greatly appreciated for any of these
|
||||||
|
issues!</p>
|
||||||
|
<h3 id="general">General</h3>
|
||||||
|
<ul>
|
||||||
|
<li>Key: Mouse bind array (Likely mouse.h).</li>
|
||||||
|
<li>Config file: Add configuration file using (probably) libconfig,
|
||||||
|
allowing keybinds to be configured without recompiling spmenu.</li>
|
||||||
|
<li>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.</li>
|
||||||
|
<li>Matching: Add support for contextual completions similar to
|
||||||
|
xprompt</li>
|
||||||
|
<li>Text drawing: Use cairo for text drawing over Xft.</li>
|
||||||
|
<li>Matching: FIFO, used to dynamically refresh entries.</li>
|
||||||
|
</ul>
|
||||||
|
<h3
|
||||||
|
id="unlikely-but-maybe-at-some-point-in-the-distant-future">Unlikely,
|
||||||
|
but maybe at some point in the distant future</h3>
|
||||||
|
<ul>
|
||||||
|
<li>Wayland: Wayland support, but only if it doesn’t require writing any
|
||||||
|
extra code which as of now seems unlikely.
|
||||||
|
<ul>
|
||||||
|
<li>Before this can even be done, we need to add a configuration file
|
||||||
|
using anything but .Xresources, 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.</li>
|
||||||
|
<li>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.</li>
|
||||||
|
</ul></li>
|
||||||
|
</ul>
|
||||||
|
<h3 id="bugs">Bugs</h3>
|
||||||
|
<ul>
|
||||||
|
<li>Text drawing: Pango will sometimes spit out errors for invalid
|
||||||
|
markup. Silencing this would be a good idea.</li>
|
||||||
|
<li>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.</li>
|
||||||
|
<li>Image support: Images take a long time to load sometimes,
|
||||||
|
particularly when items are selected using the cursor so what we really
|
||||||
|
need is a way to ] skip over images after a set time limit</li>
|
||||||
|
</ul>
|
||||||
|
<h2 id="scripts">Scripts</h2>
|
||||||
|
<p>This build of spmenu should work with all spmenu/dmenu scripts. <a
|
||||||
|
href="https://git.speedie.gq/speedwm-extras">Here</a> 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!</p>
|
||||||
|
<h2 id="more-information">More information</h2>
|
||||||
|
<p>See the included <code>man</code> page.</p>
|
||||||
|
<h2 id="license">License</h2>
|
||||||
|
<p>spmenu is licensed under the MIT license. See the included LICENSE
|
||||||
|
file for more information!</p>
|
108
README.md
108
README.md
|
@ -1,7 +1,8 @@
|
||||||
# spmenu
|
# spmenu
|
||||||
|
|
||||||
![image](/docs/preview.png)
|
![image](/docs/preview.png)
|
||||||
|
|
||||||
### What is spmenu?
|
## What is spmenu?
|
||||||
|
|
||||||
spmenu is an X11 menu application based on
|
spmenu is an X11 menu application based on
|
||||||
[dmenu](https://tools.suckless.org/dmenu) which takes standard input, parses
|
[dmenu](https://tools.suckless.org/dmenu) which takes standard input, parses
|
||||||
|
@ -12,9 +13,9 @@ 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
|
shell script `spmenu_run`. Alternatively you may use `spmenu_desktop` which
|
||||||
lists .desktop entries instead of $PATH.
|
lists .desktop entries instead of $PATH.
|
||||||
|
|
||||||
It is designed to integrate well with my [dwm](https://dwm.suckless.org) fork, [speedwm](https://codeberg.org/speedie/speedwm).
|
It is designed to integrate well with my [dwm](https://dwm.suckless.org) fork, [speedwm](https://git.speedie.gq/speedwm).
|
||||||
|
|
||||||
### Special features
|
## Special features
|
||||||
|
|
||||||
This build of spmenu has some features written for this build.
|
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.
|
Of course if you want, this is free software so you can use it in your own build.
|
||||||
|
@ -33,7 +34,7 @@ Of course if you want, this is free software so you can use it in your own build
|
||||||
|
|
||||||
..and more!
|
..and more!
|
||||||
|
|
||||||
### Other features
|
## Other features
|
||||||
|
|
||||||
Note: This is an incomplete list, it's just here to give you an idea of what
|
Note: This is an incomplete list, it's just here to give you an idea of what
|
||||||
this build has to offer.
|
this build has to offer.
|
||||||
|
@ -53,22 +54,35 @@ this build has to offer.
|
||||||
- History support
|
- History support
|
||||||
- Customizable bar height
|
- Customizable bar height
|
||||||
|
|
||||||
### Dependencies
|
## Dependencies
|
||||||
|
|
||||||
- libX11
|
- libX11
|
||||||
- libXrender
|
- libXrender
|
||||||
- freetype
|
- freetype
|
||||||
- imlib2
|
- imlib2
|
||||||
- Used for image support, can be disabled if you don't want this by editing `toggle.mk`.
|
- 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.
|
||||||
- libXinerama
|
- libXinerama
|
||||||
- Can be disabled if you don't want/need multi-monitor support, edit `toggle.mk`
|
- Can be disabled if you don't want/need multi-monitor support by:
|
||||||
- tcc compiler (you can swap it out for GCC by passing CC="gcc" to the `make` command if you want)
|
- 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
|
- OpenSSL
|
||||||
- To calculate MD5
|
- Used to calculate MD5 of images if image support is enabled, can be
|
||||||
- Pango (for drawing fonts)
|
disabled if you don't want this by:
|
||||||
- If you do not want to use pango, edit `toggle.mk`
|
- 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.
|
||||||
|
|
||||||
### Installation (most GNU/Linux distributions)
|
## Installation (GNU/Linux, \*BSD, macOS/OS X/Mac OS X)
|
||||||
|
|
||||||
`emerge dev-vcs/git # Install dev-vcs/git using your favorite package manager`
|
`emerge dev-vcs/git # Install dev-vcs/git using your favorite package manager`
|
||||||
|
|
||||||
|
@ -76,35 +90,79 @@ this build has to offer.
|
||||||
|
|
||||||
`cd spmenu/`
|
`cd spmenu/`
|
||||||
|
|
||||||
`make clean install # Run as root.`
|
`./build.sh # Run as root.`
|
||||||
|
|
||||||
### Installation (Gentoo)
|
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.
|
||||||
|
|
||||||
|
## Installation (Gentoo GNU/Linux)
|
||||||
|
|
||||||
If you are on Gentoo GNU/Linux, you can add
|
If you are on Gentoo GNU/Linux, you can add
|
||||||
[my overlay](https://git.speedie.gq/speedie-overlay) which includes
|
[my overlay](https://git.speedie.gq/speedie-overlay) which includes
|
||||||
`x11-misc/spmenu` as well as other useful packages.
|
`x11-misc/spmenu` as well as other useful packages.
|
||||||
|
|
||||||
### Installation (Arch)
|
## Installation (Arch GNU/Linux)
|
||||||
|
|
||||||
If you are on Arch GNU/Linux, you can add
|
If you are on Arch GNU/Linux, you can add
|
||||||
[my repository](https://git.speedie.gq/speedie-repository) which includes
|
[my repository](https://git.speedie.gq/speedie-repository) which includes
|
||||||
`spmenu` as well as other useful packages.
|
`spmenu` as well as other useful packages.
|
||||||
|
|
||||||
There's also a PKGBUILD. To use it, simply `makepkg -Si`.
|
There's also a PKGBUILD. To use it, simply `makepkg -Si` 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.
|
If you wish to package spmenu for your GNU/Linux distribution, feel free to add
|
||||||
|
it to this list.
|
||||||
|
|
||||||
### Images
|
## TODO
|
||||||
|
|
||||||
To use an image, pipe `IMG:/path/to/image` to spmenu. If you want you can specify arguments.
|
Pull requests would be greatly appreciated for any of these issues!
|
||||||
|
|
||||||
`printf "IMG:$HOME/Wallpapers/Art/2.png\tThis is a cool image.\n" | spmenu`
|
### General
|
||||||
|
|
||||||
### .Xresources values
|
- Key: Mouse bind array (Likely mouse.h).
|
||||||
|
- Config file: Add configuration file using (probably) libconfig, allowing
|
||||||
|
keybinds to be configured without recompiling spmenu.
|
||||||
|
- 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.
|
||||||
|
- 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.
|
||||||
|
|
||||||
This build allows you to define .Xresources values to load on startup. See docs/example.Xresources for a list of default values.
|
### Unlikely, but maybe at some point in the distant future
|
||||||
|
|
||||||
### Scripts
|
- 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, we need to add a configuration file using
|
||||||
|
anything but .Xresources, 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.
|
||||||
|
|
||||||
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.
|
### Bugs
|
||||||
If your scripts are useful enough, and written with spmenu in mind, feel free to pull request and put your scripts here!
|
|
||||||
|
- 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
|
||||||
|
items are selected using the cursor so what we really need is a way to ]
|
||||||
|
skip over images after a set time limit
|
||||||
|
|
||||||
|
## Scripts
|
||||||
|
|
||||||
|
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!
|
||||||
|
|
||||||
|
## More information
|
||||||
|
|
||||||
|
See the included `man` page.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
spmenu is licensed under the MIT license. See the included LICENSE file for
|
||||||
|
more information!
|
||||||
|
|
9
TODO
9
TODO
|
@ -1,9 +0,0 @@
|
||||||
# TODO for spmenu
|
|
||||||
|
|
||||||
- Mouse bind array (mouse.h)
|
|
||||||
- Add configuration file using (probably) libconfig, allowing keybinds to be configured without recompiling spmenu
|
|
||||||
- Use higher level libraries, MD5() is deprecated as of OpenSSL 3 but it has been temporarily silenced. This might also improve compatibility for people who don't use OpenSSL.
|
|
||||||
- Contextual completions
|
|
||||||
- Use cairo for text drawing over Xft
|
|
||||||
- MAYBE wayland support, but only if it doesn't require writing any extra code which as of now seems unlikely
|
|
||||||
- FIFO, used to dynamically refresh
|
|
Loading…
Reference in a new issue