spmenu/spmenu.1

1548 lines
27 KiB
Groff
Raw Normal View History

2023-05-19 00:21:01 +02:00
'\" t
2023-06-19 21:28:45 +02:00
.\" Automatically generated by Pandoc 3.1.2
2023-02-26 15:37:09 +01:00
.\"
.\" Define V font for inline verbatim, using C font in formats
.\" that render this, and otherwise B font.
.ie "\f[CB]x\f[]"x" \{\
. ftr V B
. ftr VI BI
. ftr VB B
. ftr VBI BI
.\}
.el \{\
. ftr V CR
. ftr VI CI
. ftr VB CB
. ftr VBI CBI
.\}
2023-06-21 16:20:35 +02:00
.TH "spmenu" "1" "" "2.2" "fancy dynamic menu"
2023-02-26 15:37:09 +01:00
.hy
.SH spmenu
.PP
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-02-26 15:37:09 +01:00
.PP
2023-06-19 01:08:15 +02:00
Its core functionality is built around taking and parsing input and
returning output, making it a customizable and versatile utility for use
with shell or Python scripts.
.PP
In addition to this, it also serves as a run launcher/dmenu_run
replacement through the included shell script \f[V]spmenu_run\f[R],
which handles both $PATH listing, .desktop entries and file listing.
See spmenu_run(1) for more information regarding using spmenu as a run
2023-05-16 20:50:08 +02:00
launcher.
.SS Usage
2023-02-26 15:37:09 +01:00
.PP
On runtime, spmenu reads from standard input (stdin).
spmenu items are separated by a newline (\f[V]\[rs]n\f[R]).
When (by default) Enter is pressed, the selected item will be piped to
stdout.
.PP
This allows things like
\f[V]printf \[dq]Apple\[rs]nOrange\[rs]nPear\[rs]n\[dq] | spmenu\f[R].
This command will spawn an spmenu window with three items, `Apple',
`Orange' and `Pear'.
2023-06-19 01:08:15 +02:00
The user can select an item using the keyboard or mouse and the output
can then be parsed.
2023-02-26 15:37:09 +01:00
This can be used in shell scripts to create interactive menus.
.PP
2023-06-19 01:08:15 +02:00
Note that spmenu doesn\[cq]t strictly read standard input, it can read
from files too using the \f[V]-lf\f[R] or \f[V]--list-file\f[R]
argument.
2023-05-16 20:50:08 +02:00
.PP
2023-02-26 15:37:09 +01:00
On top of this, you can specify arguments to change the behavior of
spmenu.
See a list below for a list.
.SS Arguments
.PP
2023-03-20 16:00:50 +01:00
You may use long, descriptive arguments or the shorter arguments.
.TP
\f[V]-mh, --line-height height\f[R]
2023-03-20 16:00:50 +01:00
Set spmenu line height to height
.TP
\f[V]-mw, --min-width width\f[R]
Set minimum width to width when centered
2023-03-20 16:00:50 +01:00
.TP
\f[V]-g, --columns grid\f[R]
2023-03-20 16:00:50 +01:00
Set the number of grids to grid
.TP
\f[V]-gc, --generate-cache\f[R]
2023-03-20 16:00:50 +01:00
Generate image cache
.TP
\f[V]-ngc, --no-generate-cache\f[R]
2023-03-20 16:00:50 +01:00
Don\[cq]t generate image cache
.TP
\f[V]-mc, --max-cache size\f[R]
2023-03-21 21:52:14 +01:00
Set max image cache size to size
.TP
2023-05-12 23:23:15 +02:00
\f[V]-cd, --cache-dir dir\f[R]
Set cache directory to dir
.TP
\f[V]-ix, --print-index\f[R]
Print index instead of actual text
.TP
\f[V]-nix, --no-print-index\f[R]
Don\[cq]t print index instead of actual text
.TP
\f[V]-f, --fast\f[R]
2023-03-20 16:00:50 +01:00
Grabs keyboard before reading stdin
.TP
\f[V]-r, --incremental\f[R]
Print text every time a key is pressed
.TP
\f[V]-nr, --no-incremental\f[R]
Don\[cq]t print text every time a key is pressed
.TP
\f[V]-rm, --require-match\f[R]
Require that input text matches an item
.TP
\f[V]-nrm, --no-require-match\f[R]
Don\[cq]t require that input text matches an item
.TP
\f[V]-ma, --mark-items\f[R]
Allow marking/selecting multiple items
.TP
\f[V]-nma, --no-mark-items\f[R]
Don\[cq]t allow marking/selecting multiple items
.TP
\f[V]-F, --fuzzy\f[R]
2023-03-20 16:00:50 +01:00
Enable fuzzy matching
.TP
\f[V]-NF, --no-fuzzy\f[R]
2023-03-20 16:00:50 +01:00
Disable fuzzy matching
.TP
\f[V]-P, --password\f[R]
2023-03-20 16:00:50 +01:00
Hide characters
.TP
2023-04-07 17:58:42 +02:00
\f[V]-nP, --no-password\f[R]
Don\[cq]t hide characters
.TP
\f[V]-p, --prompt text\f[R]
2023-03-20 16:00:50 +01:00
Set spmenu prompt text to text
.TP
2023-04-03 15:14:20 +02:00
\f[V]-It, --input text\f[R]
Set initial input text to text
.TP
\f[V]-ip, --indent\f[R]
2023-03-20 16:00:50 +01:00
Indent items to prompt width
.TP
\f[V]-nip, --no-indent\f[R]
2023-03-20 16:00:50 +01:00
Don\[cq]t indent items to prompt width
.TP
\f[V]-ci, --color-items\f[R]
2023-03-28 15:10:57 +02:00
Color items
.TP
\f[V]-nci, --no-color-items\f[R]
2023-03-28 15:10:57 +02:00
Don\[cq]t color items
.TP
\f[V]-sgr, --sgr\f[R]
Interpret SGR sequences
.TP
\f[V]-nsgr, --no-sgr\f[R]
Display SGR sequences as text
.TP
\f[V]-a, --alpha\f[R]
2023-03-20 16:00:50 +01:00
Enable alpha
.TP
\f[V]-na, --no-alpha\f[R]
2023-03-20 16:00:50 +01:00
Disable alpha
.TP
\f[V]-tp, --allow-typing\f[R]
2023-03-20 16:00:50 +01:00
Allow the user to type
.TP
\f[V]-nt, --no-allow-typing\f[R]
2023-03-20 16:00:50 +01:00
Don\[cq]t allow typing, the user must select an option
.TP
\f[V]-ol, --override-lines\f[R]
Allow keybinds to override lines
.TP
\f[V]-oc, --override-columns\f[R]
Allow keybinds to override columns
.TP
\f[V]-nol, --no-override-lines\f[R]
Don\[cq]t allow keybinds to override lines
.TP
\f[V]-noc, --no-override-columns\f[R]
Don\[cq]t allow keybinds to override columns
.TP
\f[V]-x, --x-position x offset\f[R]
Offset spmenu x position by x offset (X11 only)
2023-03-20 16:00:50 +01:00
.TP
\f[V]-y, --y-position y offset\f[R]
Offset spmenu y position by y offset (X11 only)
2023-03-20 16:00:50 +01:00
.TP
\f[V]-n, --preselect line\f[R]
Preselect line line in the list of items
2023-03-20 16:00:50 +01:00
.TP
\f[V]-z, --width width\f[R]
2023-03-20 16:00:50 +01:00
Width of the spmenu window
.TP
\f[V]-nmt, --normal-mode-text text\f[R]
2023-03-20 16:00:50 +01:00
Set normal mode text to text
.TP
\f[V]-imt, --insert-mode-text text\f[R]
2023-03-20 16:00:50 +01:00
Set insert mode text to text
.TP
\f[V]-clon, --caps-lock-on-text text\f[R]
Set caps lock on text to text
.TP
\f[V]-clof, --caps-lock-off-text text\f[R]
Set caps lock off text to text
.TP
\f[V]-bw, --border-width width\f[R]
Set width of the border to width.
0 will disable the border (X11 only)
2023-03-20 16:00:50 +01:00
.TP
\f[V]-so, --sort\f[R]
2023-03-20 16:00:50 +01:00
Sort matches
.TP
\f[V]-nso, --no-sort\f[R]
2023-03-20 16:00:50 +01:00
Don\[cq]t sort matches
.TP
\f[V]-pri, --priority pri1,pri2,pri3\f[R]
2023-03-20 16:00:50 +01:00
Specify a list of items that take priority
.TP
\f[V]-s, --case-sensitive\f[R]
2023-03-20 16:00:50 +01:00
Use case-sensitive matching
.TP
\f[V]-ns, --case-insensitive\f[R]
2023-03-20 16:00:50 +01:00
Use case-insensitive matching
.TP
\f[V]-nm, --normal\f[R]
2023-03-20 16:00:50 +01:00
Start spmenu in normal mode
.TP
\f[V]-im, --insert\f[R]
2023-03-20 16:00:50 +01:00
Start spmenu in insert mode
.TP
\f[V]-t, --top\f[R]
2023-03-20 16:00:50 +01:00
Position spmenu at the top of the screen
.TP
\f[V]-b, --bottom\f[R]
2023-03-20 16:00:50 +01:00
Position spmenu at the bottom of the screen
.TP
\f[V]-c, --center\f[R]
2023-03-20 16:00:50 +01:00
Position spmenu at the center of the screen
.TP
\f[V]-hm, --hide-mode\f[R]
2023-03-20 16:00:50 +01:00
Hide mode indicator
.TP
2023-04-07 17:58:42 +02:00
\f[V]-hit, --hide-item\f[R]
Hide items
.TP
\f[V]-hmc, --hide-match-count\f[R]
2023-03-20 16:00:50 +01:00
Hide match count
.TP
\f[V]-hla, --hide-left-arrow\f[R]
2023-03-20 16:00:50 +01:00
Hide left arrow
.TP
\f[V]-hra, --hide-right-arrow\f[R]
2023-03-20 16:00:50 +01:00
Hide right arrow
.TP
\f[V]-hpr, --hide-prompt\f[R]
2023-03-20 16:00:50 +01:00
Hide prompt
.TP
\f[V]-hip, --hide-input\f[R]
Hide input
.TP
\f[V]-hpl, --hide-powerline\f[R]
2023-03-21 21:52:14 +01:00
Hide powerline
.TP
\f[V]-hc, --hide-caret, --hide-cursor\f[R]
Hide caret
2023-03-20 16:00:50 +01:00
.TP
\f[V]-hhl, --hide-highlighting\f[R]
2023-03-20 16:00:50 +01:00
Hide highlight
.TP
\f[V]-hi, --hide-image\f[R]
2023-03-20 16:00:50 +01:00
Hide image
.TP
\f[V]-hcl, --hide-caps\f[R]
Hide caps lock indicator
.TP
\f[V]-sm, --show-mode\f[R]
2023-03-20 16:00:50 +01:00
Show mode indicator
.TP
2023-04-07 17:58:42 +02:00
\f[V]-sit, --show-item\f[R]
Show items
.TP
\f[V]-smc, --show-match-count\f[R]
2023-03-20 16:00:50 +01:00
Show match count
.TP
\f[V]-sla, --show-left-arrow\f[R]
2023-03-20 16:00:50 +01:00
Show left arrow
.TP
\f[V]-sra, --show-right-arrow\f[R]
2023-03-20 16:00:50 +01:00
Show right arrow
.TP
\f[V]-spr, --show-prompt\f[R]
2023-03-20 16:00:50 +01:00
Show prompt
.TP
\f[V]-sin, --show-input\f[R]
Show input
.TP
\f[V]-spl, --show-powerline\f[R]
2023-03-21 21:52:14 +01:00
Show powerline
.TP
\f[V]-sc, --show-caret, --show-cursor\f[R]
Show caret
2023-03-20 16:00:50 +01:00
.TP
\f[V]-shl, --show-highlighting\f[R]
2023-03-20 16:00:50 +01:00
Show highlight
.TP
\f[V]-si, --show-image\f[R]
2023-03-20 16:00:50 +01:00
Show image
.TP
2023-04-22 21:34:37 +02:00
\f[V]-scl, --show-caps\f[R]
Show caps lock indicator
.TP
\f[V]-xrdb, --xrdb\f[R]
Load .Xresources on runtime (X11 only)
2023-03-20 16:00:50 +01:00
.TP
\f[V]-nxrdb, --no-xrdb\f[R]
Don\[cq]t load .Xresources on runtime (X11 only)
2023-03-20 16:00:50 +01:00
.TP
\f[V]-gbc, --global-colors\f[R]
Recognize global colors (such as *.color1) on runtime (X11 only)
2023-03-30 19:06:04 +02:00
.TP
\f[V]-ngbc, --no-global-colors\f[R]
Don\[cq]t recognize global colors (such as *.color1) on runtime (X11
only)
2023-03-30 19:06:04 +02:00
.TP
\f[V]-m, --monitor monitor\f[R]
Specify a monitor to run spmenu on (X11 only)
2023-03-20 16:00:50 +01:00
.TP
\f[V]-w, --embed window id\f[R]
Embed spmenu inside window id (X11 only)
2023-03-20 16:00:50 +01:00
.TP
\f[V]-H, --hist-file hist file\f[R]
Specify a file to save the history to
.TP
\f[V]-lf, --list-file list file\f[R]
Specify a file to load entries from
2023-03-20 16:00:50 +01:00
.TP
\f[V]-ig, --image-gaps gaps\f[R]
2023-03-20 16:00:50 +01:00
Set image gaps to gaps
.TP
\f[V]-txp, --text-padding padding\f[R]
2023-03-29 21:37:48 +02:00
Set text padding to padding
.TP
\f[V]-vem, --vertical-margin margin\f[R]
Set the vertical margin to margin
.TP
2023-04-29 16:04:29 +02:00
\f[V]-hom, --horizontal-margin margin\f[R]
Set the horizontal margin to margin
.TP
\f[V]-lp, --vertical-padding padding\f[R]
Set the vertical padding to padding
2023-03-20 16:00:50 +01:00
.TP
\f[V]-hp, --horizontal-padding padding\f[R]
Set the horizontal padding to padding
2023-03-20 16:00:50 +01:00
.TP
\f[V]-la, --left-arrow-symbol symbol\f[R]
2023-03-20 16:00:50 +01:00
Set the left arrow to symbol
.TP
\f[V]-ra, --right-arrow-symbol symbol\f[R]
2023-03-20 16:00:50 +01:00
Set the right arrow to symbol
.TP
\f[V]-is, --image-size size\f[R]
2023-03-20 16:00:50 +01:00
Image size
.TP
\f[V]-it, --image-top\f[R]
2023-03-20 16:00:50 +01:00
Position the image at the top
.TP
\f[V]-ib, --image-bottom\f[R]
2023-03-20 16:00:50 +01:00
Position the image at the bottom
.TP
\f[V]-ic, --image-center\f[R]
2023-03-20 16:00:50 +01:00
Position the image in the center
.TP
\f[V]-itc, --image-topcenter\f[R]
2023-03-20 16:00:50 +01:00
Position the image in the top center
2023-06-12 00:26:35 +02:00
.TP
\f[V]-ir, --image-resize\f[R]
Allow spmenu to resize itself to fit the image
.TP
\f[V]-nir, --no-image-resize\f[R]
Don\[cq]t allow spmenu to resize itself to fit the image
2023-03-20 16:00:50 +01:00
.TP
\f[V]-wm, --managed, --x11-client\f[R]
Spawn spmenu as a window manager controlled client/window (X11 only)
2023-03-20 16:00:50 +01:00
.TP
\f[V]-nwm, --unmanaged\f[R]
Don\[cq]t spawn spmenu as a window manager controlled client/window (X11
only)
2023-03-20 16:00:50 +01:00
.TP
\f[V]-cf, --config-file file\f[R]
Set config file to load to file
.TP
\f[V]-lcfg, --load-config\f[R]
Load spmenu configuration (\[ti]/.config/spmenu/spmenu.conf) on runtime
2023-03-20 16:00:50 +01:00
.TP
\f[V]-ncfg, --no-load-config\f[R]
Don\[cq]t load spmenu configuration (\[ti]/.config/spmenu/spmenu.conf)
on runtime
.TP
\f[V]-bf, --bind-file file\f[R]
Set bind file to load to file
.TP
\f[V]-lbi, --load-binds\f[R]
Exclusively load binds from file (\[ti]/.config/spmenu/binds.conf) on
runtime
.TP
\f[V]-nlbi, --no-load-binds\f[R]
Don\[cq]t exclusively load binds from file
(\[ti]/.config/spmenu/binds.conf) on runtime
2023-05-01 17:07:35 +02:00
.TP
\f[V]-tm, --theme theme\f[R]
Load theme `theme' on runtime
2023-05-01 17:07:35 +02:00
.TP
\f[V]-ltm, --load-theme\f[R]
Load theme (\[ti]/.config/spmenu/theme.conf) on runtime
2023-05-01 17:07:35 +02:00
.TP
\f[V]-nltm, --no-load-theme\f[R]
Don\[cq]t load theme (\[ti]/.config/spmenu/theme.conf) on runtime
2023-03-20 16:00:50 +01:00
.TP
\f[V]-x11, --x11\f[R]
Run spmenu in X11 mode
.TP
\f[V]-wl, --wayland\f[R]
Run spmenu in Wayland mode
.TP
\f[V]-v, --version\f[R]
2023-03-20 16:00:50 +01:00
Print spmenu version to stdout
.TP
\f[V]-rv, --raw-version\f[R]
Print raw spmenu version number to stdout
.TP
\f[V]-fl, --feature-list\f[R]
List the state of all features that can be toggled
.TP
\f[V]-fn, --font font\f[R]
2023-03-20 16:00:50 +01:00
Set the spmenu font to font
.TP
\f[V]-nif, --normal-item-foreground color\f[R]
2023-03-20 16:00:50 +01:00
Set the normal item foreground color
.TP
\f[V]-nib, --normal-item-background color\f[R]
2023-03-20 16:00:50 +01:00
Set the normal item background color
.TP
2023-05-13 16:07:29 +02:00
\f[V]-nnif, --normal-next-item-foreground color\f[R]
Set the normal next item foreground color
.TP
\f[V]-nnib, --normal-next-item-background color\f[R]
Set the normal next item background color
.TP
\f[V]-sif, --selected-item-foreground color\f[R]
2023-03-20 16:00:50 +01:00
Set the selected item foreground color
.TP
\f[V]-sib, --selected-item-background color\f[R]
2023-03-20 16:00:50 +01:00
Set the selected item background color
.TP
\f[V]-npf, --normal-item-priority-foreground color\f[R]
2023-03-20 16:00:50 +01:00
Set the normal item (high priority) foreground color
.TP
\f[V]-npb, --normal-item-priority-background color\f[R]
2023-03-20 16:00:50 +01:00
Set the normal item (high priority) background color
.TP
\f[V]-spf, --selected-item-priority-foreground color\f[R]
2023-03-20 16:00:50 +01:00
Set the selected item (high priority) foreground color
.TP
\f[V]-spb, --selected-item-priority-background color\f[R]
2023-03-20 16:00:50 +01:00
Set the selected item (high priority) background color
.TP
\f[V]-pfg, --prompt-foreground color\f[R]
2023-03-20 16:00:50 +01:00
Set the prompt foreground color
.TP
\f[V]-pbg, --prompt-background color\f[R]
2023-03-20 16:00:50 +01:00
Set the prompt background color
.TP
\f[V]-ifg, --input-foreground color\f[R]
2023-03-20 16:00:50 +01:00
Set input foreground color
.TP
\f[V]-ibg, --input-background color\f[R]
2023-03-20 16:00:50 +01:00
Set input background color
.TP
\f[V]-mnbg, --menu-background color\f[R]
2023-03-20 16:00:50 +01:00
Set the menu background color
.TP
\f[V]-nhf, --normal-highlight-foreground color\f[R]
2023-03-20 16:00:50 +01:00
Set the normal highlight foreground color
.TP
\f[V]-nhb, --normal-highlight-background color\f[R]
2023-03-20 16:00:50 +01:00
Set the normal highlight background color
.TP
\f[V]-shf, --selected-highlight-foreground color\f[R]
2023-03-20 16:00:50 +01:00
Set the selected highlight foreground color
.TP
\f[V]-shb, --selected-highlight-background color\f[R]
2023-03-20 16:00:50 +01:00
Set the selected highlight background color
.TP
\f[V]-nfg, --number-foreground color\f[R]
2023-03-20 16:00:50 +01:00
Set the foreground color for the match count
.TP
\f[V]-nbg, --number-background color\f[R]
2023-03-20 16:00:50 +01:00
Set the background color for the match count
.TP
\f[V]-mfg, --mode-foreground color\f[R]
2023-03-20 16:00:50 +01:00
Set the foreground color for the mode indicator
.TP
\f[V]-mbg, --mode-background color\f[R]
2023-03-20 16:00:50 +01:00
Set the background color for the mode indicator
.TP
\f[V]-laf, --left-arrow-foreground color\f[R]
2023-03-20 16:00:50 +01:00
Set the left arrow foreground color
.TP
\f[V]-raf, --right-arrow-foreground color\f[R]
2023-03-20 16:00:50 +01:00
Set the right arrow foreground color
.TP
\f[V]-lab, --left-arrow-background color\f[R]
2023-03-20 16:00:50 +01:00
Set the left arrow background color
.TP
\f[V]-rab, --right-arrow-background color\f[R]
2023-03-20 16:00:50 +01:00
Set the right arrow background color
.TP
\f[V]-cfc, --caret-foreground color\f[R]
Set the caret foreground color
.TP
\f[V]-cbc, --caret-background color\f[R]
Set the caret background color
2023-03-20 16:00:50 +01:00
.TP
\f[V]-bc, --border-background color\f[R]
2023-03-20 16:00:50 +01:00
Set the border color
.TP
\f[V]-sgr0, --sgr0 color\f[R]
2023-03-20 16:00:50 +01:00
Set the SGR 0 color
.TP
\f[V]-sgr1, --sgr1 color\f[R]
2023-03-20 16:00:50 +01:00
Set the SGR 1 color
.TP
\f[V]-sgr2, --sgr2 color\f[R]
2023-03-20 16:00:50 +01:00
Set the SGR 2 color
.TP
\f[V]-sgr3, --sgr3 color\f[R]
2023-03-20 16:00:50 +01:00
Set the SGR 3 color
.TP
\f[V]-sgr4, --sgr4 color\f[R]
2023-03-20 16:00:50 +01:00
Set the SGR 4 color
.TP
\f[V]-sgr5, --sgr5 color\f[R]
2023-03-20 16:00:50 +01:00
Set the SGR 5 color
.TP
\f[V]-sgr6, --sgr6 color\f[R]
2023-03-20 16:00:50 +01:00
Set the SGR 6 color
.TP
\f[V]-sgr7, --sgr7 color\f[R]
2023-03-20 16:00:50 +01:00
Set the SGR 7 color
.TP
\f[V]-sgr8, --sgr8 color\f[R]
2023-03-20 16:00:50 +01:00
Set the SGR 8 color
.TP
\f[V]-sgr9, --sgr9 color\f[R]
2023-03-20 16:00:50 +01:00
Set the SGR 9 color
.TP
\f[V]-sgr10, --sgr10 color\f[R]
2023-03-20 16:00:50 +01:00
Set the SGR 10 color
.TP
\f[V]-sgr11, --sgr11 color\f[R]
2023-03-20 16:00:50 +01:00
Set the SGR 11 color
.TP
\f[V]-sgr12, --sgr12 color\f[R]
2023-03-20 16:00:50 +01:00
Set the SGR 12 color
.TP
\f[V]-sgr13, --sgr13 color\f[R]
2023-03-20 16:00:50 +01:00
Set the SGR 13 color
.TP
\f[V]-sgr14, --sgr14 color\f[R]
2023-03-20 16:00:50 +01:00
Set the SGR 14 color
.TP
\f[V]-sgr15, --sgr15 color\f[R]
2023-03-20 16:00:50 +01:00
Set the SGR 15 color
.PP
2023-03-20 16:00:50 +01:00
dmenu compatibility can be achieved using these arguments:
.TP
\f[V]-S\f[R]
Don\[cq]t sort matches
.TP
\f[V]-i\f[R]
Use case-insensitive matching
.TP
\f[V]-nb color\f[R]
Set the normal background color
.TP
\f[V]-nf color\f[R]
Set the normal foreground color
.TP
\f[V]-sb color\f[R]
Set the selected background color
.TP
\f[V]-sf color\f[R]
2023-03-20 16:00:50 +01:00
Set the selected foreground color
2023-06-19 01:08:15 +02:00
.PP
There are more options, that can be set in the configuration file but
not using arguments passed to spmenu.
.SS Keybinds
2023-02-26 15:37:09 +01:00
.PP
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.
.PP
By default, the configuration file will ignore all hardcoded keybindings
2023-06-19 01:08:15 +02:00
to prevent keybind conflicts, but if you do not like this behavior you
can simply set \f[V]ignoreglobalkeys = 0\f[R].
.SS Modes
2023-02-26 15:37:09 +01:00
.PP
2023-06-19 01:08:15 +02:00
There are two modes.
2023-02-26 15:37:09 +01:00
Normal mode and Insert mode.
These modes are of course similar to Vim.
2023-06-19 01:08:15 +02:00
While modes are used by default, it is possible to move all keybinds to
Insert mode, restoring the original dmenu behavior.
2023-02-26 15:37:09 +01:00
.PP
Normal mode is the mode spmenu starts in unless a mode argument is
2023-06-09 07:06:59 +02:00
specified or another mode is set in the configuration file.
2023-02-26 15:37:09 +01:00
In normal mode, all keys perform some action, but you cannot type any
actual text to filter items.
2023-06-19 01:08:15 +02:00
This mode is commonly used for navigation, general keybinds, as well as
quickly selecting an item.
2023-02-26 15:37:09 +01:00
.PP
Insert mode is entered through (by default) pressing \f[V]i\f[R] 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\[cq]re done with insert mode, you can press Escape to enter
normal mode again.
2023-06-09 07:06:59 +02:00
.PP
All of these keybinds can be overriden in the configuration file.
2023-06-19 01:08:15 +02:00
Should you unbind your switchmode key, you can always press
\f[V]Ctrl+Alt+Delete\f[R] to exit spmenu, allowing you to fix your
spmenu configuration.
.SS -p option
2023-02-26 15:37:09 +01:00
.PP
2023-06-19 01:08:15 +02:00
spmenu has a \f[V]-p\f[R] or \f[V]--prompt\f[R] option.
2023-02-26 15:37:09 +01:00
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.
.PP
2023-06-19 01:08:15 +02:00
It may be useful when you want to display information, such as the
current directory or what the items actually do.
This is a field that can be overriden with almost any text.
.SS Displaying images
.PP
spmenu supports displaying images.
This image is placed on the left side of the menu window, as long as
spmenu isn\[cq]t a single line.
.PP
To use an image, pipe \f[V]img:///path/to/image\f[R] to spmenu.
2023-02-26 15:37:09 +01:00
If you want you can specify arguments like usual.
Note that you should add a Tab (\f[V]\[rs]t\f[R]) 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.
.PP
Any text after the Tab character will be interpreted as a regular item.
In practice, drawing an image might look like this:
.PP
\f[V]printf \[dq]img:///path/to/image\[rs]tLook at that image, isn\[aq]t it awesome?\[rs]n\[dq] | spmenu\f[R]
2023-02-26 15:37:09 +01:00
.PP
There are also a few image related arguments, such as:
.PP
\f[V]-is\f[R], \f[V]-ig\f[R], \f[V]-it\f[R], \f[V]-ib\f[R],
\f[V]-ic\f[R], \f[V]-itc\f[R] and \f[V]-gc\f[R].
.PP
Vector images (such as .svg) can be displayed too in the same way.
2023-06-19 01:08:15 +02:00
This is all done using \f[V]imlib2\f[R] and \f[V]cairo\f[R] so as long
as imlib2 support it, it can be used.
.PP
2023-06-19 01:08:15 +02:00
If the image cannot be located, isn\[cq]t a valid format or cannot be
displayed for some reason, the space where the image would be displayed
is blank.
.SS Colored text
2023-02-26 15:37:09 +01:00
.PP
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.
.PP
Not only does it support colored text, but it also supports colored
backgrounds.
2023-06-19 01:08:15 +02:00
This allows something similar to the emoji highlight patch on the
suckless website, except even more useful.
.PP
Example:
2023-04-03 15:14:20 +02:00
\f[V]printf \[dq]\[rs]033[0;44m😀\[rs]033[0m Emoji highlighting\[rs]n\[dq] | spmenu --columns 1\f[R]
.PP
2023-06-19 01:08:15 +02:00
It should be noted that font sequences are not yet supported.
2023-03-14 21:31:24 +01:00
See `SGR sequences' for more information.
.SS SGR sequences
2023-03-14 21:31:24 +01:00
.PP
A basic supported SGR sequence looks like this: \f[V]\[rs]033[X;YZm\f[R]
.PP
Here, X specifies if you want normal or bright colors.
Y specifies if you want background or foreground.
Z specifies the color number.
.PP
Foreground colors: \f[V]30\f[R] through \f[V]37\f[R] Background colors:
\f[V]40\f[R] through \f[V]47\f[R] Reset: \f[V]0\f[R]
.PP
NOTE: \f[V];\f[R] is a separator, and in this example it separates the
color number and normal/bright.
\[rs]033 may also be written as \f[V]\[ha]]\f[R] or simply
\f[V]ESC\f[R].
The separator may be omitted for some sequences, such as
\f[V]\[rs]033[0m\f[R] which resets the colorscheme.
2023-03-14 21:31:24 +01:00
.PP
spmenu supports most color sequences, although not true color by default
(unless -sgr arguments are used).
.PP
There are a few arguments, you can override SGR colors on-the-fly using
the \f[V]-sgrX\f[R] arguments.
See `Arguments' for more information.
.PP
Just as a tip, you can pipe your colored spmenu output to
\f[V]sed -e \[aq]s/\[rs]x1b\[rs][[0-9;]*m//g\[aq]\f[R].
This will clear the SGR sequences from the output.
This is useful when you want to check what the output actually is.
2023-04-29 22:33:42 +02:00
.PP
256 color sequences are also supported, but due to the complexity
2023-06-19 01:08:15 +02:00
involved, they will not be covered in this man page.
.SS Pango markup
.PP
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.
.PP
Pango markup allows you to style text similar to an HTML document.
It also provides the \f[V]<span>\f[R] tag, which can be used to do
surprisingly complex things.
.PP
There are many convenient tags as well which can be used to avoid using
a \f[V]<span>\f[R] tag, such as:
.TP
\f[V]<b>\f[R]
\f[B]Bold\f[R] text (\f[V]<b>Bold</b>\f[R])
.TP
\f[V]<i>\f[R]
\f[I]Italic\f[R] text (\f[V]<i>Italic</i>\f[R])
.TP
\f[V]<s>\f[R]
Strikethrough text (\f[V]<s>Strikethrough</s>\f[R])
.TP
\f[V]<u>\f[R]
Underline text (\f[V]<u>Underline</u>\f[R])
.TP
\f[V]<sub>\f[R]
Subscript (\f[V]<sub>Subscript</sub>\f[R])
.TP
\f[V]<sup>\f[R]
Superscript (\f[V]<sup>Supscript</sup>\f[R])
.TP
\f[V]<tt>\f[R]
Monospace font (\f[V]<tt>Monospaced font is used here</tt>\f[R])
.TP
\f[V]<small>\f[R]
Small text (\f[V]<small>text is so small here</small>\f[R])
.TP
\f[V]<big>\f[R]
Big text (\f[V]<big>text is so big here</big>\f[R])
.PP
Note that Pango markup is NOT escaped, and is piped to stdout.
Therefore you need to parse it manually.
Doing so with \f[V]sed\f[R] is very easy.
For example:
\f[V]... | spmenu ... | sed \[aq]s/<big>//g; s/</big>//g\[aq]\f[R]
.PP
See this page (https://docs.gtk.org/Pango/pango_markup.html) for more
information.
.SS Configuration
2023-03-14 21:31:24 +01:00
.PP
Unlike dmenu, spmenu has a configuration file which can be edited by
hand.
It is located in \[ti]/.config/spmenu/spmenu.conf, but you can override
this by exporting \f[V]$XDG_CONFIG_HOME\f[R].
.PP
When spmenu is installed, it copies a sample configuration to
/usr/share/spmenu/spmenu.conf.
You can copy this to your \f[V].config/spmenu\f[R] directory.
This configuration file is loaded on startup.
.PP
You can also include other configuration files in the configuration file
2023-06-19 01:08:15 +02:00
using \f[V]\[at]include \[dq]path/to/config\[dq]\f[R], useful if you
wish to split your config file up into multiple segments.
.PP
Note that spmenu also has a \f[V]binds.conf\f[R] configuration file,
which isn\[cq]t used very much.
This file is documented well
here (https://spmenu.speedie.site/binds.conf+documentation).
2023-05-19 00:21:01 +02:00
.SS Default keybinds
.PP
These are the default keybinds.
You can generate these yourself from a \f[V]keybinds.h\f[R] using
\f[V]scripts/make/generate-keybind-list.sh\f[R].
.PP
.TS
tab(@);
lw(14.0n) lw(14.0n) lw(14.0n) lw(14.0n) lw(14.0n).
T{
Mode
T}@T{
Modifier
T}@T{
Key
T}@T{
Function
T}@T{
Argument
T}
_
T{
-1
T}@T{
0
T}@T{
Return
T}@T{
selectitem
T}@T{
+1
T}
T{
-1
T}@T{
Shift
T}@T{
Return
T}@T{
selectitem
T}@T{
0
T}
T{
-1
T}@T{
Ctrl
T}@T{
Return
T}@T{
markitem
T}@T{
0
T}
T{
-1
T}@T{
0
T}@T{
Tab
T}@T{
complete
T}@T{
0
T}
T{
-1
T}@T{
Ctrl
T}@T{
v
T}@T{
paste
T}@T{
2
T}
T{
-1
T}@T{
Ctrl+Shift
T}@T{
v
T}@T{
paste
T}@T{
1
T}
T{
-1
T}@T{
0
T}@T{
BackSpace
T}@T{
backspace
T}@T{
0
T}
T{
-1
T}@T{
Ctrl
T}@T{
BackSpace
T}@T{
deleteword
T}@T{
0
T}
T{
-1
T}@T{
Ctrl
T}@T{
Left
T}@T{
moveword
T}@T{
-1
T}
T{
-1
T}@T{
Ctrl
T}@T{
Right
T}@T{
moveword
T}@T{
+1
T}
T{
-1
T}@T{
0
T}@T{
Left
T}@T{
movecursor
T}@T{
-1
T}
T{
-1
T}@T{
0
T}@T{
Right
T}@T{
movecursor
T}@T{
+1
T}
T{
-1
T}@T{
Ctrl+Shift
T}@T{
p
T}@T{
setprofile
T}@T{
0
T}
T{
-1
T}@T{
Ctrl
T}@T{
k
T}@T{
setlines
T}@T{
+1
T}
T{
-1
T}@T{
Ctrl
T}@T{
j
T}@T{
setlines
T}@T{
-1
T}
T{
-1
T}@T{
Ctrl+Alt+Shift
T}@T{
k
T}@T{
setlines
T}@T{
+5
T}
T{
-1
T}@T{
Ctrl+Alt+Shift
T}@T{
j
T}@T{
setlines
T}@T{
-5
T}
T{
-1
T}@T{
Ctrl
T}@T{
h
T}@T{
setcolumns
T}@T{
+1
T}
T{
-1
T}@T{
Ctrl
T}@T{
l
T}@T{
setcolumns
T}@T{
-1
T}
T{
-1
T}@T{
Ctrl+Alt+Shift
T}@T{
h
T}@T{
setcolumns
T}@T{
+5
T}
T{
-1
T}@T{
Ctrl+Alt+Shift
T}@T{
l
T}@T{
setcolumns
T}@T{
-5
T}
T{
2023-05-19 00:21:01 +02:00
0
T}@T{
0
T}@T{
i
T}@T{
switchmode
T}@T{
0
T}
T{
0
T}@T{
0
T}@T{
slash
T}@T{
switchmode
T}@T{
0
T}
T{
0
T}@T{
Ctrl
T}@T{
equal
T}@T{
setimgsize
T}@T{
+1
T}
T{
0
T}@T{
Ctrl
T}@T{
minus
T}@T{
setimgsize
T}@T{
-1
T}
T{
0
T}@T{
0
T}@T{
equal
T}@T{
setimgsize
T}@T{
+10
T}
T{
0
T}@T{
0
T}@T{
minus
T}@T{
setimgsize
T}@T{
-10
T}
T{
0
T}@T{
Shift
T}@T{
equal
T}@T{
setimgsize
T}@T{
+100
T}
T{
0
T}@T{
Shift
T}@T{
minus
T}@T{
setimgsize
T}@T{
-100
T}
T{
0
T}@T{
Shift
T}@T{
0
T}@T{
defaultimg
T}@T{
0
T}
T{
0
T}@T{
0
T}@T{
o
T}@T{
setimgpos
T}@T{
+1
T}
T{
0
T}@T{
Ctrl
T}@T{
1
T}@T{
setimggaps
T}@T{
-1
T}
T{
0
T}@T{
Ctrl
T}@T{
2
T}@T{
setimggaps
T}@T{
+1
T}
T{
0
T}@T{
0
T}@T{
1
T}@T{
setimggaps
T}@T{
-10
T}
T{
0
T}@T{
0
T}@T{
2
T}@T{
setimggaps
T}@T{
+10
T}
T{
0
T}@T{
Shift
T}@T{
1
T}@T{
setimggaps
T}@T{
-100
T}
T{
0
T}@T{
Shift
T}@T{
2
T}@T{
setimggaps
T}@T{
+100
T}
T{
0
T}@T{
0
T}@T{
t
T}@T{
toggleimg
T}@T{
0
T}
T{
0
T}@T{
0
T}@T{
p
T}@T{
paste
T}@T{
2
T}
T{
0
T}@T{
0
2023-05-19 00:21:01 +02:00
T}@T{
q
2023-05-19 00:21:01 +02:00
T}@T{
flipimg
T}@T{
1
T}
T{
0
T}@T{
0
2023-05-19 00:21:01 +02:00
T}@T{
w
2023-05-19 00:21:01 +02:00
T}@T{
flipimg
T}@T{
0
T}
T{
0
T}@T{
0
T}@T{
k
T}@T{
moveup
T}@T{
0
T}
T{
0
T}@T{
0
T}@T{
j
T}@T{
movedown
T}@T{
0
T}
T{
0
T}@T{
0
T}@T{
h
T}@T{
moveleft
T}@T{
0
T}
T{
0
T}@T{
0
T}@T{
l
T}@T{
moveright
T}@T{
0
T}
T{
0
T}@T{
Ctrl
T}@T{
u
T}@T{
moveup
T}@T{
5
T}
T{
0
T}@T{
Ctrl
T}@T{
d
T}@T{
movedown
T}@T{
5
T}
T{
0
T}@T{
0
T}@T{
u
T}@T{
togglehighlight
T}@T{
0
T}
T{
0
T}@T{
Shift
2023-05-19 00:21:01 +02:00
T}@T{
h
T}@T{
viewhist
T}@T{
0
T}
T{
0
T}@T{
0
T}@T{
d
T}@T{
clear
T}@T{
0
T}
T{
0
T}@T{
Shift
T}@T{
d
T}@T{
clearins
T}@T{
0
T}
T{
0
T}@T{
0
T}@T{
Escape
T}@T{
quit
T}@T{
0
T}
T{
0
T}@T{
0
T}@T{
Home
T}@T{
movestart
T}@T{
0
T}
T{
0
T}@T{
0
T}@T{
End
T}@T{
moveend
T}@T{
0
T}
T{
0
T}@T{
0
T}@T{
g
T}@T{
movestart
T}@T{
0
T}
T{
0
T}@T{
Shift
T}@T{
g
T}@T{
moveend
T}@T{
0
T}
T{
0
T}@T{
0
T}@T{
Next
T}@T{
movenext
T}@T{
0
T}
T{
0
T}@T{
0
T}@T{
Prior
T}@T{
moveprev
T}@T{
0
T}
T{
0
T}@T{
Ctrl
2023-05-19 00:21:01 +02:00
T}@T{
p
T}@T{
navhistory
T}@T{
-1
T}
T{
0
T}@T{
Ctrl
2023-05-19 00:21:01 +02:00
T}@T{
n
T}@T{
navhistory
T}@T{
+1
T}
T{
1
T}@T{
0
T}@T{
Escape
T}@T{
switchmode
T}@T{
0
T}
.TE
.SS .Xresources
.PP
\f[B]NOTE: Only applies for X11 users\f[R]
.PP
spmenu also has .Xresources (xrdb) support built in.
2023-03-14 21:31:24 +01:00
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 config file.
2023-03-14 21:31:24 +01:00
.PP
You can also use wildcards (such as \f[V]*\f[R]) to achieve a global
colorscheme.
Programs like \f[V]pywal\f[R] do this to apply universal colorschemes.
.SS Themes
.PP
You could just \f[V]\[at]include\f[R] themes from the aforementioned
\f[V]spmenu.conf\f[R], but it\[cq]s kind of inconvenient.
2023-06-19 01:08:15 +02:00
For this reason, spmenu reads \f[V].config/spmenu/theme.conf\f[R] on
startup as well.
To apply a basic theme, you simply replace theme.conf with the theme you
want to use.
.PP
2023-06-03 02:47:39 +02:00
There is a Git
2023-06-19 01:08:15 +02:00
repository (https://git.speedie.site/speedie/spmenu-themes) and wiki
article (https://spmenu.speedie.site/User+themes) which contains a bunch
of themes written for spmenu, and you can use them as a template when
making your own themes.
You may also contribute to this repository if you have a theme to show.
.PP
Do however note that the theme file is \f[B]not\f[R] 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.
.PP
2023-06-19 01:08:15 +02:00
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.
2023-06-03 02:47:39 +02:00
spmenuify (https://git.speedie.site/speedie/spmenuify) is the official
theme manager, but you could use another one or write your own.
2023-03-29 23:08:24 +02:00
.PP
2023-06-19 01:08:15 +02:00
For more information on the theme.conf configuration file, see this
page (https://spmenu.speedie.site/theme.conf+documentation).
.SS spmenu commands
2023-03-29 23:08:24 +02:00
.PP
spmenu has a few special commands.
These work similar to the images.
For example to list the version, in addition to the \f[V]--version\f[R]
argument you can also simply run
\f[V]printf \[aq]spmenu:version\[aq] | spmenu\f[R].
There are a few of these.
.TP
\f[V]spmenu:version\f[R]
Print the spmenu version
.TP
\f[V]spmenu:license\f[R]
Print the spmenu license
.SS License
2023-03-20 15:32:20 +01:00
.PP
2023-06-19 01:08:15 +02:00
spmenu is licensed under the MIT license.
.SS Reporting issues
.PP
2023-06-09 07:25:17 +02:00
Please report issues on the Git
2023-06-19 01:08:15 +02:00
repository (https://git.speedie.site/speedie/spmenu) or the GitHub
mirror (https://github.com/speediegq/spmenu).
2023-05-17 08:15:21 +02:00
.SS See also
.IP \[bu] 2
spmenu_run(1)
.IP \[bu] 2
spmenu_test(1)
.IP \[bu] 2
spmenu wiki (https://spmenu.speedie.site)
.IP \[bu] 2
2023-06-03 02:47:39 +02:00
spmenu git repository (https://git.speedie.site/speedie/spmenu)
.IP \[bu] 2
spmenu GitHub mirror (https://github.com/speediegq/spmenu)