update docs

This commit is contained in:
speedie 2023-04-28 18:24:27 +02:00
parent cfef4e073e
commit e9edd9bee0
7 changed files with 39 additions and 55 deletions

Binary file not shown.

BIN
code.pdf

Binary file not shown.

View file

@ -656,8 +656,8 @@ else on startup, as if this feature did not exist.
Not only can profiles be used to configure color schemes and fonts, allowing you Not only can profiles be used to configure color schemes and fonts, allowing you
to swap color schemes quickly, but also any other options you may want. to swap color schemes quickly, but also any other options you may want.
Note that any profiles are applied ON TOP of the current loaded profile, meaning if Note that any profiles are applied ON TOP of the current loaded profile,
any options are missing from the selected profile, the setting in meaning if any options are missing from the selected profile, the setting in
the profile used before will be used in place. the profile used before will be used in place.
There are a few color schemes for spmenu included in the repository, see There are a few color schemes for spmenu included in the repository, see
@ -665,14 +665,9 @@ the `themes/` directory. Feel free to copy those to your profile directory.
## Run launcher ## Run launcher
spmenu includes a shell script called spmenu_run. It lists executable programs spmenu includes a powerful Bash script called spmenu_run. It lists
in $PATH and displays them to the user in a list. Not only that but it shows executable programs in $PATH and displays them to the user in a list.
recently run programs first in the list. Not only that but it optionally shows recently run programs first in the list.
spmenu_run will interpret any arguments as spmenu arguments and pass them to
spmenu. Therefore `spmenu_run --prompt 'Run:'` will set the prompt to `Run:`.
While it is similar to dmenu_run (and achieves the same goal), this
version has some extra features.
The selected option is piped to /bin/sh (by default). Unlike dmenu_run, The selected option is piped to /bin/sh (by default). Unlike dmenu_run,
spmenu_run has some cool features. For example: spmenu_run has some cool features. For example:
@ -690,15 +685,11 @@ without the prefix. Same goes for magnet links.
You can also configure the run launcher through editing You can also configure the run launcher through editing
`~/.config/spmenu/run/config` which is configured in shell syntax. `~/.config/spmenu/run/config` which is configured in shell syntax.
## spmenu_desktop 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.
In addition to the aforementioned `spmenu_run`, the spmenu package also provides It can be configured through editing `~/.config/spmenu/run/config`. The
`spmenu_desktop` which instead of reading $PATH only lists out .desktop entries.
Unlike the regular run launcher though, spmenu_desktop supports displaying an
icon for entries that use one.
It can be configured through editing `~/.config/spmenu/desktop/config`. The
configuration file can also be moved by setting `${XDG_CONFIG_HOME}`. configuration file can also be moved by setting `${XDG_CONFIG_HOME}`.
## spmenu commands ## spmenu commands
@ -725,5 +716,5 @@ license. See the included LICENSE file for more information.
## Reporting issues ## Reporting issues
Please report issues on the Please report issues on the
[Codeberg repository](https://codeberg.org/speedie/speediegq) or alternatively [Codeberg repository](https://codeberg.org/speedie/spmenu) or alternatively
email me. email me.

View file

@ -187,6 +187,8 @@ cat << EOF > "$CONFDIR/spmenu/run/config"
# 'fm_post_func' after spawning spmenu, selected item passed as an argument. # 'fm_post_func' after spawning spmenu, selected item passed as an argument.
# 'fm_pre_list_func' right before listing out files. # 'fm_pre_list_func' right before listing out files.
# 'fm_post_list_func' right after listing out files. # 'fm_post_list_func' right after listing out files.
# 'fm_dir_func' before changing directory to the selected directory.
# 'fm_line_func' for each line in ls output, the line is passed as an argument, including SGR colors.
# 'read_man' when reading a man page, selected item passed as an argument. # 'read_man' when reading a man page, selected item passed as an argument.
# #
# You may create those functions below. # You may create those functions below.
@ -408,8 +410,14 @@ prepare_dirnav() {
# TODO: read line by line so we can append/prepend whatever we want # TODO: read line by line so we can append/prepend whatever we want
listing() { listing() {
command -v fm_pre_list_func > /dev/null && fm_pre_list_func command -v fm_pre_list_func > /dev/null && fm_pre_list_func
ls "${ls_args[@]}" # this allows us SGR colors ls "${ls_args[@]}" > /tmp/spmenu_ls_list # this allows us SGR colors
printf "..\n" printf "..\n" >> /tmp/spmenu_ls_list
while read -r l; do
command -v fm_line_func > /dev/null && fm_line_func "$l"
printf "%s\n" "$l"
done < "/tmp/spmenu_ls_list"; rm -f /tmp/spmenu_ls_list
command -v fm_post_list_func > /dev/null && fm_post_list_func command -v fm_post_list_func > /dev/null && fm_post_list_func
} }
@ -421,6 +429,7 @@ prepare_dirnav() {
*) *)
if [ -d "$dir" ]; then if [ -d "$dir" ]; then
dir="$(pwd)/$dir" dir="$(pwd)/$dir"
command -v fm_dir_func > /dev/null && fm_dir_func "$dir"
prepare_dirnav prepare_dirnav
elif [ -f "$dir" ]; then elif [ -f "$dir" ]; then
exec_file "$dir" && return 0 exec_file "$dir" && return 0

View file

@ -714,17 +714,11 @@ the \f[V]themes/\f[R] directory.
Feel free to copy those to your profile directory. Feel free to copy those to your profile directory.
.SS Run launcher .SS Run launcher
.PP .PP
spmenu includes a shell script called spmenu_run. spmenu includes a powerful Bash script called spmenu_run.
It lists executable programs in $PATH and displays them to the user in a It lists executable programs in $PATH and displays them to the user in a
list. list.
Not only that but it shows recently run programs first in the list. Not only that but it optionally shows recently run programs first in the
.PP list.
spmenu_run will interpret any arguments as spmenu arguments and pass
them to spmenu.
Therefore \f[V]spmenu_run --prompt \[aq]Run:\[aq]\f[R] will set the
prompt to \f[V]Run:\f[R].
While it is similar to dmenu_run (and achieves the same goal), this
version has some extra features.
.PP .PP
The selected option is piped to /bin/sh (by default). The selected option is piped to /bin/sh (by default).
Unlike dmenu_run, spmenu_run has some cool features. Unlike dmenu_run, spmenu_run has some cool features.
@ -748,17 +742,13 @@ Same goes for magnet links.
You can also configure the run launcher through editing You can also configure the run launcher through editing
\f[V]\[ti]/.config/spmenu/run/config\f[R] which is configured in shell \f[V]\[ti]/.config/spmenu/run/config\f[R] which is configured in shell
syntax. syntax.
.SS spmenu_desktop
.PP .PP
In addition to the aforementioned \f[V]spmenu_run\f[R], the spmenu In addition to the $PATH listing, spmenu_run also allows listing out and
package also provides \f[V]spmenu_desktop\f[R] which instead of reading displaying .desktop entries.
$PATH only lists out .desktop entries. It does this in style, too by displaying the program icon.
.PP
Unlike the regular run launcher though, spmenu_desktop supports
displaying an icon for entries that use one.
.PP .PP
It can be configured through editing It can be configured through editing
\f[V]\[ti]/.config/spmenu/desktop/config\f[R]. \f[V]\[ti]/.config/spmenu/run/config\f[R].
The configuration file can also be moved by setting The configuration file can also be moved by setting
\f[V]${XDG_CONFIG_HOME}\f[R]. \f[V]${XDG_CONFIG_HOME}\f[R].
.SS spmenu commands .SS spmenu commands
@ -787,5 +777,5 @@ See the included LICENSE file for more information.
.SS Reporting issues .SS Reporting issues
.PP .PP
Please report issues on the Codeberg Please report issues on the Codeberg
repository (https://codeberg.org/speedie/speediegq) or alternatively repository (https://codeberg.org/speedie/spmenu) or alternatively email
email me. me.

View file

@ -961,13 +961,10 @@ the setting in the profile used before will be used in place.</p>
see the <code>themes/</code> directory. Feel free to copy those to your see the <code>themes/</code> directory. Feel free to copy those to your
profile directory.</p> profile directory.</p>
<h2 id="run-launcher">Run launcher</h2> <h2 id="run-launcher">Run launcher</h2>
<p>spmenu includes a shell script called spmenu_run. It lists executable <p>spmenu includes a powerful Bash script called spmenu_run. It lists
programs in $PATH and displays them to the user in a list. Not only that executable programs in $PATH and displays them to the user in a list.
but it shows recently run programs first in the list.</p> Not only that but it optionally shows recently run programs first in the
<p>spmenu_run will interpret any arguments as spmenu arguments and pass list.</p>
them to spmenu. Therefore <code>spmenu_run --prompt 'Run:'</code> will
set the prompt to <code>Run:</code>. While it is similar to dmenu_run
(and achieves the same goal), this version has some extra features.</p>
<p>The selected option is piped to /bin/sh (by default). Unlike <p>The selected option is piped to /bin/sh (by default). Unlike
dmenu_run, spmenu_run has some cool features. For example:</p> dmenu_run, spmenu_run has some cool features. For example:</p>
<ul> <ul>
@ -985,14 +982,11 @@ $BROWSER even without the prefix. Same goes for magnet links.</p>
<p>You can also configure the run launcher through editing <p>You can also configure the run launcher through editing
<code>~/.config/spmenu/run/config</code> which is configured in shell <code>~/.config/spmenu/run/config</code> which is configured in shell
syntax.</p> syntax.</p>
<h2 id="spmenu_desktop">spmenu_desktop</h2> <p>In addition to the $PATH listing, spmenu_run also allows listing out
<p>In addition to the aforementioned <code>spmenu_run</code>, the spmenu and displaying .desktop entries. It does this in style, too by
package also provides <code>spmenu_desktop</code> which instead of displaying the program icon.</p>
reading $PATH only lists out .desktop entries.</p>
<p>Unlike the regular run launcher though, spmenu_desktop supports
displaying an icon for entries that use one.</p>
<p>It can be configured through editing <p>It can be configured through editing
<code>~/.config/spmenu/desktop/config</code>. The configuration file can <code>~/.config/spmenu/run/config</code>. The configuration file can
also be moved by setting <code>${XDG_CONFIG_HOME}</code>.</p> also be moved by setting <code>${XDG_CONFIG_HOME}</code>.</p>
<h2 id="spmenu-commands">spmenu commands</h2> <h2 id="spmenu-commands">spmenu commands</h2>
<p>spmenu has a few special commands. These work similar to the images. <p>spmenu has a few special commands. These work similar to the images.
@ -1021,7 +1015,7 @@ suckless license. See the included LICENSE file for more
information.</p> information.</p>
<h2 id="reporting-issues">Reporting issues</h2> <h2 id="reporting-issues">Reporting issues</h2>
<p>Please report issues on the <a <p>Please report issues on the <a
href="https://codeberg.org/speedie/speediegq">Codeberg repository</a> or href="https://codeberg.org/speedie/spmenu">Codeberg repository</a> or
alternatively email me.</p> alternatively email me.</p>
</body> </body>
</html> </html>

Binary file not shown.