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