Commit graph

37 commits

Author SHA1 Message Date
Daniel Eklöf
881359183f
meson: make ‘backlight’ plugin compile time optional 2022-12-13 16:47:48 +01:00
Daniel Eklöf
4c1398f1a5
meson: make ‘alsa’ plugin compile time optional 2022-12-13 16:41:50 +01:00
Ogromny
f5cfc103d0
modules/dwl: new module 2022-12-13 15:56:16 +01:00
Ogromny
19a9f099e2 modules/pipewire: new module 2022-12-13 10:16:58 +01:00
Willem van de Krol
dcf21f0b06 modules: add pulse
The pulse module shows information about PulseAudio sinks and sources.
2022-12-12 18:51:28 +01:00
Leonardo Gibrowski Faé
a0c07d7836
modules: creates disk-io-module
This creates the disk-io-module, which displays io information read from
`/proc/diskstats`. Details on `diskstats` can be found on:
https://www.kernel.org/doc/Documentation/ABI/testing/procfs-diskstats
2022-06-17 12:04:13 -03:00
Daniel Eklöf
605490c872
overline: new decoration
Similar to the ‘underline’ decoration
2022-02-10 20:49:09 +01:00
Alexandre Acebedo
ae5c7e0fc3 modules: add cpu module 2021-12-21 18:44:36 +01:00
Alexandre Acebedo
337ce7681f modules: add mem module 2021-12-21 18:44:14 +01:00
Daniel Eklöf
f0782d5124
deco: new decoration, ‘border’
Kind of like “underline”, but draws a border around the entire
particle.
2021-10-24 18:22:21 +02:00
Stanislav Ochotnický
e723b039ad Make libmpdclient an optional dependency
Without this change yambar can't be installed/used without libmpdclient even for
people who do not use MPD. Let's make this optional.

We could put the optional module summary in the module meson.build but we'd have
to move summary() in main meson.build so that they appear in proper order.
2021-09-16 11:46:22 +02:00
Daniel Eklöf
560d7464b4
module/foreign-toplevel: initial support
* ‘content’ is a template; the module returns a list of toplevels,
  each one instantiated using the content template.
* Each toplevel has 6 tags:
  - app-id (string)
  - title (string)
  - maximized (bool)
  - minimized (bool)
  - activated (bool)
  - fullscreen (bool)

To show the application name and title of the currently active window,
one can do:

    - foreign-toplevel:
        content:
          map:
            tag: activated
            values:
              false: {empty: {}}
              true: {string: {text: "{app-id}: {title}"}}
2021-08-25 18:46:18 +02:00
Daniel Eklöf
19fe2f5a6f
module/script: wip: new plugin, reads data from a user provided script/binary
This module exec’s a script (or binary), specified by the ‘path’
attribute in the configuration.

It then reads tags from the script’s stdout.

The format of the output is:

  tag|type|value
  tag|type|value
  <empty line>

I.e. the script writes N tags followed by an empty  line. This
constitutes a transaction.

When a new transaction is received, its tags replaces *all* previous
tags.
2020-11-25 20:36:44 +01:00
Daniel Eklöf
7b2d524598
moduel/river: wip: new module; 'tags' status on Wayland compositor 'river' 2020-07-23 19:00:42 +02:00
Daniel Eklöf
0550d2799d
tllist: use tllist from external git repository 2019-11-17 19:17:34 +01:00
Daniel Eklöf
d576802e49
modules/sway-xkb: new module, uses sway 'input' events to expose kbd layout
We subscribe to Sway's 'input' events, and use these to expose input
devices' active XKB layout.

The module is configured by specifying a list of 'identifiers'; these
are the input devices (keyboards, typically), that we'll be
monitoring. All other input devices are ignored.

'content' is a template, and the module will instantiate a dynlist
with a 'content' for each *existing* input found in the 'identifiers'
list.

We also monitor for device 'added' and 'removed' events, and update
our internal list of existing inputs.

This means the user can configure a set of identifiers, and only those
that are actually present will be displayed. If a device that is
listed in the 'identifiers' list is added, it will be displayed. If it
is removed, it will no longer be displayed.
2019-08-14 21:51:43 +02:00
Daniel Eklöf
a1be489293 plugin: set lib = RTLD_DEFAULT for builtin plugins 2019-05-01 12:39:00 +02:00
Daniel Eklöf
0e3866186f plugin: for now, the defines *all* use the word PLUGIN 2019-02-06 18:09:48 +01:00
Daniel Eklöf
727d7b343f cmake: initial support for building wayland-only, or x11-only 2019-02-03 20:05:44 +01:00
Daniel Eklöf
452c4b6015 plugins: export a const function pointer interface struct 2019-01-26 18:32:04 +01:00
Daniel Eklöf
0d591fe5a1 allow plugins to be compiled into the f00bar main binary 2019-01-14 20:57:03 +01:00
Daniel Eklöf
7754ef3661 decorations: are now plugins 2019-01-13 17:43:25 +01:00
Daniel Eklöf
bc62843c91 modules: get rid of struct module_info
Since this struct only contained function pointers, make all modules
export those functions directly.

The plugin manager now defines a module interface struct, and fills it
it by dlsym:ing the functions that used to be in module_info.
2019-01-13 17:09:11 +01:00
Daniel Eklöf
07b1615a41 particles: get rid of struct particle_info
Since this struct only contained function pointers, make all particles
export those functions directly.

The plugin manager now defines a particle interface struct, and fills
it it by dlsym:ing the functions that used to be in particle_info.
2019-01-13 17:03:35 +01:00
Daniel Eklöf
2df419efc2 plugin: remove TODO 2019-01-13 11:29:10 +01:00
Daniel Eklöf
45280416ff modules, particles: type-specific filename prefix
Instead of naming the shared libraries libfoo.so, add a type-specific
prefix: module_foo.so, or particle_foo.so
2019-01-13 11:26:31 +01:00
Daniel Eklöf
ec4a47e5db modules: rename module_info -> plugin_info
This is the same name used by particles.
2019-01-13 11:18:32 +01:00
Daniel Eklöf
47018104da particles: compile as shared libraries (plugins) 2019-01-13 11:13:47 +01:00
Daniel Eklöf
72edcf608c plugin: include plugin type in log messages 2019-01-12 22:47:36 +01:00
Daniel Eklöf
0fa7906e99 plugin: add plugin_load_particle() function 2019-01-12 22:36:45 +01:00
Daniel Eklöf
9fa37f0d98 plugin: 'libs' -> 'plugins' 2019-01-12 21:17:12 +01:00
Daniel Eklöf
aa4fede306 plugin: use tll_free_and_free() to free the global plugin list 2019-01-12 21:16:13 +01:00
Daniel Eklöf
aa6ea602ca plugin: remove linked-list items as we 2019-01-12 21:13:50 +01:00
Daniel Eklöf
f7fd305821 build: install targets for f00bar binary + module plugins
Module plugins are (still) built in <build-dir>/modules.

When installing, f00bar binary is installed to <install-dir>/bin, and
the module plugins to <install-dir>/lib/f00bar.

For this to work, we now also set RPATH correctly. Since the installed
module plugins end up in a different location then when building,
different settings is required for BUILD_RPATH and INSTALL_RPATH.
2019-01-12 21:07:48 +01:00
Daniel Eklöf
7f2501334d modules: use the same name for the module_info in all modules 2019-01-12 20:34:43 +01:00
Daniel Eklöf
45eb2b85f0 plugin: cache module_info symbol as well 2019-01-12 19:44:24 +01:00
Daniel Eklöf
962252467f plugins: only dlopen() each plugin once. dlcose() in destructor 2019-01-12 19:38:06 +01:00