aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorArun Mani J <j.arunmani@proton.me>2024-04-12 11:40:10 +0530
committerGuido Günther <agx@sigxcpu.org>2024-04-12 10:05:19 +0200
commitfcc9b451d847723d9deeac65195afed3bc610e00 (patch)
treebf224cc05a32e91d82ebc01fca2b4df502a66f64
parentcc3afeceaa6c39240b621d7e00ad45519315b861 (diff)
Custom plugins dev: Add info about building
-rw-r--r--content/posts/custom-plugins-dev/index.md39
1 files changed, 39 insertions, 0 deletions
diff --git a/content/posts/custom-plugins-dev/index.md b/content/posts/custom-plugins-dev/index.md
index c5ff2b9..ad6f9e4 100644
--- a/content/posts/custom-plugins-dev/index.md
+++ b/content/posts/custom-plugins-dev/index.md
@@ -2,6 +2,7 @@
authors = ["Arun Mani J"]
title = "Build Your Own Quick-Setting or Lock-Screen Widget"
date = "2024-04-10T08:39:22+02:00"
+lastmod = "2024-04-12T10:04:58+02:00"
tags = [ "development", "lock-screen", "phosh", "plugins", "quick-settings" ]
images = ["posts/custom-plugins-dev/custom-plugins.png"]
+++
@@ -144,6 +145,44 @@ on_clicked (PhoshHeartBeatMonitor *self)
```
## Testing
+### Adding the Plugin to Phosh's Build System
+
+To use the plugin in Phosh, you need to add it to the build system, so it can
+compile, build the resources and do other configurations such that it can be
+loaded by Phosh.
+
+Open
+[`plugins/meson.build`](https://gitlab.gnome.org/World/Phosh/phosh/-/blob/main/plugins/meson.build?ref_type=heads)
+and if you scroll below, you will see lines similar to the following.
+
+```meson
+lockscreen_plugins = [
+ 'calendar',
+ 'emergency-info',
+ 'launcher-box',
+ 'ticket-box',
+ 'upcoming-events',
+]
+
+quick_setting_plugins = [
+ 'caffeine-quick-setting',
+ 'simple-custom-quick-setting',
+]
+```
+
+Depending upon what your plugin does, add it to any of the two lists. In our
+example, this will be equivalent to the below snippet.
+
+```meson
+quick_setting_plugins = [
+ 'caffeine-quick-setting',
+ 'simple-custom-quick-setting',
+ 'heart-beat-monitor',
+]
+```
+
+Now, the plugin will be built whenever we build Phosh.
+
### Standalone Testing
In a standalone testing, you only load the set of extensions. It is useful for a