Using Plugins
This page will tell you how to use plugins.
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.
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.
Clone and compile plugin(s) of your choice.
Due to the fact that plugins share C++ objects, your plugins must be compiled with the same compiler as Hyprland, and on the same architecture.
In rare cases, they might even need to be compiled on the same machine.
Official releases are always compiled with
gcc
.
Place them somewhere on your system.
In hyprland, run in a terminal:
hyprctl plugin load /path/to/the/plugin.so
You can also add this to an exec-once
:
exec-once = hyprctl plugin load /my/epic/plugin.so
Official plugins can be found at hyprwm/hyprland-plugins.
Clone the repo and enter it:
git clone https://github.com/hyprwm/hyprland-plugins && cd hyprland-plugins
Inside the repo, clone Hyprland and enter it:
git clone --recursive https://github.com/hyprwm/Hyprland && cd Hyprland
If you are using a release version of Hyprland, checkout it: (in this example it’s v0.23.0beta
, adjust to your release ver)
git checkout tags/v0.23.0beta
If you are using hyprland-git, make sure the commit you use matches the cloned sources.
You can check the commit you are running with
hyprctl version
, and change the commit in the sources withgit reset --hard <hash>
. Make sure to remove thedirty
at the end of the hash fromhyprctl version
or else git will reject it.If you build Hyprland manually, you can skip cloning Hyprland and instead point the
HYPRLAND_HEADERS
envvar (as used later) to your Hyprland sources.
Prepare Hyprland sources:
make pluginenv
Now, enter your plugin of choice’s directory, for example:
cd ../borders-plus-plus
Compile it:
HYPRLAND_HEADERS="../Hyprland" make all
Congratulations! A file called plugin_name.so
should now be in your current directory.
Copy it wherever you please to keep it organized and load with hyprctl plugin load <path>
.
Oops. Make sure your plugin is compiled on the same machine as Hyprland. If that doesn’t help, ask the plugin’s maintainer to fix it.
hyprctl plugin list
Yes. hyprctl plugin unload /path/to/plugin.so
See here.
Try looking around here.
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.
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.