2023-02-27 13:38:23 +01:00
|
|
|
This page will tell you how to use plugins.
|
2023-02-27 13:32:56 +01:00
|
|
|
|
|
|
|
{{< toc >}}
|
|
|
|
|
2023-03-13 02:44:27 +01:00
|
|
|
## Disclaimers
|
|
|
|
|
|
|
|
{{< hint type=warning >}}
|
|
|
|
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.
|
|
|
|
|
|
|
|
***Never*** trust random `.so` files you receive from other people.
|
|
|
|
{{< /hint >}}
|
|
|
|
|
2023-02-27 13:32:56 +01:00
|
|
|
## Getting plugins
|
|
|
|
|
|
|
|
Plugins come as _shared objects_, aka. `.so` files.
|
|
|
|
|
|
|
|
Hyprland does not have any "default" plugins, so any plugin you may want
|
|
|
|
to use you will have to find yourself.
|
|
|
|
|
|
|
|
## Installing / Using plugins
|
|
|
|
|
2023-12-07 11:41:25 +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
|
|
|
|
2023-12-07 11:41:25 +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
|
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
|
|
|
|
2023-12-07 11:41:25 +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
|
|
|
|
2023-12-07 11:41:25 +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
|
|
|
|
2023-12-07 11:41:25 +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
|
|
|
|
|
|
|
|
### How do I list my loaded plugins?
|
|
|
|
`hyprctl plugin list`
|
|
|
|
|
|
|
|
### How do I make my own plugin?
|
2023-02-27 14:15:51 +01:00
|
|
|
See [here](../Development/Getting-Started).
|
2023-02-27 13:32:56 +01:00
|
|
|
|
|
|
|
### Where do I find plugins?
|
|
|
|
Try looking around [here](https://duckduckgo.com).
|
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.
|
2023-02-27 13:32:56 +01:00
|
|
|
|
|
|
|
### Are plugins safe?
|
|
|
|
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.
|
|
|
|
|
|
|
|
### Do plugins decrease Hyprland's stability?
|
|
|
|
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
|
2023-03-24 14:03:41 +01:00
|
|
|
stability of Hyprland.
|