spmenu/README.html

368 lines
11 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>README</title>
<style>
html {
color: #1a1a1a;
background-color: #fdfdfd;
}
body {
margin: 0 auto;
max-width: 36em;
padding-left: 50px;
padding-right: 50px;
padding-top: 50px;
padding-bottom: 50px;
hyphens: auto;
overflow-wrap: break-word;
text-rendering: optimizeLegibility;
font-kerning: normal;
}
@media (max-width: 600px) {
body {
font-size: 0.9em;
padding: 12px;
}
h1 {
font-size: 1.8em;
}
}
@media print {
html {
background-color: white;
}
body {
background-color: transparent;
color: black;
font-size: 12pt;
}
p, h2, h3 {
orphans: 3;
widows: 3;
}
h2, h3, h4 {
page-break-after: avoid;
}
}
p {
margin: 1em 0;
}
a {
color: #1a1a1a;
}
a:visited {
color: #1a1a1a;
}
img {
max-width: 100%;
}
h1, h2, h3, h4, h5, h6 {
margin-top: 1.4em;
}
h5, h6 {
font-size: 1em;
font-style: italic;
}
h6 {
font-weight: normal;
}
ol, ul {
padding-left: 1.7em;
margin-top: 1em;
}
li > ol, li > ul {
margin-top: 0;
}
blockquote {
margin: 1em 0 1em 1.7em;
padding-left: 1em;
border-left: 2px solid #e6e6e6;
color: #606060;
}
code {
font-family: Menlo, Monaco, Consolas, 'Lucida Console', monospace;
font-size: 85%;
margin: 0;
hyphens: manual;
}
pre {
margin: 1em 0;
overflow: auto;
}
pre code {
padding: 0;
overflow: visible;
overflow-wrap: normal;
}
.sourceCode {
background-color: transparent;
overflow: visible;
}
hr {
background-color: #1a1a1a;
border: none;
height: 1px;
margin: 1em 0;
}
table {
margin: 1em 0;
border-collapse: collapse;
width: 100%;
overflow-x: auto;
display: block;
font-variant-numeric: lining-nums tabular-nums;
}
table caption {
margin-bottom: 0.75em;
}
tbody {
margin-top: 0.5em;
border-top: 1px solid #1a1a1a;
border-bottom: 1px solid #1a1a1a;
}
th {
border-top: 1px solid #1a1a1a;
padding: 0.25em 0.5em 0.25em 0.5em;
}
td {
padding: 0.125em 0.5em 0.25em 0.5em;
}
header {
margin-bottom: 4em;
text-align: center;
}
#TOC li {
list-style: none;
}
#TOC ul {
padding-left: 1.3em;
}
#TOC > ul {
padding-left: 0;
}
#TOC a:not(:hover) {
text-decoration: none;
}
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
ul.task-list li input[type="checkbox"] {
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
</style>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<h1 id="spmenu">spmenu</h1>
<figure>
2023-04-02 18:22:32 +02:00
<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>, which handles both $PATH
2023-04-30 01:00:49 +02:00
listing, .desktop entries and file listing.</p>
<p>It is designed to integrate well with my <a
href="https://dwm.suckless.org">dwm</a> fork, <a
2023-04-13 23:50:59 +02:00
href="https://git.speedie.site/speedwm">speedwm</a>.</p>
2023-04-27 08:21:46 +02:00
<h2 id="improvements-over-dmenu">Improvements over dmenu</h2>
<ul>
<li>Proper configuration file, including keybinds.</li>
2023-04-02 18:22:32 +02:00
<li>dwm-like key/mouse bind array (See keybinds.h and mouse.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>Ability to update entries dynamically by reading from file</li>
2023-04-02 18:22:32 +02:00
<li>IME support
<ul>
<li>Was removed from suckless dmenu years ago due to issues Ive
resolved</li>
</ul></li>
<li>Powerlines</li>
<li>Web browser like keybindings.</li>
<li>256 color support through SGR codes.</li>
2023-04-02 18:22:32 +02:00
<li>Image support
<ul>
<li>Somewhat based on <a
href="https://github.com/Cloudef/dmenu-pango-imlib">this
2023-04-02 18:22:32 +02:00
repository</a></li>
</ul></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>
2023-04-27 08:21:46 +02:00
<p>..and more! Note that spmenu is still <strong>compatible</strong>
with dmenu. Just pass the original arguments.</p>
<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 dont want this by:
<ul>
<li>build.sh: Setting <code>imlib2=false</code> in
<code>buildconf</code>.</li>
</ul></li>
</ul></li>
<li>libXinerama
<ul>
<li>Can be disabled if you dont want/need multi-monitor support by:
<ul>
<li>build.sh: Setting <code>xinerama=false</code> in
<code>buildconf</code>.</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>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 dont want this by:
<ul>
<li>build.sh: Setting <code>imlib2=false</code> and
<code>openssl=false</code> in <code>buildconf</code>.</li>
</ul></li>
</ul></li>
<li>Pango
<ul>
<li>Can be disabled if you dont want/need Pango markup by:
<ul>
<li>build.sh: Setting <code>pango=false</code> and
<code>pangoxft=false</code> in <code>buildconf</code>.</li>
</ul></li>
</ul></li>
<li>libconfig
<ul>
<li>Can be disabled if you dont want/need config file support by:
<ul>
<li>build.sh: Setting <code>libconfig=false</code> in
<code>buildconf</code>.</li>
</ul></li>
</ul></li>
2023-05-08 11:39:34 +02:00
<li>meson
<ul>
<li>Used to compile spmenu</li>
</ul></li>
</ul>
2023-04-26 11:31:54 +02:00
<h2 id="installation-gnulinux-bsd">Installation (GNU/Linux, *BSD)</h2>
2023-04-30 01:00:49 +02:00
<p><code>emerge dev-vcs/git</code>, <code>pacman -S git</code>,
<code>apt-get install git</code></p>
2023-04-13 23:50:59 +02:00
<p><code>git clone https://git.speedie.site/spmenu</code></p>
<p><code>cd spmenu/</code></p>
2023-04-30 01:00:49 +02:00
<p><code>./build.sh # Run as root. Install any missing dependencies.</code></p>
2023-05-08 11:39:34 +02:00
<p>Report any issues with the build.sh script.</p>
2023-04-26 11:31:54 +02:00
<h2 id="installation-macosos-xmac-os-x">Installation (macOS/OS X/Mac OS
X)</h2>
2023-04-27 08:21:46 +02:00
<p>NOTE: Adds Xquartz as a dependency. I highly recommend you use
Homebrew to install all the dependencies.</p>
2023-04-26 11:31:54 +02:00
<p>Follow Installation (GNU/Linux, *BSD) for the most part. macOS
2023-04-27 08:21:46 +02:00
requires some minor changes though, such as disabling pango, pangoxft,
imlib2, and openssl. It is not possible to compile spmenu with these as
of now, unless youre a developer.</p>
<p>PREFIX must also be set to /usr/local instead of the default /usr if
youre using macOS Catalina or newer, because Apple made /usr
read-only.</p>
2023-04-26 11:31:54 +02:00
<p>See <a
href="https://spmenu.speedie.site/index.php/Using+spmenu+on+macOS">this
wiki article</a> for more information.</p>
<h2 id="installation-gentoo-gnulinux">Installation (Gentoo
GNU/Linux)</h2>
<p>If you are on Gentoo GNU/Linux, you can add <a
2023-04-13 23:50:59 +02:00
href="https://git.speedie.site/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.site/speedie-repository">my repository</a>
which includes <code>spmenu</code> as well as other useful packages.</p>
2023-05-08 11:39:34 +02:00
<p>Theres also a PKGBUILD. To use it, simply run
<code>scripts/make/generate-pacman-pkg.sh</code> in the directory the
PKGBUILD is located. You can then <code>pacman -U</code> this package,
or add it to your repository.</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>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>
2023-04-03 00:53:42 +02:00
<li>Image support: Ability to display icons, similar to rofi</li>
2023-04-30 01:00:49 +02:00
<li>Text drawing: Use cairo for text drawing over Xft.</li>
<li>Lines: Rofi-like newlines in the same entry
<ul>
<li>Just need to <code>XMoveResizeWindow()</code> as well as
<code>mh += bh</code> and <code>y += bh</code> for each added line.</li>
</ul></li>
<li>Matching: Add support for contextual completions similar to
xprompt</li>
2023-04-30 01:00:49 +02:00
<li>Matching: Regex matching
<ul>
<li>Probably use some minimal public domain library for this, Id like
to avoid adding more external dependencies unless its a common
dependency most people already have.</li>
</ul></li>
2023-05-10 21:59:48 +02:00
<li>Deprecate: build.sh script. Its not really necessary now that were
using Meson for building anyway. Will probably be completely removed
along with the <code>IMG:</code> syntax in spmenu 2.0.</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>
2023-05-07 03:44:33 +02:00
<li>X11: Move from Xlib to libXcb</li>
<li>Wayland: Wayland support, but only if it doesnt require writing any
2023-04-30 01:00:49 +02:00
extra code which as of now seems unlikely, or if someone makes a patch.
<ul>
<li>Before this can even be done, replace Xft with cairo, deal with
2023-04-30 01:00:49 +02:00
keybinds in some Wayland compatible way, remove .Xresources usage and
figure out a way to preserve X11 compatibility as I do not want to use
Wayland as of now.</li>
<li>You can just use XWayland anyway if you happen to use Wayland, so
its not like you will be unable to use spmenu in its current
state.</li>
</ul></li>
</ul>
<h3 id="bugs">Bugs</h3>
2023-05-10 19:43:41 +02:00
<p>None discovered yet! :)</p>
<h2 id="scripts">Scripts</h2>
2023-05-06 15:02:25 +02:00
<p>Theres a page dedicated to user scripts <a
href="https://spmenu.speedie.site/index.php/User+scripts">over on the
wiki</a>. Feel free to contribute and try scripts on there.</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>
2023-04-30 01:00:49 +02:00
<h2 id="wiki">Wiki</h2>
<p>spmenu has <a href="https://spmenu.speedie.site">a wiki</a> for more
extensive documentation. Contributions to the wiki are appreciated!</p>
</body>
</html>