2023-04-22 00:16:31 +02:00
|
|
|
|
<!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" />
|
2023-05-12 14:33:19 +02:00
|
|
|
|
<title>spmenu(1) 1.1.2 | fancy dynamic menu</title>
|
2023-04-22 00:16:31 +02:00
|
|
|
|
<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>
|
|
|
|
|
<header id="title-block-header">
|
2023-05-12 14:33:19 +02:00
|
|
|
|
<h1 class="title">spmenu(1) 1.1.2 | fancy dynamic menu</h1>
|
2023-04-22 00:16:31 +02:00
|
|
|
|
</header>
|
|
|
|
|
<h1 id="spmenu">spmenu</h1>
|
|
|
|
|
<p>spmenu is a program for X11 that reads standard input and allows the
|
2023-04-25 18:11:49 +02:00
|
|
|
|
user to select items separated by a newline. It’s a fork of <a
|
2023-04-22 00:16:31 +02:00
|
|
|
|
href="https://tools.suckless.org/dmenu">suckless’s dmenu</a> which is a
|
|
|
|
|
good more minimal alternative to spmenu.</p>
|
|
|
|
|
<p>What makes spmenu different from all the dmenu forks is that spmenu
|
|
|
|
|
has features like color support, Vim-like modes, image support, proper
|
|
|
|
|
mouse/keybind configuration, and more.</p>
|
|
|
|
|
<p>It should be noted that most of these features may be disabled by the
|
|
|
|
|
user, either during compile time or through configuration.</p>
|
2023-04-25 18:11:49 +02:00
|
|
|
|
<h2 id="usage">Usage</h2>
|
2023-04-22 00:16:31 +02:00
|
|
|
|
<p>On runtime, spmenu reads from standard input (stdin). spmenu items
|
|
|
|
|
are separated by a newline (<code>\n</code>). When (by default) Enter is
|
|
|
|
|
pressed, the selected item will be piped to stdout.</p>
|
|
|
|
|
<p>This allows things like
|
|
|
|
|
<code>printf "Apple\nOrange\nPear\n" | spmenu</code>. This command will
|
|
|
|
|
spawn an spmenu window with three items, ‘Apple’, ‘Orange’ and ‘Pear’.
|
|
|
|
|
This can be used in shell scripts to create interactive menus.</p>
|
|
|
|
|
<p>On top of this, you can specify arguments to change the behavior of
|
|
|
|
|
spmenu. See a list below for a list.</p>
|
2023-04-25 18:11:49 +02:00
|
|
|
|
<h2 id="arguments">Arguments</h2>
|
2023-04-22 00:16:31 +02:00
|
|
|
|
<p>You may use long, descriptive arguments or the shorter arguments.</p>
|
|
|
|
|
<dl>
|
2023-04-22 14:18:30 +02:00
|
|
|
|
<dt><code>-mh, --line-height height</code></dt>
|
2023-04-22 00:16:31 +02:00
|
|
|
|
<dd>
|
|
|
|
|
Set spmenu line height to height
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-mw, --min-width width</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set minimum width to width
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-g, --columns grid</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the number of grids to grid
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-gc, --generate-cache</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Generate image cache
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-ngc, --no-generate-cache</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Don’t generate image cache
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-mc, --max-cache size</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set max image cache size to size
|
|
|
|
|
</dd>
|
2023-05-12 23:23:15 +02:00
|
|
|
|
<dt><code>-cd, --cache-dir dir</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set cache directory to dir
|
|
|
|
|
</dd>
|
2023-04-22 00:16:31 +02:00
|
|
|
|
<dt><code>-rw, --relative-width</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Enable relative input width
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-nrw, --no-relative-width</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Disable relative input width
|
|
|
|
|
</dd>
|
2023-05-06 23:29:41 +02:00
|
|
|
|
<dt><code>-ix, --print-index</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Print index instead of actual text
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-nix, --no-print-index</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Don’t print index instead of actual text
|
|
|
|
|
</dd>
|
2023-04-22 00:16:31 +02:00
|
|
|
|
<dt><code>-f, --fast</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Grabs keyboard before reading stdin
|
|
|
|
|
</dd>
|
2023-05-06 23:39:03 +02:00
|
|
|
|
<dt><code>-r, --incremental</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Print text every time a key is pressed
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-nr, --no-incremental</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Don’t print text every time a key is pressed
|
|
|
|
|
</dd>
|
2023-05-09 19:30:01 +02:00
|
|
|
|
<dt><code>-rm, --require-match</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Require that input text matches an item
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-nrm, --no-require-match</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Don’t require that input text matches an item
|
|
|
|
|
</dd>
|
2023-04-22 00:16:31 +02:00
|
|
|
|
<dt><code>-F, --fuzzy</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Enable fuzzy matching
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-NF, --no-fuzzy</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Disable fuzzy matching
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-P, --password</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Hide characters
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-nP, --no-password</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Don’t hide characters
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-p, --prompt text</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set spmenu prompt text to text
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-It, --input text</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set initial input text to text
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-ip, --indent</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Indent items to prompt width
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-nip, --no-indent</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Don’t indent items to prompt width
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-ci, --color-items</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Color items
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-nci, --no-color-items</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Don’t color items
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-sgr, --sgr</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Interpret SGR sequences
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-nsgr, --no-sgr</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Display SGR sequences as text
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-a, --alpha</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Enable alpha
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-na, --no-alpha</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Disable alpha
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-tp, --allow-typing</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Allow the user to type
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-nt, --no-allow-typing</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Don’t allow typing, the user must select an option
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-x, --x-position x offset</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Offset spmenu x position by x offset
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-y, --y-position y offset</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Offset spmenu y position by y offset
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-n, --preselect line</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Preselect line line in the list of items
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-z, --width width</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Width of the spmenu window
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-nmt, --normal-mode-text text</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set normal mode text to text
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-imt, --insert-mode-text text</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set insert mode text to text
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-clon, --caps-lock-on-text text</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set caps lock on text to text
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-clof, --caps-lock-off-text text</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set caps lock off text to text
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-bw, --border-width width</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set width of the border to width . 0 will disable the border
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-so, --sort</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Sort matches
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-nso, --no-sort</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Don’t sort matches
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-pri, --priority pri1,pri2,pri3</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Specify a list of items that take priority
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-s, --case-sensitive</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Use case-sensitive matching
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-ns, --case-insensitive</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Use case-insensitive matching
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-nm, --normal</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Start spmenu in normal mode
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-im, --insert</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Start spmenu in insert mode
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-t, --top</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Position spmenu at the top of the screen
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-b, --bottom</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Position spmenu at the bottom of the screen
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-c, --center</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Position spmenu at the center of the screen
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-hm, --hide-mode</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Hide mode indicator
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-hit, --hide-item</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Hide items
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-hmc, --hide-match-count</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Hide match count
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-hla, --hide-left-arrow</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Hide left arrow
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-hra, --hide-right-arrow</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Hide right arrow
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-hpr, --hide-prompt</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Hide prompt
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-hip, --hide-input</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Hide input
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-hpl, --hide-powerline</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Hide powerline
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-hc, --hide-caret, --hide-cursor</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Hide caret
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-hhl, --hide-highlighting</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Hide highlight
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-hi, --hide-image</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Hide image
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-hcl, --hide-caps</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Hide caps lock indicator
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-sm, --show-mode</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Show mode indicator
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-sit, --show-item</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Show items
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-smc, --show-match-count</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Show match count
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-sla, --show-left-arrow</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Show left arrow
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-sra, --show-right-arrow</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Show right arrow
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-spr, --show-prompt</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Show prompt
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-sin, --show-input</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Show input
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-spl, --show-powerline</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Show powerline
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-sc, --show-caret, --show-cursor</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Show caret
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-shl, --show-highlighting</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Show highlight
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-si, --show-image</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Show image
|
|
|
|
|
</dd>
|
2023-04-22 21:34:37 +02:00
|
|
|
|
<dt><code>-scl, --show-caps</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Show caps lock indicator
|
|
|
|
|
</dd>
|
2023-04-22 00:16:31 +02:00
|
|
|
|
<dt><code>-xrdb, --xrdb</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Load .Xresources on runtime
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-nxrdb, --no-xrdb</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Don’t load .Xresources on runtime
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-gbc, --global-colors</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Recognize global colors (such as *.color1) on runtime
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-ngbc, --no-global-colors</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Don’t recognize global colors (such as *.color1) on runtime
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-m, --monitor monitor</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Specify a monitor to run spmenu on
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-w, --embed window id</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Embed spmenu inside window id
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-H, --hist-file hist file</code></dt>
|
|
|
|
|
<dd>
|
2023-05-07 01:41:30 +02:00
|
|
|
|
Specify a file to save the history to
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-lf, --list-file list file</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Specify a file to load entries from
|
2023-04-22 00:16:31 +02:00
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-ig, --image-gaps gaps</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set image gaps to gaps
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-txp, --text-padding padding</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set text padding to padding
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-vem, --vertical-margin margin</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the vertical margin
|
|
|
|
|
</dd>
|
2023-04-29 16:04:29 +02:00
|
|
|
|
<dt><code>-hom, --horizontal-margin margin</code></dt>
|
2023-04-22 00:16:31 +02:00
|
|
|
|
<dd>
|
|
|
|
|
Set the horizontal margin
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-lp, --vertical-padding padding</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the vertical padding
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-hp, --horizontal-padding padding</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the horizontal padding
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-la, --left-arrow-symbol symbol</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the left arrow to symbol
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-ra, --right-arrow-symbol symbol</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the right arrow to symbol
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-is, --image-size size</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Image size
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-it, --image-top</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Position the image at the top
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-ib, --image-bottom</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Position the image at the bottom
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-ic, --image-center</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Position the image in the center
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-itc, --image-topcenter</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Position the image in the top center
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-wm, --managed, --x11-client</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Spawn spmenu as a window manager controlled client/window. Useful for
|
|
|
|
|
testing
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-nwm, --unmanaged</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Don’t spawn spmenu as a window manager controlled client/window. Useful
|
|
|
|
|
for testing
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-cf, --config-file file</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set config file to load to file
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-lcfg, --load-config</code></dt>
|
|
|
|
|
<dd>
|
2023-05-01 17:07:35 +02:00
|
|
|
|
Load spmenu configuration (~/.spmenu.conf or
|
|
|
|
|
~/.config/spmenu/spmenu.conf)
|
2023-04-22 00:16:31 +02:00
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-ncfg, --no-load-config</code></dt>
|
|
|
|
|
<dd>
|
2023-05-01 17:07:35 +02:00
|
|
|
|
Don’t load spmenu configuration (~/.spmenu.conf or
|
|
|
|
|
~/.config/spmenu/spmenu.conf)
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-tm, --theme theme</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Load theme ‘theme’ on runtime.
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-ltm, --load-theme</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Load theme
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-nltm, --no-load-theme</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Don’t load theme
|
2023-04-22 00:16:31 +02:00
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-v, --version</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Print spmenu version to stdout
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-fn, --font font</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the spmenu font to font
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-nif, --normal-item-foreground color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the normal item foreground color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-nib, --normal-item-background color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the normal item background color
|
|
|
|
|
</dd>
|
2023-05-13 16:07:29 +02:00
|
|
|
|
<dt><code>-nnif, --normal-next-item-foreground color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the normal next item foreground color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-nnib, --normal-next-item-background color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the normal next item background color
|
|
|
|
|
</dd>
|
2023-04-22 00:16:31 +02:00
|
|
|
|
<dt><code>-sif, --selected-item-foreground color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the selected item foreground color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-sib, --selected-item-background color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the selected item background color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-npf, --normal-item-priority-foreground color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the normal item (high priority) foreground color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-npb, --normal-item-priority-background color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the normal item (high priority) background color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-spf, --selected-item-priority-foreground color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the selected item (high priority) foreground color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-spb, --selected-item-priority-background color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the selected item (high priority) background color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-pfg, --prompt-foreground color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the prompt foreground color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-pbg, --prompt-background color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the prompt background color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-ifg, --input-foreground color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set input foreground color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-ibg, --input-background color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set input background color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-mnbg, --menu-background color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the menu background color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-nhf, --normal-highlight-foreground color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the normal highlight foreground color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-nhb, --normal-highlight-background color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the normal highlight background color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-shf, --selected-highlight-foreground color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the selected highlight foreground color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-shb, --selected-highlight-background color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the selected highlight background color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-nfg, --number-foreground color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the foreground color for the match count
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-nbg, --number-background color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the background color for the match count
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-mfg, --mode-foreground color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the foreground color for the mode indicator
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-mbg, --mode-background color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the background color for the mode indicator
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-laf, --left-arrow-foreground color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the left arrow foreground color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-raf, --right-arrow-foreground color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the right arrow foreground color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-lab, --left-arrow-background color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the left arrow background color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-rab, --right-arrow-background color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the right arrow background color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-cfc, --caret-foreground color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the caret foreground color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-cbc, --caret-background color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the caret background color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-bc, --border-background color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the border color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-sgr0, --sgr0 color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the SGR 0 color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-sgr1, --sgr1 color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the SGR 1 color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-sgr2, --sgr2 color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the SGR 2 color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-sgr3, --sgr3 color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the SGR 3 color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-sgr4, --sgr4 color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the SGR 4 color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-sgr5, --sgr5 color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the SGR 5 color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-sgr6, --sgr6 color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the SGR 6 color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-sgr7, --sgr7 color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the SGR 7 color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-sgr8, --sgr8 color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the SGR 8 color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-sgr9, --sgr9 color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the SGR 9 color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-sgr10, --sgr10 color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the SGR 10 color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-sgr11, --sgr11 color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the SGR 11 color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-sgr12, --sgr12 color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the SGR 12 color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-sgr13, --sgr13 color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the SGR 13 color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-sgr14, --sgr14 color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the SGR 14 color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-sgr15, --sgr15 color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the SGR 15 color
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
<p>dmenu compatibility can be achieved using these arguments:</p>
|
|
|
|
|
<dl>
|
|
|
|
|
<dt><code>-S</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Don’t sort matches
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-i</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Use case-insensitive matching
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-nb color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the normal background color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-nf color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the normal foreground color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-sb color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the selected background color
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>-sf color</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Set the selected foreground color
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
2023-04-25 18:11:49 +02:00
|
|
|
|
<h2 id="keybinds">Keybinds</h2>
|
|
|
|
|
<p>You can set keybinds through the config file. A default config file
|
|
|
|
|
is available after installing spmenu. This configuration file has
|
|
|
|
|
identical keybindings to the default hardcoded keybinds.</p>
|
|
|
|
|
<p>By default, the configuration file will ignore all hardcoded
|
|
|
|
|
keybindings to prevent keybind conflicts, but if you do not like this
|
|
|
|
|
behaviour you can simply set <code>ignoreglobalkeys = 1</code>.</p>
|
|
|
|
|
<h2 id="modes">Modes</h2>
|
2023-04-22 00:16:31 +02:00
|
|
|
|
<p>One of the features that separate spmenu from dmenu is spmenu’s
|
|
|
|
|
different modes. As of version 0.2, there are two modes. Normal mode and
|
|
|
|
|
Insert mode. These modes are of course similar to Vim.</p>
|
|
|
|
|
<p>Normal mode is the mode spmenu starts in unless a mode argument is
|
|
|
|
|
specified. In normal mode, all keys perform some action, but you cannot
|
|
|
|
|
type any actual text to filter items. This mode is used for navigation,
|
|
|
|
|
as well as quickly selecting an item.</p>
|
|
|
|
|
<p>Insert mode is entered through (by default) pressing <code>i</code>
|
|
|
|
|
in normal mode. In this mode, most keybinds do nothing. When you are in
|
|
|
|
|
insert mode, you filter items by typing text into the field. Once you’re
|
|
|
|
|
done with insert mode, you can press Escape to enter normal mode
|
|
|
|
|
again.</p>
|
2023-04-25 18:11:49 +02:00
|
|
|
|
<h2 id="p-option">-p option</h2>
|
2023-04-22 00:16:31 +02:00
|
|
|
|
<p>spmenu has a -p option, which stands for prompt. It allows you to
|
|
|
|
|
specify text to display next to the item list. It is displayed on the
|
|
|
|
|
left side of the spmenu window. It should be noted that the prompt is
|
|
|
|
|
purely visual though.</p>
|
2023-04-25 18:11:49 +02:00
|
|
|
|
<h2 id="images">Images</h2>
|
2023-04-22 00:16:31 +02:00
|
|
|
|
<p>spmenu supports drawing images. This image is placed on the left side
|
|
|
|
|
of the menu window. To use an image, pipe
|
2023-05-10 21:55:28 +02:00
|
|
|
|
<code>img:///path/to/image</code> to spmenu. If you want you can specify
|
2023-04-22 00:16:31 +02:00
|
|
|
|
arguments like usual. Note that you should add a Tab (<code>\t</code>)
|
|
|
|
|
character after the path to the image file. Otherwise the text after
|
|
|
|
|
will be interpreted as part of the filename and the image will not be
|
|
|
|
|
drawn.</p>
|
|
|
|
|
<p>Any text after the Tab character will be interpreted as a regular
|
|
|
|
|
item. In practice, drawing an image might look like this:</p>
|
2023-05-10 21:55:28 +02:00
|
|
|
|
<p><code>printf "img:///path/to/image\tLook at that image, isn't it awesome?\n" | spmenu</code></p>
|
2023-04-22 00:16:31 +02:00
|
|
|
|
<p>There are also a few image related arguments, such as:</p>
|
|
|
|
|
<p><code>-is</code>, <code>-ig</code>, <code>-it</code>,
|
|
|
|
|
<code>-ib</code>, <code>-ic</code>, <code>-itc</code> and
|
|
|
|
|
<code>-gc</code>.</p>
|
2023-05-10 21:55:28 +02:00
|
|
|
|
<p>Vector images (such as .svg) can be displayed too in the same way.
|
|
|
|
|
This is all done using <code>imlib2</code> so as long as imlib2 support
|
|
|
|
|
it, it can be used.</p>
|
|
|
|
|
<p>NOTE: Also note that older spmenu scripts may use the
|
|
|
|
|
<code>IMG:</code> prefix rather than the newer <code>img://</code>
|
|
|
|
|
prefix. It is recommended that you use the <code>img://</code> prefix,
|
|
|
|
|
but <code>IMG:</code> may be preferred if you need compatibility with
|
|
|
|
|
older spmenu versions.</p>
|
2023-04-25 18:11:49 +02:00
|
|
|
|
<h2 id="colored-text">Colored text</h2>
|
2023-04-22 00:16:31 +02:00
|
|
|
|
<p>spmenu supports colored text through SGR sequences. This is the same
|
|
|
|
|
colors that you might already be using in your shell scripts. This means
|
|
|
|
|
you can pipe practically any colored shell script straight into spmenu,
|
|
|
|
|
no need to filter the output or anything.</p>
|
|
|
|
|
<p>Not only does it support colored text, but it also supports colored
|
|
|
|
|
backgrounds. This allows something similar to the emoji highlight patch,
|
|
|
|
|
except even more useful. Example:
|
|
|
|
|
<code>printf "\033[0;44m😀\033[0m Emoji highlighting\n" | spmenu --columns 1</code></p>
|
|
|
|
|
<p>See ‘SGR sequences’ for more information.</p>
|
2023-04-25 18:11:49 +02:00
|
|
|
|
<h2 id="sgr-sequences">SGR sequences</h2>
|
2023-04-22 00:16:31 +02:00
|
|
|
|
<p>A basic supported SGR sequence looks like this:
|
|
|
|
|
<code>\033[X;YZm</code></p>
|
|
|
|
|
<p>Here, X specifies if you want normal or bright colors. Y specifies if
|
|
|
|
|
you want background or foreground. Z specifies the color number.</p>
|
|
|
|
|
<p>Foreground colors: <code>30</code> through <code>37</code> Background
|
|
|
|
|
colors: <code>40</code> through <code>47</code> Reset:
|
|
|
|
|
<code>0</code></p>
|
|
|
|
|
<p>NOTE: <code>;</code> is a separator, and in this example it separates
|
|
|
|
|
the color number and normal/bright. \033 may also be written as
|
|
|
|
|
<code>^]</code> or simply <code>ESC</code>. The separator may be omitted
|
|
|
|
|
for some sequences, such as <code>\033[0m</code> which resets the
|
|
|
|
|
colorscheme.</p>
|
|
|
|
|
<p>spmenu supports most color sequences, although not true color by
|
|
|
|
|
default (unless -sgr arguments are used).</p>
|
|
|
|
|
<p>There are a few arguments, you can override SGR colors on-the-fly
|
|
|
|
|
using the <code>-sgrX</code> arguments. See ‘Arguments’ for more
|
|
|
|
|
information.</p>
|
|
|
|
|
<p>Just as a tip, you can pipe your colored spmenu output to
|
|
|
|
|
<code>sed -e 's/\x1b\[[0-9;]*m//g'</code>. This will clear the SGR
|
|
|
|
|
sequences from the output. This is useful when you want to check what
|
|
|
|
|
the output actually is.</p>
|
2023-04-29 22:33:42 +02:00
|
|
|
|
<p>256 color sequences are also supported, but due to the complexity
|
|
|
|
|
involved they will not be covered in this man page.</p>
|
2023-04-25 18:11:49 +02:00
|
|
|
|
<h2 id="pango-markup">Pango markup</h2>
|
2023-04-22 00:16:31 +02:00
|
|
|
|
<p>If spmenu was compiled with Pango enabled (default), you should be
|
|
|
|
|
able to utilize Pango markup in every part of spmenu. That is, the mode
|
|
|
|
|
indicator, items, input, prompt, etc.</p>
|
|
|
|
|
<p>Pango markup allows you to style text similar to an HTML document. It
|
|
|
|
|
also provides the <code><span></code> tag, which can be used to do
|
|
|
|
|
surprisingly complex things.</p>
|
|
|
|
|
<p>There are many convenient tags as well which can be used to avoid
|
|
|
|
|
using a <code><span></code> tag, such as:</p>
|
|
|
|
|
<dl>
|
|
|
|
|
<dt><code><b></code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
<strong>Bold</strong> text (<code><b>Bold</b></code>)
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code><i></code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
<em>Italic</em> text (<code><i>Italic</i></code>)
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code><s></code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Strikethrough text (<code><s>Strikethrough</s></code>)
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code><u></code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Underline text (<code><u>Underline</u></code>)
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code><sub></code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Subscript (<code><sub>Subscript</sub></code>)
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code><sup></code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Superscript (<code><sup>Supscript</sup></code>)
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code><tt></code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Monospace font
|
|
|
|
|
(<code><tt>Monospaced font is used here</tt></code>)
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code><small></code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Small text
|
|
|
|
|
(<code><small>text is so small here</small></code>)
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code><big></code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Big text (<code><big>text is so big here</big></code>)
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
<p>Note that Pango markup is NOT escaped, and is piped to stdout.
|
|
|
|
|
Therefore you need to parse it manually. Doing so with <code>sed</code>
|
|
|
|
|
is very easy. For example:
|
|
|
|
|
<code>... | spmenu ... | sed 's/<big>//g; s/</big>//g'</code></p>
|
|
|
|
|
<p>See <a href="https://docs.gtk.org/Pango/pango_markup.html">this
|
|
|
|
|
page</a> for more information.</p>
|
2023-04-25 18:11:49 +02:00
|
|
|
|
<h2 id="configuration">Configuration</h2>
|
2023-04-22 00:16:31 +02:00
|
|
|
|
<p>Unlike dmenu, spmenu has a configuration file which can be edited by
|
|
|
|
|
hand. It is located in ~/.config/spmenu/spmenu.conf, but you can
|
|
|
|
|
override this by exporting <code>$XDG_CONFIG_HOME</code>.</p>
|
|
|
|
|
<p>When spmenu is installed, it copies a sample configuration to
|
|
|
|
|
/usr/share/spmenu/spmenu.conf. You can copy this to your
|
|
|
|
|
<code>.config/spmenu</code> directory. This configuration file is loaded
|
|
|
|
|
on startup.</p>
|
|
|
|
|
<p>You can also include other configuration files in the configuration
|
|
|
|
|
file using <code>@include "path/to/config"</code>.</p>
|
2023-04-25 18:11:49 +02:00
|
|
|
|
<h2 id="xresources">.Xresources</h2>
|
2023-04-22 00:16:31 +02:00
|
|
|
|
<p>spmenu also has .Xresources (xrdb) support built in. It reads the
|
|
|
|
|
xrdb (.Xresources database) on runtime. You may disable it by passing
|
|
|
|
|
-nxrdb, or enable it by padding -xrdb. You can also set this in the
|
2023-05-01 22:46:13 +02:00
|
|
|
|
config file.</p>
|
2023-04-22 00:16:31 +02:00
|
|
|
|
<p>You can also use wildcards (such as <code>*</code>) to achieve a
|
|
|
|
|
global colorscheme. Programs like <code>pywal</code> do this to apply
|
|
|
|
|
universal colorschemes.</p>
|
2023-05-01 22:46:13 +02:00
|
|
|
|
<h2 id="themes">Themes</h2>
|
|
|
|
|
<p>You could just <code>@include</code> themes from the aforementioned
|
|
|
|
|
<code>spmenu.conf</code>, but it’s kind of inconvenient. For this
|
|
|
|
|
reason, spmenu reads <code>.theme.conf</code> and
|
|
|
|
|
<code>.config/spmenu/theme.conf</code> on startup as well. To apply a
|
|
|
|
|
basic theme, you simply replace theme.conf with the theme you want to
|
|
|
|
|
use.</p>
|
|
|
|
|
<p><code>themes/</code> in the <a
|
|
|
|
|
href="https://git.speedie.site/spmenu">Git repository</a> contains a
|
|
|
|
|
bunch of themes written for spmenu, and you can use them as a template
|
|
|
|
|
when making your own themes.</p>
|
|
|
|
|
<p>Do however note that the theme file is <strong>not</strong> the same
|
|
|
|
|
as the config file. There are quite a lot of differences, and many
|
|
|
|
|
options are not available. This is by design, as these options should be
|
|
|
|
|
set by the user, not the theme.</p>
|
|
|
|
|
<p>This is not very convenient if you have many themes because you
|
|
|
|
|
constantly have to replace your theme file, so theme managers exist to
|
|
|
|
|
make this a bit easier. <a
|
|
|
|
|
href="https://git.speedie.site/spmenuify">spmenuify</a> is the official
|
|
|
|
|
theme manager, but you could use another one or write your own.</p>
|
2023-04-25 18:11:49 +02:00
|
|
|
|
<h2 id="run-launcher">Run launcher</h2>
|
2023-04-28 18:24:27 +02:00
|
|
|
|
<p>spmenu includes a powerful Bash script called spmenu_run. It lists
|
|
|
|
|
executable programs in $PATH and displays them to the user in a list.
|
|
|
|
|
Not only that but it optionally shows recently run programs first in the
|
|
|
|
|
list.</p>
|
2023-04-22 00:16:31 +02:00
|
|
|
|
<p>The selected option is piped to /bin/sh (by default). Unlike
|
|
|
|
|
dmenu_run, spmenu_run has some cool features. For example:</p>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>Prepending <code>#</code> will spawn it in a terminal instead of
|
|
|
|
|
just a shell.</li>
|
|
|
|
|
<li>Prepending <code>?</code> will run the command in a function, most
|
|
|
|
|
of the time used to display the man page.</li>
|
|
|
|
|
<li>Prepending <code>magnet</code> will open a magnet link in
|
|
|
|
|
$TORRENT</li>
|
|
|
|
|
<li>Prepending <code>www</code> will open a page in $BROWSER</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<p>Most of the time you don’t need to prepend <code>www</code> though,
|
|
|
|
|
for example typing in <code>https://gnu.org</code> will open gnu.org in
|
|
|
|
|
$BROWSER even without the prefix. Same goes for magnet links.</p>
|
|
|
|
|
<p>You can also configure the run launcher through editing
|
|
|
|
|
<code>~/.config/spmenu/run/config</code> which is configured in shell
|
|
|
|
|
syntax.</p>
|
2023-04-28 18:24:27 +02:00
|
|
|
|
<p>In addition to the $PATH listing, spmenu_run also allows listing out
|
|
|
|
|
and displaying .desktop entries. It does this in style, too by
|
|
|
|
|
displaying the program icon.</p>
|
2023-04-22 00:16:31 +02:00
|
|
|
|
<p>It can be configured through editing
|
2023-04-28 18:24:27 +02:00
|
|
|
|
<code>~/.config/spmenu/run/config</code>. The configuration file can
|
2023-04-22 00:16:31 +02:00
|
|
|
|
also be moved by setting <code>${XDG_CONFIG_HOME}</code>.</p>
|
2023-04-25 18:11:49 +02:00
|
|
|
|
<h2 id="spmenu-commands">spmenu commands</h2>
|
2023-04-22 00:16:31 +02:00
|
|
|
|
<p>spmenu has a few special commands. These work similar to the images.
|
|
|
|
|
For example to list the version, in addition to the
|
|
|
|
|
<code>--version</code> argument you can also simply run
|
|
|
|
|
<code>printf 'spmenu:version' | spmenu</code>. There are a few of
|
|
|
|
|
these.</p>
|
|
|
|
|
<dl>
|
|
|
|
|
<dt><code>spmenu:version</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Print the spmenu version
|
|
|
|
|
</dd>
|
|
|
|
|
<dt><code>spmenu:license</code></dt>
|
|
|
|
|
<dd>
|
|
|
|
|
Print the spmenu license
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
2023-04-25 18:11:49 +02:00
|
|
|
|
<h2 id="license">License</h2>
|
2023-04-22 00:16:31 +02:00
|
|
|
|
<p>spmenu is licensed under the MIT license because that’s the original
|
|
|
|
|
suckless license. See the included LICENSE file for more
|
|
|
|
|
information.</p>
|
2023-04-25 18:11:49 +02:00
|
|
|
|
<h2 id="reporting-issues">Reporting issues</h2>
|
2023-04-22 00:16:31 +02:00
|
|
|
|
<p>Please report issues on the <a
|
2023-04-28 18:24:27 +02:00
|
|
|
|
href="https://codeberg.org/speedie/spmenu">Codeberg repository</a> or
|
2023-04-22 00:16:31 +02:00
|
|
|
|
alternatively email me.</p>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|