hyprland-wiki/content/Plugins/Using-Plugins.md

121 lines
3.5 KiB
Markdown
Raw Permalink Normal View History

---
weight: 1
title: Using plugins
---
2023-02-27 12:32:56 +00:00
This page will tell you how to use plugins.
2023-02-27 12:32:56 +00:00
2023-03-13 01:44:27 +00:00
## Disclaimers
2025-10-29 20:52:11 +01:00
> [!WARNING]
> Plugins are written in C++ and will run as a part of Hyprland.
2025-10-29 20:52:11 +01:00
> Make sure to _always_ read the source code of the plugins you are going to use
> and to trust the source.
2025-10-29 20:52:11 +01:00
> Writing a plugin to wipe your computer is easy.
>
> _**Never**_ trust random `.so` files you receive from other people.
2023-03-13 01:44:27 +00:00
2023-02-27 12:32:56 +00: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.
2023-02-27 12:32:56 +00:00
## Installing / Using plugins
It is _highly_ recommended you use the Hyprland Plugin Manager, `hyprpm`. For
2024-07-31 01:16:20 +03:00
manual instructions, see [here](#manual).
2023-02-27 12:32:56 +00:00
### hyprpm
2023-02-27 12:32:56 +00:00
2025-10-29 20:52:11 +01:00
> [!NOTE]
> If you are using [permission management](../../Configuring/Permissions),
> you should allow hyprpm to load plugins by adding this to your config:
>
> ```ini
> permission = /usr/(bin|local/bin)/hyprpm, plugin, allow
> ```
>
> otherwise you'll get a popup asking for permission every time hyprpm tries to load a plugin.
2025-04-29 18:04:44 +01:00
Make sure you have the required dependencies: `cpio`, `cmake`, `git`, `meson` and `gcc`.
You might also need `-dev` packages of Hyprland's dependencies if your distro splits
binaries and headers (e.g. Fedora or Debian).
2024-02-01 22:57:28 +00: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 12:32:56 +00:00
```sh
hyprpm add https://github.com/hyprwm/hyprland-plugins
2023-02-27 12:32:56 +00:00
```
Once it finishes, you can list your installed plugins with:
2023-03-13 01:44:27 +00:00
```sh
hyprpm list
2023-03-13 01:44:27 +00:00
```
Then, enable or disable them via `hyprpm enable name` and `hyprpm disable name`.
2023-02-27 12:32:56 +00:00
In order for the plugins to be loaded into Hyprland, run `hyprpm reload`.
2023-06-10 00:05:39 +02:00
You can add `exec-once = hyprpm reload` to your Hyprland config to have
plugins loaded at startup. Optionally add `-n` flag to get notification
that plugin loaded successfully (eye candy). Note regardless of whether
`-n` is present or not, `reload` command will generate notification for
warning and error events.
2023-06-10 00:05:39 +02:00
To update your plugins, run `hyprpm update`.
2023-06-10 00:05:39 +02:00
For all options of `hyprpm`, run `hyprpm -h`.
2023-03-13 01:44:27 +00:00
### Manual
Different plugins may have different build methods, refer to their instructions.
2023-03-13 01:44:27 +00: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 01:44:27 +00:00
2024-07-31 01:16:20 +03:00
To load plugins manually, use `hyprctl plugin load path`.
2023-02-27 12:32:56 +00:00
You can unload plugins with `hyprctl plugin unload path`.
2023-03-13 01:44:27 +00:00
2025-10-29 20:52:11 +01:00
> [!WARNING]
> Path has to be absolute!
2024-07-31 01:16:20 +03:00
2023-02-27 12:32:56 +00:00
## FAQ About Plugins
2023-12-07 10:44:10 +00:00
### My Hyprland crashes!
2023-12-07 10:44:10 +00:00
Oh no. Oopsie. Usually means a plugin is broken. `hyprpm disable` it.
2023-02-27 12:32:56 +00:00
### How do I list my loaded plugins?
2023-02-27 12:32:56 +00:00
`hyprctl plugin list`
### How do I make my own plugin?
2024-03-17 14:44:39 +02:00
See [here](../Development/Getting-Started).
2023-02-27 12:32:56 +00:00
### Where do I find plugins?
2024-03-11 16:44:01 +00:00
2024-07-31 01:16:20 +03:00
You can find our featured plugins at
[hypr.land/plugins](https://hypr.land/plugins/). You can also see a list
2024-07-31 01:16:20 +03:00
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.
2023-02-27 12:32:56 +00: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.
2023-02-27 12:32:56 +00:00
### 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 stability of Hyprland.