Plugins: reword/revamp

This commit is contained in:
Mihai Fufezan 2024-07-31 01:16:20 +03:00
parent c093d71c2d
commit e76985b1ef
6 changed files with 31 additions and 11 deletions

View file

@ -9,7 +9,7 @@ These are all the events that can be listened to using Event Hooks.
{{< callout type=info >}}
M: means std::unordered_map<std::string, std::any> following props are members.
`M:` means `std::unordered_map<std::string, std::any>` following props are members.
{{</ callout >}}

View file

@ -71,8 +71,7 @@ APICALL EXPORT std::string PLUGIN_API_VERSION() {
```
This method will tell Hyprland what API version was used to compile this plugin.
Do NOT change it. It will be set automatically when compiling to the correct
value.
Do NOT change it. It will be set to the correct value when compiling.
Skipping over some example handlers, we have two important functions:

View file

@ -2,3 +2,11 @@
weight: 2
title: Development
---
This section describes the process of developing plugins for Hyprland. It is
indented to be read by developers, not end users.
- [Getting started](./Getting-Started)
- [Plugin guidelines](./Plugin-Guidelines)
- [Event list](./Event-list)
- [Advanced](./Advanced)

View file

@ -30,11 +30,11 @@ you will have to find yourself.
## Installing / Using plugins
It is _highly_ recommended you use the Hyprland Plugin Manager, `hyprpm`. For
manual instructions, see a bit below.
manual instructions, see [here](#manual).
### hyprpm
Make sure you have the required dependencies: `cpio`, `meson`, `cmake`.
Make sure you have the required dependencies: `cpio`, `cmake`.
Find a repository you want to install plugins from. As an example, we will use
[hyprland-plugins](https://github.com/hyprwm/hyprland-plugins).
@ -69,11 +69,16 @@ If you don't have Hyprland headers installed, clone Hyprland, checkout to your
version, build Hyprland, and run `sudo make installheaders`. Then build your
plugin(s).
To load plugins manually, use `hyprctl plugin load path` !NOTE: Path HAS TO BE
ABSOLUTE!
To load plugins manually, use `hyprctl plugin load path`.
You can unload plugins with `hyprctl plugin unload path`.
{{< callout >}}
Path has to be absolute!
{{< /callout >}}
## FAQ About Plugins
### My Hyprland crashes!
@ -90,9 +95,12 @@ See [here](../Development/Getting-Started).
### Where do I find plugins?
You can find our featured plugins at [hyprland.org/plugins](https://hyprland.org/plugins/).
You can also see a list at [awesome-hyprland](https://github.com/hyprland-community/awesome-hyprland#plugins). Note that it may not be complete.
Lastly, you can try searching around github for the `"hyprland plugin"` keyword.
You can find our featured plugins at
[hyprland.org/plugins](https://hyprland.org/plugins/). You can also see a list
at
[awesome-hyprland](https://github.com/hyprland-community/awesome-hyprland#plugins).
Note that it may not be complete. Lastly, you can try searching around github
for the `"hyprland plugin"` keyword.
### Are plugins safe?

View file

@ -2,3 +2,8 @@
weight: 6
title: Plugins
---
Plugins allow users to add extra functionality to Hyprland.
- [Using plugins](./Using-Plugins)
- [Plugin development](./Development)