mirror of
https://github.com/hyprwm/hyprland-wiki.git
synced 2024-11-15 01:35:58 +01:00
Plugins: reword/revamp
This commit is contained in:
parent
524ccb4d9d
commit
a0278ab718
6 changed files with 31 additions and 11 deletions
|
@ -132,7 +132,7 @@ Please remember that the pointer to your config value will never change after
|
|||
`PLUGIN_INIT`, so to greatly optimize performance, make it static:
|
||||
|
||||
```cpp
|
||||
static auto* const MYVAR = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:myPlugin:variable1")->intValue;
|
||||
static auto* const MYVAR = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:myPlugin:variable1")->intValue;
|
||||
```
|
||||
|
||||
## Further
|
||||
|
|
|
@ -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 >}}
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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?
|
||||
|
||||
|
|
|
@ -2,3 +2,8 @@
|
|||
weight: 6
|
||||
title: Plugins
|
||||
---
|
||||
|
||||
Plugins allow users to add extra functionality to Hyprland.
|
||||
|
||||
- [Using plugins](./Using-Plugins)
|
||||
- [Plugin development](./Development)
|
||||
|
|
Loading…
Reference in a new issue