Commit graph

301 commits

Author SHA1 Message Date
Daniel Eklöf
318965b715
module/clock: internally use either minutes or seconds granularity 2020-09-24 14:32:39 +02:00
Daniel Eklöf
db53cf9245
module/alsa+backlight: round() percentage values
Closes #10
2020-09-24 13:57:05 +02:00
Daniel Eklöf
85ae4cca37
module/alsa: add ‘percent’ tag - volume level as a percentage
Fixes part of #10
2020-09-24 13:54:41 +02:00
Daniel Eklöf
06c2a69120
moduel/river: at startup, don't instantiate seat-status before binding outputs 2020-07-24 17:44:35 +02: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
6433373f93
module/i3-common: fix compilation warning with asan 2020-07-07 14:06:29 +02:00
Daniel Eklöf
cc8a54a0de
Merge branch 'battery-charge-current'
Closes #6
2020-06-22 10:58:34 +02:00
Daniel Eklöf
19d91dbb44
module/battery: estimate remaining time from charge+current
Time remaining is now taken from 'time_to_empty_now' if available. If
not, use 'energy' + 'power' if available, and if those does not exist,
use 'charge' + 'current'.

If neither exists, hardcode to 99:00.
2020-06-21 20:44:34 +02:00
Daniel Eklöf
87a8054ae2
module/removable: 'ignore' is now applied to partitions too
This means you can now do either

  ignore: [/dev/sda]

to ignore all partitions on /dev/sda, or

  ignore: [/dev/sda1]

to ignore only the first partition on /dev/sda.
2020-06-21 10:24:52 +02:00
Daniel Eklöf
5d17f1eb57
module/removables: add 'ignore' configuration option
This is a list of devnames (e.g. /dev/sr0). Devices listed here will
be ignored.
2020-06-20 21:46:03 +02:00
Daniel Eklöf
205801625f
Merge branch 'master' into sd-card 2020-06-20 11:26:30 +02:00
Daniel Eklöf
ae871853ca
module/battery: don't crash if 'sysname' in udev event is NULL 2020-06-20 11:21:44 +02:00
Daniel Eklöf
86e6aea152
module/battery: poll-interval = 0 now disables polling 2020-06-20 11:02:57 +02:00
Daniel Eklöf
ddd5911410 module/removables: check for removable or SD card in add_device() 2020-06-18 20:17:55 +02:00
Daniel Eklöf
0fc2a29296 module/removables: initial support for detecting SD cards at startup
SD cards aren't removable
2020-06-18 20:09:57 +02:00
Daniel Eklöf
bdc5dea428 module/alsa: set unmuted=false if we device doesn't have the muted property 2020-06-18 20:08:47 +02:00
Daniel Eklöf
0b1333aa03
module/battery: add support for 'charge_full' and 'charge_full_design' 2020-06-05 13:44:59 +02:00
Daniel Eklöf
1864d68961
module/battery: don't need 'energy' unless we're estimating time left 2020-06-05 13:44:38 +02:00
Daniel Eklöf
50b4bf3783
module/battery: use time_to_empty_now if available 2020-06-05 13:36:10 +02:00
Daniel Eklöf
cc9c5109e9
module/battery: handle 'manufacturer' and 'model_name' not being present 2020-06-05 13:29:38 +02:00
Daniel Eklöf
0e3bded42d
module/mpd: thrd_success isn't necessarily 0 2020-05-03 14:25:17 +02:00
Daniel Eklöf
c3b3d6a637
module/i3: workaround 'workspace init' event being sent twice
Sway 1.4 sends two identical 'workspace init' events when a display is
plugged in.
2020-04-28 18:56:39 +02:00
Daniel Eklöf
1d24755f6b
module/i3: log errors when IPC replies/events are missing data 2020-01-24 21:27:07 +01:00
Daniel Eklöf
f4e456a0ad
module/i3: 'pid' is not a standard property of windows event
Don't fail (and terminate the i3 plugin) if we receive a window event
where the 'container' doesn't have a 'pid' property.

This means we won't be able to determine the application the window
belongs to.

Closes #2
2020-01-24 21:27:07 +01:00
Daniel Eklöf
9675b86478
module/i3: window event: use 'app_id' for 'application', if available
We previously used the 'pid' property of the 'container' object in a
window event to lookup the application name under /proc/<pid>/comm.

In many cases, the application name is already available in the window
event itself, in the 'app_id' property.

Use this, if available, and fallback to the old PID method otherwise.

A quick experiment suggests 'app_id' is set for all Wayland native
applications, but not for X11 applications running under XWayland.
2020-01-24 21:23:21 +01:00
Daniel Eklöf
86522d653d
modules: move 'content' and 'anchors' to MODULE_COMMON_ATTRS
All modules implement these. The only one that differs is the i3
module. It still implements them, but 'content' uses an internal
verifier function.
2020-01-24 21:08:39 +01:00
Daniel Eklöf
3719bbc593
meson: add 'fcft' dependency to decorations and modules
This should fix build failures when building plugins as shared
modules.
2019-12-01 18:02:23 +01:00
Daniel Eklöf
51a6631c19
fcft: use fcft instead of local copy of font.{c,h} 2019-12-01 16:00:15 +01:00
Daniel Eklöf
0550d2799d
tllist: use tllist from external git repository 2019-11-17 19:17:34 +01:00
Daniel Eklöf
9dbbc480e4
Rename project: f00bar -> yambar 2019-09-28 20:39:45 +02:00
Daniel Eklöf
0e7db5f397
module/removables: relaxed mountinfo matching criteria
Fixes mount detection on e.g. Artix Linux.
2019-09-27 19:31:12 +02:00
Daniel Eklöf
e8a1efeeb5
meson: add freetype dependency to decorations and modules
Fixes build failures when building plugins as shared libraries
2019-09-22 12:25:11 +02:00
Daniel Eklöf
c11fee4ce3
cairo: replace cairo with pixman in decos, particles and modules
All decoration, particle and module interfaces now takes a
pixman_image_t parameter, and all drawing is done using pixman APIs.

The wayland/xcb backends implement a new interface functions,
get_pixman_image(), that should return a pixman image instance that is
suitable for rendering.

In the wayland backend, the image uses the same backing data as the
cairo surface.

In the XCB backend, we create a new image each time, and then blit it
to the cairo surface at commit time.
2019-09-22 01:56:58 +02:00
Daniel Eklöf
393e1909b7
module/i3: plug valgrind detected memory leak
Free previous 'application' string before replacing it with a new one.
2019-09-22 00:44:51 +02:00
Daniel Eklöf
f4f44d88fe
modules/sway-xkb: never *update* state without locking it 2019-08-15 19:12:08 +02:00
Daniel Eklöf
9aefa8df14
modules/sway-xkb: pull in string.h, for strdup() and strcmp() 2019-08-14 22:06:46 +02: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
1534e00236
module/mpd: don't try to strdup() NULL strings 2019-07-08 15:06:24 +02:00
Daniel Eklöf
89538f96fa meson: modules: dictionaries can be added 2019-05-06 22:03:19 +02:00
Daniel Eklöf
08e21a4d3b meson: assign get_option('core-plugins-as-shared-libraries') to variable 2019-05-06 21:49:20 +02:00
Daniel Eklöf
121b2f1575 meson: enable_x11 -> backend_x11, enable_wayland -> backend_wayland 2019-05-06 21:45:01 +02:00
Daniel Eklöf
ea9aea8daf cmake: remove build files (replaced with meson) 2019-05-04 11:48:20 +02:00
Daniel Eklöf
27a47a96ed module/mpd: check return value of write()
Fixes building with -D_FORTIFY_SOURCE=2
2019-05-04 11:28:25 +02:00
Daniel Eklöf
789cdd949b meson: use join_paths() 2019-05-03 23:10:01 +02:00
Daniel Eklöf
e563761093 meson: install plugins 2019-05-01 22:08:15 +02:00
Daniel Eklöf
ded98baa4e meson: don't reference xcb_stuff in wayland-only builds 2019-05-01 20:27:17 +02:00
Daniel Eklöf
3995464d49 meson: modules: make it data-driven 2019-05-01 20:24:31 +02:00
Daniel Eklöf
fdb9a9bc1c meson: initial support for building plugins as shared libraries 2019-05-01 18:21:35 +02:00
Daniel Eklöf
51e9d691e4 meson: initial build conf
Not that well tested yet, does not support plugins-as-modules
2019-05-01 12:39:59 +02:00
Daniel Eklöf
7dc5694965 module/i3: use our own copy of i3/ipc.h
The main advantage is when targeting sway/wayland instead of i3/x11;
sway doesn't package ipc.h. There *is* an ipc.h in the sway sources,
but it doesn't define e.g the header format, and has different names
for the constants.
2019-03-31 12:08:44 +02:00