mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 00:05:40 +02:00
Added 'MPRIS' module
This commit adds the ability to display status information for MPRIS compatible music players. Closes #53
This commit is contained in:
parent
b5450c3918
commit
c27de56bea
9 changed files with 1266 additions and 1 deletions
13
modules/dbus.h
Normal file
13
modules/dbus.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
// This header provides an generic interface for different versions of
|
||||
// systemd-sdbus.
|
||||
|
||||
#if defined(HAVE_LIBSYSTEMD)
|
||||
#include <systemd/sd-bus.h>
|
||||
#elif defined(HAVE_LIBELOGIND)
|
||||
#include <elogind/sd-bus.h>
|
||||
#elif defined(HAVE_BASU)
|
||||
#include <basu/sd-bus.h>
|
||||
#endif
|
||||
|
|
@ -22,6 +22,9 @@ plugin_mem_enabled = get_option('plugin-mem').allowed()
|
|||
mpd = dependency('libmpdclient', required: get_option('plugin-mpd'))
|
||||
plugin_mpd_enabled = mpd.found()
|
||||
|
||||
mpris = sdbus
|
||||
plugin_mpris_enabled = sdbus.found()
|
||||
|
||||
json_i3 = dependency('json-c', required: get_option('plugin-i3'))
|
||||
plugin_i3_enabled = json_i3.found()
|
||||
|
||||
|
@ -95,6 +98,10 @@ if plugin_mpd_enabled
|
|||
mod_data += {'mpd': [[], [mpd]]}
|
||||
endif
|
||||
|
||||
if plugin_mpris_enabled
|
||||
mod_data += {'mpris': [[], [mpris]]}
|
||||
endif
|
||||
|
||||
if plugin_i3_enabled
|
||||
mod_data += {'i3': [['i3-common.c', 'i3-common.h'], [dynlist, json_i3]]}
|
||||
endif
|
||||
|
|
1129
modules/mpris.c
Normal file
1129
modules/mpris.c
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue