This also bumps default menu padding from previous `2` to `4`, and fixes some dimension calculations that weren't account for it. It also makes menu titles look more appropriately sized and text in them vertically centered.
`escape` now only closes the menu, and nothing else (before it would clear search if present first).
New shortcuts:
- `ctrl+backspace` - Delete search query by word.
- `shift+backspace` - Clear search query.
- Moved menu opening functions to `menus.lua`
- Renamed `make_` function prefixes to `create_` (I prefer `make_`, but `mp.*` APIs use `create_` so lets be consistent).
- Removed some dead code.
Detecting uosc via `get-version` reply sometimes took too long for "do something on init" sensitive tasks. This commit removes it and instead broadcasts `uosc-version <version>` message globally as a first thing during initialization phase.
`update` command spawns a subprocess using `mp.command_native_async()` that fetches an appropriate installer from uosc's main branch and runs it in powershell or bash.
This is pretty fragile and doesn't work everywhere, such as snap packages on Linux, or mpv on MacOS.
In snap on Linux, I think we are not allowed to use commands like `curl` or `unzip`, even if they're installed. I guess snap's sandboxing just hides them from us, even if we use a direct path to the binary on the system.
On MacOS, we get a weird `(23) Failed writing body` error... no idea.
The install directory can now be force with `MPV_CONFIG_DIR` environment variable.
Linux installer now detects common Flatpak and Snap packages and installs into their config locations.
All installers now backup current files and restore them when anything goes wrong.
Split cursor into its own `lib/` file and added persistent event handling via `:on()`, `:off()`, and `:once()` methods.
Cursor now also listens on secondary pointer events.
Color options have been removed:
```
foreground
foreground_text
background
background_text
```
and replaced with a single `color` option containing comma delimited color overrides with more colors to edit.
Example:
```config
color=foreground=ffccaa,curtain=225566
```
To force open a directory instead of navigating to it, you now need to use `alt+enter` or `alt+click` (previously `ctrl`).
`ctrl+enter` has been reassigned to search submit.