File: README.md

package info (click to toggle)
waybar 0.15.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,464 kB
  • sloc: cpp: 25,331; xml: 742; python: 146; ansic: 77; makefile: 29
file content (38 lines) | stat: -rw-r--r-- 838 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# C FFI module

A C FFI module is a dynamic library that exposes standard C functions and
constants, that Waybar can load and execute to create custom advanced widgets.

Most language can implement the required functions and constants (C, C++, Rust,
Go, Python, ...), meaning you can develop custom modules using your language of
choice, as long as there's GTK bindings.

Symbols to implement are documented in the
[waybar_cffi_module.h](waybar_cffi_module.h) file.

# Usage

## Building this module

```bash
meson setup build
meson compile -C build
```

## Load the module

Edit your waybar config:
```json
{
	// ...
	"modules-center": [
		// ...
		"cffi/c_example"
	],
	// ...
	"cffi/c_example": {
		// Path to the compiled dynamic library file
		"module_path": "resources/custom_modules/cffi_example/build/wb_cffi_example.so"
	}
}
```