update documentation

This commit is contained in:
speedie 2023-06-19 01:08:15 +02:00
parent b0c39b6dc3
commit 6083df6736
5 changed files with 140 additions and 151 deletions

View file

@ -4,10 +4,14 @@ spmenu
spmenu is an X11 and Wayland menu application which takes standard input, parses 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. it, lets the user choose an option and sends the selected option to standard output.
In addition to this, it also serves as a run launcher through the included Its core functionality is built around taking and parsing input and returning
shell script `spmenu_run`, which handles both $PATH listing, .desktop entries output, making it a customizable and versatile utility for use with
and file listing. See spmenu_run(1) for more information related to shell or Python scripts.
using spmenu as a run launcher.
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.
## Usage ## Usage
@ -16,11 +20,12 @@ separated by a newline (`\n`). When (by default) Enter is pressed, the selected
item will be piped to stdout. item will be piped to stdout.
This allows things like `printf "Apple\nOrange\nPear\n" | spmenu`. This command This allows things like `printf "Apple\nOrange\nPear\n" | spmenu`. This command
will spawn an spmenu window with three items, 'Apple', 'Orange' and 'Pear'. will spawn an spmenu window with three items, 'Apple', 'Orange' and 'Pear'. The
This can be used in shell scripts to create interactive menus. 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.
spmenu doesn't strictly read standard input, it can read from files too using Note that spmenu doesn't strictly read standard input, it can read from files
the `-lf` or `--list-file` argument. too using the `-lf` or `--list-file` argument.
On top of this, you can specify arguments to change the behavior of spmenu. On top of this, you can specify arguments to change the behavior of spmenu.
See a list below for a list. See a list below for a list.
@ -532,6 +537,9 @@ dmenu compatibility can be achieved using these arguments:
`-sf color` `-sf color`
: Set the selected foreground color : Set the selected foreground color
There are more options, that can be set in the configuration file but not using
arguments passed to spmenu.
## Keybinds ## Keybinds
You can set keybinds through the config file. A default config file is available You can set keybinds through the config file. A default config file is available
@ -539,40 +547,50 @@ after installing spmenu. This configuration file has identical keybindings to th
default hardcoded keybinds. default hardcoded keybinds.
By default, the configuration file will ignore all hardcoded keybindings to By default, the configuration file will ignore all hardcoded keybindings to
prevent keybind conflicts, but if you do not like this behaviour you can prevent keybind conflicts, but if you do not like this behavior you can
simply set `ignoreglobalkeys = 1`. simply set `ignoreglobalkeys = 0`.
## Modes ## Modes
One of the features that separate spmenu from dmenu is spmenu's different There are two modes. Normal mode and Insert mode. These modes are of
modes. As of version 0.2, there are two modes. Normal mode and Insert mode. course similar to Vim. While modes are used by default, it is possible
These modes are of course similar to Vim. to move all keybinds to Insert mode, restoring the original dmenu
behavior.
Normal mode is the mode spmenu starts in unless a mode argument is specified 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 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. 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. This mode is commonly used for navigation, general keybinds, as well as
quickly selecting an item.
Insert mode is entered through (by default) pressing `i` in normal mode. In 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 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 filter items by typing text into the field. Once you're done
with insert mode, you can press Escape to enter normal mode again. with insert mode, you can press Escape to enter normal mode again.
All of these keybinds can be overriden in the configuration file. 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.
## -p option ## -p option
spmenu has a -p option, which stands for prompt. It allows you to specify spmenu has a `-p` or `--prompt` option. It allows you to specify
text to display next to the item list. It is displayed on the left side of the 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. spmenu window. It should be noted that the prompt is purely visual though.
## Images 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.
spmenu supports drawing images. This image is placed on the left side of ## Displaying images
the menu window. 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 spmenu supports displaying images. This image is placed on the left side of
a Tab (`\t`) character after the path to the image file. Otherwise the text the menu window, as long as spmenu isn't a single line.
after will be interpreted as part of the filename and the image will not be drawn.
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.
Any text after the Tab character will be interpreted as a regular item. Any text after the Tab character will be interpreted as a regular item.
In practice, drawing an image might look like this: In practice, drawing an image might look like this:
@ -584,11 +602,10 @@ There are also a few image related arguments, such as:
`-is`, `-ig`, `-it`, `-ib`, `-ic`, `-itc` and `-gc`. `-is`, `-ig`, `-it`, `-ib`, `-ic`, `-itc` and `-gc`.
Vector images (such as .svg) can be displayed too in the same way. This is all Vector images (such as .svg) can be displayed too in the same way. This is all
done using `imlib2` so as long as imlib2 support it, it can be used. done using `imlib2` and `cairo` so as long as imlib2 support it, it can be used.
NOTE: Older spmenu scripts may use the `IMG:` prefix rather than If the image cannot be located, isn't a valid format or cannot be displayed
the newer `img://` prefix. It is recommended that you use the `img://` prefix, for some reason, the space where the image would be displayed is blank.
but `IMG:` may be preferred if you need compatibility with older spmenu versions.
## Colored text ## Colored text
@ -598,10 +615,13 @@ pipe practically any colored shell script straight into spmenu,
no need to filter the output or anything. no need to filter the output or anything.
Not only does it support colored text, but it also supports colored backgrounds. 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. This allows something similar to the emoji highlight patch on the suckless website,
except even more useful.
Example: `printf "\033[0;44m😀\033[0m Emoji highlighting\n" | spmenu --columns 1` Example: `printf "\033[0;44m😀\033[0m Emoji highlighting\n" | spmenu --columns 1`
See 'SGR sequences' for more information. It should be noted that font sequences are not yet supported. See 'SGR sequences'
for more information.
## SGR sequences ## SGR sequences
@ -629,7 +649,7 @@ 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 `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. the output. This is useful when you want to check what the output actually is.
256 color sequences are also supported, but due to the complexity involved they 256 color sequences are also supported, but due to the complexity involved, they
will not be covered in this man page. will not be covered in this man page.
## Pango markup ## Pango markup
@ -688,7 +708,11 @@ to /usr/share/spmenu/spmenu.conf. You can copy this to your `.config/spmenu` dir
This configuration file is loaded on startup. This configuration file is loaded on startup.
You can also include other configuration files in the configuration file using You can also include other configuration files in the configuration file using
`@include "path/to/config"`. `@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).
## Default keybinds ## Default keybinds
@ -774,52 +798,27 @@ Programs like `pywal` do this to apply universal colorschemes.
## Themes ## Themes
You could just `@include` themes from the aforementioned `spmenu.conf`, but You could just `@include` themes from the aforementioned `spmenu.conf`, but
it's kind of inconvenient. For this reason, spmenu reads `.theme.conf` it's kind of inconvenient. For this reason, spmenu reads `.config/spmenu/theme.conf`
and `.config/spmenu/theme.conf` on startup as well. To apply a basic theme, on startup as well. To apply a basic theme,
you simply replace theme.conf with the theme you want to use. you simply replace theme.conf with the theme you want to use.
There is a [Git repository](https://git.speedie.site/speedie/spmenu-themes) There is a [Git repository](https://git.speedie.site/speedie/spmenu-themes)
which contains a bunch of themes written for spmenu, and [wiki article](https://spmenu.speedie.site/User+themes) which contains
and you can use them as a template when making your own themes. a bunch of themes written for spmenu, and you can use them as a template
You may also contribute to this repository if you have a theme to show. when making your own themes. You may also contribute to this repository
if you have a theme to show.
Do however note that the theme file is **not** the same as the config file. 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. 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. This is by design, as these options should be set by the user, not the theme.
This is not very convenient if you have many themes because you constantly 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 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 bit easier. [spmenuify](https://git.speedie.site/speedie/spmenuify) is the official
theme manager, but you could use another one or write your own. theme manager, but you could use another one or write your own.
## Run launcher For more information on the theme.conf configuration file,
see [this page](https://spmenu.speedie.site/theme.conf+documentation).
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.
The selected option is piped to /bin/sh (by default). Unlike dmenu_run,
spmenu_run has some cool features. For example:
- Prepending `#` will spawn it in a terminal instead of just a shell.
- Prepending `?` will run the command in a function, most of the time used to
display the man page.
- Prepending `magnet` will open a magnet link in $TORRENT
- Prepending `www` will open a page in $BROWSER
Most of the time you don't need to prepend `www` though, for example
typing in `https://gnu.org` will open gnu.org in $BROWSER even
without the prefix. Same goes for magnet links.
You can also configure the run launcher through editing
`~/.config/spmenu/run/config` which is configured in shell syntax.
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.
It can be configured through editing `~/.config/spmenu/run/config`. The
configuration file can also be moved by setting `${XDG_CONFIG_HOME}`.
## spmenu commands ## spmenu commands
@ -835,14 +834,12 @@ run `printf 'spmenu:version' | spmenu`. There are a few of these.
## License ## License
spmenu is licensed under the MIT license because that's the original suckless spmenu is licensed under the MIT license.
license. See the included LICENSE file for more information.
## Reporting issues ## Reporting issues
Please report issues on the Please report issues on the [Git repository](https://git.speedie.site/speedie/spmenu)
[Git repository](https://git.speedie.site/speedie/spmenu) or alternatively or the [GitHub mirror](https://github.com/speediegq/spmenu).
email me.
## See also ## See also

View file

@ -27,7 +27,9 @@ display the man page.
Most of the time you don't need to prepend `www` though, for example Most of the time you don't need to prepend `www` though, for example
typing in `https://gnu.org` will open gnu.org in $BROWSER even typing in `https://gnu.org` will open gnu.org in $BROWSER even
without the prefix. Same goes for magnet links. without the prefix. If $BROWSER isn't set then $BROWSER will be set
to xdg-open. Same goes for magnet links, although this has
limited use.
By default it also saves history, which can be viewed by calling By default it also saves history, which can be viewed by calling
`viewhistory` in your spmenu config. By default the keybind `viewhistory` in your spmenu config. By default the keybind

View file

@ -92,7 +92,7 @@ int drawitemtext(struct item *item, int x, int y, int w) {
} }
if (is_selected(item->index)) { if (is_selected(item->index)) {
selitem = 1; selitem = (lines ? 1 : selitem);
bgcol = col_itemmarkedbg; bgcol = col_itemmarkedbg;
fgcol = col_itemmarkedfg; fgcol = col_itemmarkedfg;
fga = alpha_itemmarkedfg; fga = alpha_itemmarkedfg;
@ -224,7 +224,7 @@ int drawitemtext(struct item *item, int x, int y, int w) {
} }
if (is_selected(item->index)) { if (is_selected(item->index)) {
selitem = 1; selitem = (lines ? 1 : selitem);
bgcol = col_itemmarkedbg; bgcol = col_itemmarkedbg;
fgcol = col_itemmarkedfg; fgcol = col_itemmarkedfg;
fga = alpha_itemmarkedfg; fga = alpha_itemmarkedfg;

145
spmenu.1
View file

@ -23,10 +23,14 @@ spmenu is an X11 and Wayland menu application which takes standard
input, parses it, lets the user choose an option and sends the selected input, parses it, lets the user choose an option and sends the selected
option to standard output. option to standard output.
.PP .PP
In addition to this, it also serves as a run launcher through the Its core functionality is built around taking and parsing input and
included shell script \f[V]spmenu_run\f[R], which handles both $PATH returning output, making it a customizable and versatile utility for use
listing, .desktop entries and file listing. with shell or Python scripts.
See spmenu_run(1) for more information related to using spmenu as a run .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
launcher. launcher.
.SS Usage .SS Usage
.PP .PP
@ -39,10 +43,13 @@ This allows things like
\f[V]printf \[dq]Apple\[rs]nOrange\[rs]nPear\[rs]n\[dq] | spmenu\f[R]. \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', This command will spawn an spmenu window with three items, `Apple',
`Orange' and `Pear'. `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. This can be used in shell scripts to create interactive menus.
.PP .PP
spmenu doesn\[cq]t strictly read standard input, it can read from files Note that spmenu doesn\[cq]t strictly read standard input, it can read
too using the \f[V]-lf\f[R] or \f[V]--list-file\f[R] argument. from files too using the \f[V]-lf\f[R] or \f[V]--list-file\f[R]
argument.
.PP .PP
On top of this, you can specify arguments to change the behavior of On top of this, you can specify arguments to change the behavior of
spmenu. spmenu.
@ -559,6 +566,9 @@ Set the selected background color
.TP .TP
\f[V]-sf color\f[R] \f[V]-sf color\f[R]
Set the selected foreground color Set the selected foreground color
.PP
There are more options, that can be set in the configuration file but
not using arguments passed to spmenu.
.SS Keybinds .SS Keybinds
.PP .PP
You can set keybinds through the config file. You can set keybinds through the config file.
@ -567,21 +577,22 @@ This configuration file has identical keybindings to the default
hardcoded keybinds. hardcoded keybinds.
.PP .PP
By default, the configuration file will ignore all hardcoded keybindings By default, the configuration file will ignore all hardcoded keybindings
to prevent keybind conflicts, but if you do not like this behaviour you to prevent keybind conflicts, but if you do not like this behavior you
can simply set \f[V]ignoreglobalkeys = 1\f[R]. can simply set \f[V]ignoreglobalkeys = 0\f[R].
.SS Modes .SS Modes
.PP .PP
One of the features that separate spmenu from dmenu is spmenu\[cq]s There are two modes.
different modes.
As of version 0.2, there are two modes.
Normal mode and Insert mode. Normal mode and Insert mode.
These modes are of course similar to Vim. 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.
.PP .PP
Normal mode is the mode spmenu starts in unless a mode argument is Normal mode is the mode spmenu starts in unless a mode argument is
specified or another mode is set in the configuration file. specified or another mode is set in the configuration file.
In normal mode, all keys perform some action, but you cannot type any In normal mode, all keys perform some action, but you cannot type any
actual text to filter items. actual text to filter items.
This mode is used for navigation, as well as quickly selecting an item. This mode is commonly used for navigation, general keybinds, as well as
quickly selecting an item.
.PP .PP
Insert mode is entered through (by default) pressing \f[V]i\f[R] in Insert mode is entered through (by default) pressing \f[V]i\f[R] in
normal mode. normal mode.
@ -592,16 +603,25 @@ Once you\[cq]re done with insert mode, you can press Escape to enter
normal mode again. normal mode again.
.PP .PP
All of these keybinds can be overriden in the configuration file. All of these keybinds can be overriden in the configuration file.
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 .SS -p option
.PP .PP
spmenu has a -p option, which stands for prompt. spmenu has a \f[V]-p\f[R] or \f[V]--prompt\f[R] option.
It allows you to specify text to display next to the item list. 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 is displayed on the left side of the spmenu window.
It should be noted that the prompt is purely visual though. It should be noted that the prompt is purely visual though.
.SS Images
.PP .PP
spmenu supports drawing images. It may be useful when you want to display information, such as the
This image is placed on the left side of the menu window. 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. To use an image, pipe \f[V]img:///path/to/image\f[R] to spmenu.
If you want you can specify arguments like usual. 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 Note that you should add a Tab (\f[V]\[rs]t\f[R]) character after the
@ -620,14 +640,12 @@ There are also a few image related arguments, such as:
\f[V]-ic\f[R], \f[V]-itc\f[R] and \f[V]-gc\f[R]. \f[V]-ic\f[R], \f[V]-itc\f[R] and \f[V]-gc\f[R].
.PP .PP
Vector images (such as .svg) can be displayed too in the same way. Vector images (such as .svg) can be displayed too in the same way.
This is all done using \f[V]imlib2\f[R] so as long as imlib2 support it, This is all done using \f[V]imlib2\f[R] and \f[V]cairo\f[R] so as long
it can be used. as imlib2 support it, it can be used.
.PP .PP
NOTE: Older spmenu scripts may use the \f[V]IMG:\f[R] prefix rather than If the image cannot be located, isn\[cq]t a valid format or cannot be
the newer \f[V]img://\f[R] prefix. displayed for some reason, the space where the image would be displayed
It is recommended that you use the \f[V]img://\f[R] prefix, but is blank.
\f[V]IMG:\f[R] may be preferred if you need compatibility with older
spmenu versions.
.SS Colored text .SS Colored text
.PP .PP
spmenu supports colored text through SGR sequences. spmenu supports colored text through SGR sequences.
@ -638,11 +656,13 @@ into spmenu, no need to filter the output or anything.
.PP .PP
Not only does it support colored text, but it also supports colored Not only does it support colored text, but it also supports colored
backgrounds. backgrounds.
This allows something similar to the emoji highlight patch, except even This allows something similar to the emoji highlight patch on the
more useful. suckless website, except even more useful.
.PP
Example: Example:
\f[V]printf \[dq]\[rs]033[0;44m😀\[rs]033[0m Emoji highlighting\[rs]n\[dq] | spmenu --columns 1\f[R] \f[V]printf \[dq]\[rs]033[0;44m😀\[rs]033[0m Emoji highlighting\[rs]n\[dq] | spmenu --columns 1\f[R]
.PP .PP
It should be noted that font sequences are not yet supported.
See `SGR sequences' for more information. See `SGR sequences' for more information.
.SS SGR sequences .SS SGR sequences
.PP .PP
@ -675,7 +695,7 @@ This will clear the SGR sequences from the output.
This is useful when you want to check what the output actually is. This is useful when you want to check what the output actually is.
.PP .PP
256 color sequences are also supported, but due to the complexity 256 color sequences are also supported, but due to the complexity
involved they will not be covered in this man page. involved, they will not be covered in this man page.
.SS Pango markup .SS Pango markup
.PP .PP
If spmenu was compiled with Pango enabled (default), you should be able If spmenu was compiled with Pango enabled (default), you should be able
@ -737,7 +757,13 @@ You can copy this to your \f[V].config/spmenu\f[R] directory.
This configuration file is loaded on startup. This configuration file is loaded on startup.
.PP .PP
You can also include other configuration files in the configuration file You can also include other configuration files in the configuration file
using \f[V]\[at]include \[dq]path/to/config\[dq]\f[R]. 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).
.SS Default keybinds .SS Default keybinds
.PP .PP
These are the default keybinds. These are the default keybinds.
@ -1458,15 +1484,16 @@ Programs like \f[V]pywal\f[R] do this to apply universal colorschemes.
.PP .PP
You could just \f[V]\[at]include\f[R] themes from the aforementioned 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. \f[V]spmenu.conf\f[R], but it\[cq]s kind of inconvenient.
For this reason, spmenu reads \f[V].theme.conf\f[R] and For this reason, spmenu reads \f[V].config/spmenu/theme.conf\f[R] on
\f[V].config/spmenu/theme.conf\f[R] on startup as well. startup as well.
To apply a basic theme, you simply replace theme.conf with the theme you To apply a basic theme, you simply replace theme.conf with the theme you
want to use. want to use.
.PP .PP
There is a Git There is a Git
repository (https://git.speedie.site/speedie/spmenu-themes) which repository (https://git.speedie.site/speedie/spmenu-themes) and wiki
contains a bunch of themes written for spmenu, and you can use them as a article (https://spmenu.speedie.site/User+themes) which contains a bunch
template when making your own themes. 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. You may also contribute to this repository if you have a theme to show.
.PP .PP
Do however note that the theme file is \f[B]not\f[R] the same as the Do however note that the theme file is \f[B]not\f[R] the same as the
@ -1476,50 +1503,14 @@ available.
This is by design, as these options should be set by the user, not the This is by design, as these options should be set by the user, not the
theme. theme.
.PP .PP
This is not very convenient if you have many themes because you Not very convenient if you have many themes because you constantly have
constantly have to replace your theme file, so theme managers exist to to replace your theme file, so theme managers exist to make this a bit
make this a bit easier. easier.
spmenuify (https://git.speedie.site/speedie/spmenuify) is the official spmenuify (https://git.speedie.site/speedie/spmenuify) is the official
theme manager, but you could use another one or write your own. theme manager, but you could use another one or write your own.
.SS Run launcher
.PP .PP
spmenu includes a powerful Bash script called spmenu_run. For more information on the theme.conf configuration file, see this
It lists executable programs in $PATH and displays them to the user in a page (https://spmenu.speedie.site/theme.conf+documentation).
list.
Not only that but it optionally shows recently run programs first in the
list.
.PP
The selected option is piped to /bin/sh (by default).
Unlike dmenu_run, spmenu_run has some cool features.
For example:
.IP \[bu] 2
Prepending \f[V]#\f[R] will spawn it in a terminal instead of just a
shell.
.IP \[bu] 2
Prepending \f[V]?\f[R] will run the command in a function, most of the
time used to display the man page.
.IP \[bu] 2
Prepending \f[V]magnet\f[R] will open a magnet link in $TORRENT
.IP \[bu] 2
Prepending \f[V]www\f[R] will open a page in $BROWSER
.PP
Most of the time you don\[cq]t need to prepend \f[V]www\f[R] though, for
example typing in \f[V]https://gnu.org\f[R] will open gnu.org in
$BROWSER even without the prefix.
Same goes for magnet links.
.PP
You can also configure the run launcher through editing
\f[V]\[ti]/.config/spmenu/run/config\f[R] which is configured in shell
syntax.
.PP
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.
.PP
It can be configured through editing
\f[V]\[ti]/.config/spmenu/run/config\f[R].
The configuration file can also be moved by setting
\f[V]${XDG_CONFIG_HOME}\f[R].
.SS spmenu commands .SS spmenu commands
.PP .PP
spmenu has a few special commands. spmenu has a few special commands.
@ -1536,14 +1527,12 @@ Print the spmenu version
Print the spmenu license Print the spmenu license
.SS License .SS License
.PP .PP
spmenu is licensed under the MIT license because that\[cq]s the original spmenu is licensed under the MIT license.
suckless license.
See the included LICENSE file for more information.
.SS Reporting issues .SS Reporting issues
.PP .PP
Please report issues on the Git Please report issues on the Git
repository (https://git.speedie.site/speedie/spmenu) or alternatively repository (https://git.speedie.site/speedie/spmenu) or the GitHub
email me. mirror (https://github.com/speediegq/spmenu).
.SS See also .SS See also
.IP \[bu] 2 .IP \[bu] 2
spmenu_run(1) spmenu_run(1)

View file

@ -50,7 +50,8 @@ Prepending \f[V]www\f[R] will open a page in $BROWSER
Most of the time you don\[cq]t need to prepend \f[V]www\f[R] though, for Most of the time you don\[cq]t need to prepend \f[V]www\f[R] though, for
example typing in \f[V]https://gnu.org\f[R] will open gnu.org in example typing in \f[V]https://gnu.org\f[R] will open gnu.org in
$BROWSER even without the prefix. $BROWSER even without the prefix.
Same goes for magnet links. If $BROWSER isn\[cq]t set then $BROWSER will be set to xdg-open.
Same goes for magnet links, although this has limited use.
.PP .PP
By default it also saves history, which can be viewed by calling By default it also saves history, which can be viewed by calling
\f[V]viewhistory\f[R] in your spmenu config. \f[V]viewhistory\f[R] in your spmenu config.