major changes to the pages, should be much more user friendly now

This commit is contained in:
speedie 2023-06-06 22:00:51 +02:00
parent bd2bdd33ac
commit 65ad65786e
6 changed files with 374 additions and 389 deletions

96
pages/Compiling spmenu.md Normal file
View file

@ -0,0 +1,96 @@
Compiling spmenu
================
### Existing packages
Note that I offer spmenu packages for both Arch and Gentoo. The Gentoo packages
(ebuilds) can be had from [my overlay](https://git.speedie.site/speedie/speedie-overlay).
The Arch packages can be found [here](https://ls.speedie.site/index.php?b=releases%2Fspmenu),
and can be installed using `pacman -U /path/to/package`. Alternatively you can
add [my full Arch repository](https://git.speedie.site/speedie-aur) if you want.
If you're using any other distribution or operating system, you may have to
build it yourself if the distro repositories do not contain spmenu. This wiki page
is dedicated to installation instructions. Do note that these instructions are
always going to be accurate for the latest spmenu version from Git, and not
any release version. For exact instructions, you may want to see the included
`README.md` file bundled with your chosen spmenu version.
### Supported operating systems
This is not some arbitrary requirement. While it may run if it's not listed
here, I will not be providing support due to having a lack of experience with
said operating system. The main operating system that doesn't support
spmenu is Microsoft Windows. UNIX like operating systems are most likely to run
it. macOS is not officially supported as of 2.0, but it is possible to install
spmenu on macOS using `Xquartz`.
- GNU/Linux distributions
- Some distros (such as NixOS or GNU Guix) may require specific instructions,
if you're using those you know what you're doing.
- FreeBSD, OpenBSD, NetBSD
- There are likely more BSDs that can run spmenu, but I cannot support all
of them. Try it and see if it works. If it doesn't please try and fix it.
You know more about the BSDs than I do.
### Dependencies
spmenu has several dependencies, but most of them are optional.
- wayland-client
- For Wayland support, which is optional if X11 support is enabled.
- wayland-scanner
- For Wayland support, which is optional if X11 support is enabled.
- wayland-protocols
- For Wayland support, which is optional if X11 support is enabled.
- xkbcommon
- For Wayland support, which is optional if X11 support is enabled.
- libX11
- For X11 support, which is optional if Wayland support is enabled.
- libXrender
- For X11 support, which is optional if Wayland support is enabled.
- imlib2
- Used for image support, can be disabled during compile time.
- libXinerama
- Used for multi-monitor support if X11 is enabled,
can be disabled during compile time.
- OpenSSL
- Used to calculate MD5 of images if image support is enabled, can be
disabled during compile time.
- pango
- cairo
- libconfig
- Can be disabled if you don't want/need config file support during compile time.
- meson
- Used to compile spmenu, not optional unless you're experienced with build systems.
### Compiling spmenu
You can get spmenu [from git](https://git.speedie.site/speedie/spmenu) or from
a [release tarball](https://ls.speedie.site/index.php?b=releases%2Fspmenu).
Most users will prefer Git, due to the ease of getting updates, but it may
come at a stability cost. Git users get the latest features right away.
This is ultimately a choice you will have to make, and as a developer
I definitely prefer using Git over a tarball. It should be noted that
spmenu does not really require modifying the source code any unlike dmenu.
If you went with the tarball approach, you can download the signature
as well if you want to verify it hasn't been tampered with. You can skip
this though if you want. However you need to unpack it, and from the command-line
this can be done using `tar -xpvf /path/to/tarball`.
Now it's time to compile spmenu and install it. While the instructions in
the README try to teach you how to use the build system called meson, we're
going to just do the installation and not think much about it. If you want
to truly understand what you're doing, you may refer to the README documentation.
Run `meson setup build` to set up the build itself. Now you can run `cd build` to
change directory into the build directory. Now, finally run `meson install` to
install spmenu itself. Run this command as superuser/root. If you don't it will
attempt to use `sudo` for authentication. If you want to compile spmenu but not
install spmenu, you can simply run `ninja -C build` in the spmenu root directory.
That's it, now we're done. You can now use spmenu.
I recommend you follow [[Getting Started]] if you're new to spmenu.

View file

@ -1,218 +1,218 @@
Configurable keybindings
========================
spmenu has since version 1.0 supported configuring keybinds and mouse binds through a config file. The default config file *should* have the default keybinds already.
# List of valid modes
- -1
- Any mode
- 0
- Normal mode
- 1
- Insert mode
# List of valid clicks
- ClickWindow
- Clicking on the spmenu window
- ClickPrompt
- Clicking on the prompt
- ClickInput
- Clicking on the input
- ClickLArrow
- Clicking on the left arrow
- ClickRArrow
- Clicking on the right arrow
- ClickItem
- Clicking on the item area
- ClickSelItem
- Clicking on an item, function here doesn't matter, it will always be selected
- ClickNumber
- Clicking on the match count indicator
- ClickCaps
- Clicking on the caps lock indicator
- ClickMode
- Clicking on the mode indicator
# List of valid modifiers
- Ctrl
- Shift
- Super
- Alt
- AltGr
- ShiftGr
- None
spmenu has since version 1.0 supported configuring keybinds and mouse binds
through a config file. The default config file *should* have the default keybinds already.
### List of valid modes
**Can be used with keybinds**
- `-1`
- Any mode
- `0`
- Normal mode
- `1`
- Insert mode
### List of valid clicks
**Can be used with mouse binds**
- `ClickWindow`
- Clicking on the spmenu window
- `ClickPrompt`
- Clicking on the prompt
- `ClickInput`
- Clicking on the input
- `ClickLArrow`
- Clicking on the left arrow
- `ClickRArrow`
- Clicking on the right arrow
- `ClickItem`
- Clicking on the item area
- `ClickSelItem`
- Clicking on an item, function here doesn't matter, it will always be selected
- `ClickNumber`
- Clicking on the match count indicator
- `ClickCaps`
- Clicking on the caps lock indicator
- `ClickMode`
- Clicking on the mode indicator
### List of valid modifiers
**Can be used with keybinds**
- `Ctrl`
- `Shift`
- `Super`
- `Alt`
- `None`
These can also be combined by using '+' as a separator (ie. Ctrl+Shift)
# List of valid buttons
### List of valid buttons
**Can be used with mouse binds**
- Left Click
- Middle Click
- Right Click
- Scroll Up
- X11 only
- Scroll Down
- X11 only
# List of valid functions
### List of valid functions
**NOTE: This applies to both mouse and keybinds.**
**Can be used with keybinds and mouse binds**
- moveup
- movedown
- moveleft
- moveright
- moveend
- movestart
- movenext
- moveprev
- moveitem
- paste
- pastesel
- restoresel
- clear
- clearins
- viewhist
- moveword
- moveword
- deleteword
- movecursor
- movecursor
- navhistory
- navhistory
- backspace
- selectitem
- quit
- complete
- setimgsize
- setimgsize
- toggleimg
- togglefullimg
- defaultimg
- rotateimg
- flipimg
- setimgpos
- setimgpos
- setimggaps
- setimggaps
- setlines
- setlines
- setcolumns
- togglehighlight
- setprofile
- switchmode
- `moveup`
- `movedown`
- `moveleft`
- `moveright`
- `moveend`
- `movestart`
- `movenext`
- `moveprev`
- `moveitem`
- `paste`
- `restoresel`
- `clear`
- `clearins`
- `viewhist`
- `moveword`
- `deleteword`
- `movecursor`
- `navhistory`
- `backspace`
- `selectitem`
- `quit`
- `complete`
- `setimgsize`
- `toggleimg`
- `togglefullimg`
- `defaultimg`
- `rotateimg`
- `flipimg`
- `setimgpos`
- `setimggaps`
- `setlines`
- `setcolumns`
- `togglehighlight`
- `setprofile`
- `switchmode`
# List of valid arguments
**NOTE: This applies to both mouse and keybinds.**
**Can be used with both keybinds and mouse binds**
- 0
- 1 through 100
- +1 through +100
- -1 through -100
# List of valid modes
- -1
- Any mode
- 0
- Normal mode
- 1
- Insert mode
- `0`
- `1` through `100`
- `+1` through `+100`
- `-1` through `-100`
# List of valid keys
- None
- Space
- Enter
- Tab
- a
- b
- c
- d
- e
- f
- g
- h
- i
- j
- k
- l
- m
- n
- o
- p
- q
- r
- s
- t
- u
- v
- w
- x
- y
- z
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- !
- "
- #
- $
- %
- &
- '
- (
- )
- *
- +
- ,
- -
- .
- /
- :
- ;
- <
- =
- >
- ?
- @
- [
- \\
- ]
- _
- grave
- {
- bar
- }
- ~
- F1
- F2
- F3
- F4
- F5
- F6
- F7
- F8
- F9
- F10
- F11
- F12
- PageUp
- PageDown
- Home
- End
- Delete
- PrintScr
- Esc
- Pause
- ScrollLock
- Backspace
- Up
- Down
- Left
- Right
- Next
- Prior
**Can be used with keybinds**
- `None`
- `Space`
- `Enter`
- `Tab`
- `a`
- `b`
- `c`
- `d`
- `e`
- `f`
- `g`
- `h`
- `i`
- `j`
- `k`
- `l`
- `m`
- `n`
- `o`
- `p`
- `q`
- `r`
- `s`
- `t`
- `u`
- `v`
- `w`
- `x`
- `y`
- `z`
- `0`
- `1`
- `2`
- `3`
- `4`
- `5`
- `6`
- `7`
- `8`
- `9`
- `!`
- `"`
- `#`
- `$`
- `%`
- `&`
- `'`
- `(`
- `)`
- `*`
- `+`
- `,`
- `-`
- `.`
- `/`
- `:`
- `;`
- `<`
- `=`
- `>`
- `?`
- `@`
- `[`
- `\\`
- `]`
- `_`
- `grave`
- `{`
- `bar`
- `}`
- `~`
- `F1`
- `F2`
- `F3`
- `F4`
- `F5`
- `F6`
- `F7`
- `F8`
- `F9`
- `F10`
- `F11`
- `F12`
- `PageUp`
- `PageDown`
- `Home`
- `End`
- `Delete`
- `PrintScr`
- `Esc`
- `Pause`
- `ScrollLock`
- `Backspace`
- `Up`
- `Down`
- `Left`
- `Right`
- `Next`
- `Prior`

View file

@ -13,207 +13,81 @@ spmenu introduces many new features which can be useful in shell scripting.
It also serves as a dmenu replacement for Wayland users.
### Supported operating systems
### Installing spmenu
This is not some arbitrary requirement. While it may run if it's not listed
here, I will not be providing support due to having a lack of experience with
said operating system. The main operating system that doesn't support
spmenu is Microsoft Windows. UNIX like operating systems are most likely to run
it. macOS has some different steps.
For up-to-date compilation instructions for spmenu, see [[Compiling spmenu]] or
your bundled README.md.
- Nearly all GNU/Linux distributions
- NixOS and GNU Guix *may* require separate instructions, particularly
when building. I will not provide support for these as of now,
use the existing documentation to set it up.
Chances are if you use one of these you already know how to compile
software for it.
- FreeBSD, OpenBSD, NetBSD
- There are likely more BSDs that can run speedwm, but I cannot support all
of them. Try it and see if it works. If it doesn't please try and fix it.
You know more about the BSDs than I do.
- macOS/Mac OS X
- macOS *should* be supported, however it requires `Xquartz` to be installed
on the system. See [[Using spmenu on macOS]] for more information.
- As far as I know, there is no Wayland display server for macOS, so
Wayland support will need to be disabled.
### Using spmenu as a run launcher
### Installation on Gentoo GNU/Linux
There is a more detailed article covering this, called
[[Using spmenu as a run launcher]]. If you just want the basics though,
they're covered here.
**NOTE: The Gentoo overlay is as of now quite outdated and the spmenu-9999
ebuild is not functional. The latest stable (and functional) version available
is 0.3.2. Gentoo users are recommended to follow 'Installation on generic
GNU/Linux distributions'.**
spmenu comes with a script called `spmenu_run`. This is a much more powerful
run launcher than what dmenu provides. This script handles $PATH listing and
executing, .desktop entries (including Steam games), and even file management.
Gentoo has slightly different instructions for setting up spmenu. While you
can follow along with the generic installation instructions, I have a Gentoo
overlay with packages for most if not all spmenu versions.
For $PATH listing (the traditional dmenu_run behavior) you can simply run
`spmenu_run`. It should be noted that the default behavior can be overriden
and for this reason it is recommended (but not required) that you use
`spmenu_run -x` instead. This mode simply lists out all binaries in your
$PATH variable. Nothing super fancy. Do however note that you can
append entries here, and create functions to parse and do stuff
with your selected item/input in the configuration file
which can be found at `~/.config/spmenu/run/config`.
Doing so is covered in [[Functions in spmenu_run]].
To get started, add [my overlay](https://git.speedie.site/speedie/speedie-overlay).
Then simply `emerge x11-misc/spmenu`.
### Using spmenu as a .desktop entry launcher
If you want to install spmenu using Git, do this by adding the following
lines:
On the other hand, `spmenu_run` provides a .desktop launcher mode as well.
To use it, you simply run `spmenu_run -d`. The first time you run this
it will take a few seconds depending on the number of .desktop entries you
have on your computer. It will start up instantly after that though.
It will display your .desktop entries, along with the title and a
brief description of what the program does. Of course, you can also
append entries to this as well or hide certain entries in the
configuration file which can be found at `~/.config/spmenu/run/config`.
`=x11-misc/spmenu-9999 **`
On X11, the application icon will (optionally) be displayed
alongside the desktop entry. Wayland does not yet support displaying
images, though so the image will not be displayed.
to `/etc/portage/package.accept_keywords` and then emerging the packages as
per the instructions above.
While an option to clear the cache when a new program is installed is
available, it does not always work and is disabled for this reason.
To clear the cache manually, simply run `spmenu_run -cc`.
If you wish to clear the cache every time (this is quite slow), do
`spmenu_run -cc -d`.
### Installation on generic GNU/Linux distributions
### Using spmenu to parse text
Installing spmenu on most GNU/Linux distributions is very simple. First,
determine if you want to install it using Git (the absolute latest version) or
using a stable tarball.
The core concept of spmenu is to take standard input (or the contents
of a file), parse it and allow the user to select an item. All scripts
written for spmenu use this concept.
While using a tarball can sometimes be more stable, it's not going to have any
bug fixes or features I'm adding. With Git, issues can be fixed rather often.
For this reason, it is recommended that you `git clone` the repository. If you
do not have `git`, install it using your distribution's package manager. If
you're going to be using a 'stable' tarball, you do not need to install `git`.
This is covered in more detail in the article [[Using spmenu to parse text]].
While the list of dependencies will vary depending on the spmenu version
you're going to install (see README.md for your specific version),
below is a list for the latest release.
### Customizing spmenu_run
- wayland-client
- For Wayland support, which is optional.
- wayland-scanner
- For Wayland support, which is optional.
- wayland-protocols
- For Wayland support, which is optional.
- xkbcommon
- For Wayland support, which is optional.
- libX11
- For X11 support
- If you're using macOS, XQuartz is a dependency instead.
- If you're using Wayland, `xorg-xwayland` is a dependency.
- libXrender
- imlib2
- Used for image support, can be disabled during compile time.
- libXinerama
- Used for multi-monitor support, can be disabled during compile time.
- OpenSSL
- Used to calculate MD5 of images if image support is enabled, can be
disabled during compile time.
- Pango
- Cairo
- libconfig
- Can be disabled if you don't want/need config file support during compile time.
- meson
- Used to compile spmenu, not optional unless you're experienced with build systems.
To customize `spmenu_run`, you can edit the configuration file
which is `~/.config/spmenu/run/config`. For even more customization
you can also use functions. A dedicated page for functions exists,
called [[Functions in spmenu_run]].
#### Installation using `git`
### Customizing spmenu
This assumes you have `git` installed.
A basic configuration file can be found at `/usr/share/spmenu/spmenu.conf`.
You can use this configuration file by simply copying it to
`~/.config/spmenu/spmenu.conf`. If the directory does not already exist,
create it.
`cd` into a location where your normal user (not root) has permission to both
read and write. Do not clone the spmenu repository in `~/.config` as spmenu
will write configuration files to that location.
This configuration file can be edited using any text editor you want.
If you're the kind of person who likes to have many themes, you may want
to consider checking out [[User themes]] and the powerful `theme.conf`.
From here on, we're going to assume you are in the location `~/Documents`. Run
`git clone https://git.speedie.site/speedie/spmenu spmenu` to clone the
repository into a directory named `spmenu`. Provided the repository hasn't
moved and you have a working internet connection, you should have received a
copy of the spmenu source code.
### That's it
You can now `cd spmenu` into it so we can actually install it. If you need to
make changes to the source code for whatever reason, now you want to do that.
Now, it's time to compile it! Provided you have all dependencies installed,
this should be very, very easy and quick.
Configure the build by running these commands:
`mkdir -p build/ # Create a build/ directory, Meson will use this as the working
directory`
`meson setup build # This will check to make sure all dependencies are found.
If you're recompiling you may want to pass --reconfigure as an argument`
This is where you can enable/disable certain features, as well as set
compiler options.
Now, to build it run `ninja -C build`. If all went well you should have a
binary in the `build/` directory.
Finally, to install it all, run:
`meson install -C build --prefix /usr # /usr may be overriden to /usr/local
or anything else if you use macOS or simply want another destination directory`
To generate documentation, which may be necessary if you're pushing new changes
to your Git repository, run `scripts/make/generate-docs.sh` **in the current
directory**.
To generate a tarball, run `scripts/make/generate-pkg.sh` **in the current
directory**. If you want to generate a Pacman package, run
`scripts/make/generate-pacman-pkg.sh` instead. You can run `pacman -U` on this
if you wish later on.
Now follow along with 'Using spmenu'.
#### Installation using a tarball
Installation using a tarball works pretty much the same. Visit [the releases
page](https://ls.speedie.site/index.php?b=releases%2Fspmenu) and get the latest
(or an old if you want) tarball.
`cd` into a location where your normal user (not root) has permission to both
read and write.
Now we need to unpack the tarball and get our source code. To do this, you can
use the `tar` command. I will spare you the time reading the man page and the
command to unpack the tarball is `tar -xpvf
/path/to/the/spmenu/tarball.tar.gz`. The `-x` argument here means extract.
`-p` means preserve permissions. The `-v` means verbose, we want to see
what's going on. `-f` means file, we want to specify a file to unpack.
After unpacking it, there should be one directory; `spmenu-<version>`. Let's
`cd spmenu-<version>` into it. Now it's time to compile spmenu!
Now, it's time to compile it! Provided you have all dependencies installed,
this should be very, very easy and quick.
Configure the build by running these commands:
`mkdir -p build/ # Create a build/ directory, Meson will use this as the working
directory`
`meson setup build # This will check to make sure all dependencies are found.
If you're recompiling you may want to pass --reconfigure as an argument`
This is where you can enable/disable certain features, as well as set
compiler options.
Now, to build it run `ninja -C build`. If all went well you should have a
binary in the `build/` directory.
Finally, to install it all, run:
`meson install -C build --prefix /usr # /usr may be overriden to /usr/local
or anything else if you use macOS or simply want another destination directory`
To generate documentation, which may be necessary if you're pushing new changes
to your Git repository, run `scripts/make/generate-docs.sh` **in the current
directory**.
To generate a tarball, run `scripts/make/generate-pkg.sh` **in the current
directory**. If you want to generate a Pacman package, run
`scripts/make/generate-pacman-pkg.sh` instead. You can run `pacman -U` on this
if you wish later on.
Now follow along with 'Using spmenu'.
### Using spmenu
spmenu accepts standard input. All of spmenu's features **require** standard input to be passed. If you only want to return the input text, you can simply pass nothing to spmenu and a blank menu will open up. The `spmenu_run` script bundled with spmenu which works as a run launcher uses this fact to list out all available executables which are then run. See the article [[Using spmenu as a run launcher]] for more information, this article **only** focuses on spmenu itself.
For example, `printf "Apple\nBanana\nOrange\n" | spmenu` will bring up a basic menu listing with three options, Apple, Banana and Orange. The one the user selects will be returned when (by default) Enter is pressed. You can also press Shift+Enter to select what you have typed in rather than the selected match.
spmenu also has a lot of arguments you can give. `spmenu --help` or if you prefer, `spmenu -h` will return a full list of available arguments. This is not the *only* way to configure spmenu, however it's useful when you want a setting to be applied only to the current instance. Most options are configurable through arguments, but not all of them are.
spmenu also has a config file through libconfig. A default config should be installed at `/usr/share/spmenu/spmenu.conf`. You can copy this to `~/.config/spmenu/spmenu.conf`. You may edit this file using your favorite text editor. Note that .Xresources takes priority over spmenu.conf configuration, as long as `xresources = 1`. You can find a list of accepted .Xresources values in `/usr/share/spmenu/example.Xresources`, and this file should more or less be identical to the defaults. For more information regarding the configuration file, see [[Configuring spmenu]].
Great, you should now know how spmenu works on a basic level. Now, if you are a tiling window manager user or just want a better run launcher, you can check out the article 'Using spmenu as a run launcher'. Alternatively, if you want to use this for scripting you can check out [[Scripting with spmenu]]. There are also many scripts that use spmenu to display items, see [[User scripts]] for that.
If you want to theme spmenu, you can see [[User themes]]. If you want some scripts to go along with spmenu, see [[User scripts]].
That's it. That's all you need to know to get started with spmenu.. and
a little more for good measure. From here, you can take a break, or check
out [[User scripts]], [[User themes]], [[Functions in spmenu_run]],
[[Using spmenu to parse text]], or [[Configuring spmenu]] if you're hungry for more.

View file

@ -1,7 +1,8 @@
Theme managers
==============
**NOTE: This article only applies to spmenu 1.1 and later. Users of spmenu 1.0 and earlier should first upgrade, or alternatively use the regular profiles.**
**NOTE: This article only applies to spmenu 1.1 and later. Users of spmenu 1.0
and earlier should first upgrade, or alternatively use the regular profiles.**
This article is intended to be a list of theme managers that can be installed and used. spmenu does not decide what theme manager is used, spmenu simply runs `spmenu_profile --spmenu-set-profile` when the keybind for setting a profile is activated. This means you must parse this in a separate program. See [spmenuify](https://git.speedie.site/speedie/spmenuify) for an example on how to do this.

View file

@ -3,6 +3,8 @@ User themes
![image](/pages/images/spmenu-themes.gif)
**For Pywal notes, see [[Using Pywal with spmenu]].**
spmenu has since version 1.1 supported user themes. Themes override the overall design of spmenu, through for example defining colors. Version 0.3 through 1.0 supported profiles. Profiles are no longer supported in spmenu, but you can still find the old profiles [here](https://git.speedie.site/speedie/spmenu-themes).
This wiki article is meant to be a list of themes for spmenu. Users may edit this article to add their own profiles with credit given of course, and users may download others' profiles to use with spmenu.
@ -11,13 +13,6 @@ You may also want to see [[Theme managers]] for a list of theme managers that ca
Tip: Use `Ctrl+f` to search through the page.
### Rules for editors
- Must be licensed under a free (as in freedom) license.
- No duplicates, we don't need multiple versions of Nord for example.
- Please try to use stable hosting if possible for links. If this is not possible, consider [emailing me](mailto:speedie@speedie.site) so I can host it on my site.
- Outdated profiles may be removed if necessary. Please try to maintain it, if you don't have time to do so a disclaimer would be nice.
### Themes
- [Default](https://git.speedie.site/speedie/spmenu-themes/raw/branch/master/spmenu.conf)

View file

@ -0,0 +1,19 @@
Using spmenu to parse text
==========================
spmenu itself accepts standard input and this is a fact all scripts/programs
written for spmenu depend on. It's a core feature of spmenu. Nearly all of
spmenu's features require standard input to be passed. If you only want to
return the input text, you can simply pass nothing to spmenu and a blank
menu will open up.
For example, `printf "Apple\nBanana\nOrange\n" | spmenu` will bring up a basic
menu listing with three options, Apple, Banana and Orange. The one the user
selects will be returned when (by default) Enter is pressed. You can also press
Shift+Enter to select what you have typed in rather than the selected match.
spmenu also has a lot of arguments you can give. `spmenu --help` or if you
prefer, `spmenu -h` will return a full list of available arguments. This is not
the *only* way to configure spmenu, however it's useful when you want a setting
to be applied only to the current instance. Most options are configurable
through arguments, but not all of them are.