https://github.com/wayfirewm/wayfire-sample-plugin
This repo aims to be a demonstration of some of the common Wayfire APIs for plugins and how they are to be used.
https://github.com/wayfirewm/wayfire-sample-plugin
Last synced: 12 months ago
JSON representation
This repo aims to be a demonstration of some of the common Wayfire APIs for plugins and how they are to be used.
- Host: GitHub
- URL: https://github.com/wayfirewm/wayfire-sample-plugin
- Owner: WayfireWM
- License: mit
- Created: 2023-12-20T16:02:53.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-19T14:59:37.000Z (over 2 years ago)
- Last Synced: 2025-05-13T18:48:34.876Z (about 1 year ago)
- Language: C++
- Size: 11.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**THIS IS STILL WIP!!!**
# wayfire-plugin-template
This repository contains a basic skeleton of a Wayfire plugin, together with a few examples of common operations
and features plugins typically use. The aim is to provide a good starting point when writing a custom plugin.
Generally, a plugin will consist of at least the following:
- `meson.build`: the plugin's build system.
- `metadata/.xml`: contains descriptions of all options of your plugin.
- `src/.cpp`: contains the code of your plugin
Take a look at the various files in this repository, they have been commented rather thoroughly to guide you through the API.
# Building
```
meson build
ninja -C build
sudo ninja -C build install
```
Keep in mind that if you have installed Wayfire to a non-standard location (for example `/opt/wayfire`) you will need
to adjust `PKG_CONFIG_PATH` so that meson can find the Wayfire installation
(`PKG_CONFIG_PATH=/opt/wayfire/lib64/pkgconfig` before `meson build`, adjust for your distro and installation prefix).
# Installing a plugin
The build system is set up by default so that plugins are installed at the same location
where Wayfire's main plugins are installed.
If you want to change that, you can edit `src/meson.build` and override where the plugin is installed.
Alternatively, you can compile your plugin and not install it at all: simply use the full plugin path
in your config file, and set `WAYFIRE_PLUGIN_XML_PATH` (before starting Wayfire) to contain the directory
where your plugin's XML file is located.