2024-02-20 21:16:07 +01:00
|
|
|
---
|
|
|
|
weight: 1
|
|
|
|
title: Using plugins
|
|
|
|
---
|
2023-02-27 13:32:56 +01:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
This page will tell you how to use plugins.
|
2023-02-27 13:32:56 +01:00
|
|
|
|
2023-03-13 02:44:27 +01:00
|
|
|
## Disclaimers
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
{{< callout type=warning >}}
|
|
|
|
|
2023-03-13 02:44:27 +01:00
|
|
|
Plugins are written in C++ and will run as a part of Hyprland.
|
|
|
|
|
|
|
|
Make sure to _always_ read the source code of the plugins you are going to use
|
|
|
|
and to trust the source.
|
|
|
|
|
|
|
|
Writing a plugin to wipe your computer is easy.
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
_**Never**_ trust random `.so` files you receive from other people.
|
|
|
|
|
|
|
|
{{< /callout >}}
|
2023-03-13 02:44:27 +01:00
|
|
|
|
2023-02-27 13:32:56 +01:00
|
|
|
## Getting plugins
|
|
|
|
|
|
|
|
Plugins come as _shared objects_, aka. `.so` files.
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
Hyprland does not have any "default" plugins, so any plugin you may want to use
|
|
|
|
you will have to find yourself.
|
2023-02-27 13:32:56 +01:00
|
|
|
|
|
|
|
## Installing / Using plugins
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
It is _highly_ recommended you use the Hyprland Plugin Manager, `hyprpm`. For
|
|
|
|
manual instructions, see a bit below.
|
2023-02-27 13:32:56 +01:00
|
|
|
|
2023-12-07 11:41:25 +01:00
|
|
|
### hyprpm
|
2023-02-27 13:32:56 +01:00
|
|
|
|
2024-02-01 23:57:28 +01:00
|
|
|
Make sure you have the required dependencies: `cpio`, `meson`, `cmake`.
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
Find a repository you want to install plugins from. As an example, we will use
|
|
|
|
[hyprland-plugins](https://github.com/hyprwm/hyprland-plugins).
|
2023-02-27 13:32:56 +01:00
|
|
|
|
|
|
|
```sh
|
2023-12-07 11:41:25 +01:00
|
|
|
hyprpm add https://github.com/hyprwm/hyprland-plugins
|
2023-02-27 13:32:56 +01:00
|
|
|
```
|
|
|
|
|
2023-12-07 11:41:25 +01:00
|
|
|
once it finishes, you can list your installed plugins with
|
2024-02-20 21:16:07 +01:00
|
|
|
|
2023-03-13 02:44:27 +01:00
|
|
|
```sh
|
2023-12-07 11:41:25 +01:00
|
|
|
hyprpm list
|
2023-03-13 02:44:27 +01:00
|
|
|
```
|
2023-05-01 02:08:41 +02:00
|
|
|
|
2023-12-07 11:41:25 +01:00
|
|
|
and enable or disable them via `hyprpm enable name` and `hyprpm disable name`.
|
2023-02-27 13:32:56 +01:00
|
|
|
|
2023-12-07 11:41:25 +01:00
|
|
|
In order for the plugins to be loaded into hyprland, run `hyprpm reload`.
|
2023-06-10 00:05:39 +02:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
You can add `exec-once = hyprpm reload -n` to your hyprland config to have
|
|
|
|
plugins loaded at startup. `-n` will make hyprpm send a notification if anything
|
|
|
|
goes wrong (e.g. update needed)
|
2023-06-10 00:05:39 +02:00
|
|
|
|
2023-12-07 11:41:25 +01:00
|
|
|
In order update your plugins, run `hyprpm update`.
|
2023-06-10 00:05:39 +02:00
|
|
|
|
2023-12-07 11:41:25 +01:00
|
|
|
For all options of `hyprpm`, run `hyprpm -h`.
|
2023-03-13 02:44:27 +01:00
|
|
|
|
2023-12-07 11:41:25 +01:00
|
|
|
### Manual
|
2023-05-01 02:08:41 +02:00
|
|
|
|
2023-12-07 11:41:25 +01:00
|
|
|
Different plugins may have different build methods, refer to their instructions.
|
2023-03-13 02:44:27 +01:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
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).
|
2023-03-13 02:44:27 +01:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
To load plugins manually, use `hyprctl plugin load path` !NOTE: Path HAS TO BE
|
|
|
|
ABSOLUTE!
|
2023-02-27 13:32:56 +01:00
|
|
|
|
2023-12-07 11:41:25 +01:00
|
|
|
You can unload plugins with `hyprctl plugin unload path`.
|
2023-03-13 02:44:27 +01:00
|
|
|
|
2023-02-27 13:32:56 +01:00
|
|
|
## FAQ About Plugins
|
|
|
|
|
2023-12-07 11:44:10 +01:00
|
|
|
### My Hyprland crashes!
|
2024-02-20 21:16:07 +01:00
|
|
|
|
2023-12-07 11:44:10 +01:00
|
|
|
Oh no. Oopsie. Usually means a plugin is broken. `hyprpm disable` it.
|
|
|
|
|
2023-02-27 13:32:56 +01:00
|
|
|
### How do I list my loaded plugins?
|
2024-02-20 21:16:07 +01:00
|
|
|
|
2023-02-27 13:32:56 +01:00
|
|
|
`hyprctl plugin list`
|
|
|
|
|
|
|
|
### How do I make my own plugin?
|
2024-02-20 21:16:07 +01:00
|
|
|
|
2024-03-17 13:44:39 +01:00
|
|
|
See [here](../Development/Getting-Started).
|
2023-02-27 13:32:56 +01:00
|
|
|
|
|
|
|
### Where do I find plugins?
|
2024-03-11 17:44:01 +01:00
|
|
|
|
|
|
|
You can find our featured plugins at [hyprland.org/plugins](https://hyprland.org/plugins/).
|
2023-03-20 16:37:09 +01:00
|
|
|
You can also see a list at [awesome-hyprland](https://github.com/hyprland-community/awesome-hyprland#plugins). Note it may not be complete.
|
2024-03-11 17:44:01 +01:00
|
|
|
Lastly, you can try searching around github for the `"hyprland plugin"` keyword.
|
2023-02-27 13:32:56 +01:00
|
|
|
|
|
|
|
### Are plugins safe?
|
2024-02-20 21:16:07 +01:00
|
|
|
|
|
|
|
As long as you read the source code of your plugin(s) and can see there's
|
|
|
|
nothing bad going on, they will be safe.
|
2023-02-27 13:32:56 +01:00
|
|
|
|
|
|
|
### Do plugins decrease Hyprland's stability?
|
2024-02-20 21:16:07 +01:00
|
|
|
|
|
|
|
Hyprland employs a few tactics to unload plugins that crash. However, those
|
|
|
|
tactics may not always work. In general, as long as the plugin is well-designed,
|
|
|
|
it should not affect the stability of Hyprland.
|