Commit graph

50 commits

Author SHA1 Message Date
Daniel Eklöf
c6fd99f005 bar/wayland: track XDG outputs, as this gets us the monitor identifiers 2019-02-03 15:10:26 +01:00
Daniel Eklöf
47ac57dd03 bar/wayland: cursor support
This implements backend.set_cursor().
2019-02-03 13:13:10 +01:00
Daniel Eklöf
ed8e17c6c9 wayland: mucho wip: initial sort-of-working wayland backend
Bar is drawn, though only TOP is supported atm. No
screen/display/output selection is possible yet. Mouse *click* works,
but not setting the cursor.

Lots of debug output, crappy code yada yada.
2019-02-03 11:08:53 +01:00
Daniel Eklöf
ff88d87ca8 cmake: build bar XCB backend as a (static) library
This allows us to remove the XCB dependencies from the main 'f00bar'
target.
2019-01-29 21:46:54 +01:00
Daniel Eklöf
88daaf0ab7 bar: wip: define a 'backend' interface
Implement the current XCB backend in terms of this new interface.
2019-01-29 20:59:25 +01:00
Daniel Eklöf
2d104e4a7d bar: break out 'private' struct definition to a header file 2019-01-29 20:20:11 +01:00
Daniel Eklöf
aa21991323 bar: move C file to subdirectory 2019-01-29 20:18:37 +01:00
Daniel Eklöf
fe7128030f cmake: make sure we check for *all* xcb libs we need 2019-01-20 15:16:14 +01:00
Daniel Eklöf
2b3d432164 cmake: we don't *really* need 3.13 2019-01-20 13:07:38 +01:00
Daniel Eklöf
dff3104c85 misc: make use of the xcb-aux library 2019-01-19 18:47:34 +01:00
Daniel Eklöf
7a8ba94a49 bar: xcb-errors is optional
With it available, we get better (more descriptive) X error
messages. But it's not fatal, and we don't require it.
2019-01-15 19:26:02 +01:00
Daniel Eklöf
b62e66ccb6 bar: log X(cb) errors 2019-01-15 19:17:22 +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
2f83ed1fc3 particle/dynlist: compile as a shared library 2019-01-13 21:43:56 +01:00
Daniel Eklöf
7754ef3661 decorations: are now plugins 2019-01-13 17:43:25 +01:00
Daniel Eklöf
e471c2357d cmake: set _GNU_SOURCE globally, and only once 2019-01-13 11:40:09 +01:00
Daniel Eklöf
47018104da particles: compile as shared libraries (plugins) 2019-01-13 11:13:47 +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
962252467f plugins: only dlopen() each plugin once. dlcose() in destructor 2019-01-12 19:38:06 +01:00
Daniel Eklöf
64b77a0efc config: dlopen() modules on-demand
TODO: optimizations and proper cleanup

* We currently reload the shared library for each *instance* of the
  module, and we do it twice; once when verifying, and once when
  instantiating.

* The shared libraries are never dlclosed()
2019-01-12 19:03:49 +01:00
Daniel Eklöf
8809cbb481 Put each module in its own subdirectory 2019-01-12 11:19:57 +01:00
Daniel Eklöf
75bdd2ad3c config: use dashes, '-', instead of underscores, '_' in attribute names 2019-01-12 10:32:52 +01:00
Daniel Eklöf
f6977417e0 font: use font-config to load font
This allows us to a) move away from cairo's "toy" API, and b) let the
user specify font options in a single font "name" string:

  Serif:size=10:weight=bold:slant=italic

This also allows us to simplify the font code significantly (except
for the fontconfig parts...); the font no longer sets itself in a
cairo surface - font users do that; the font simply returns a
cairo_scaled_font_t.

Furthermore, font_clone() has now been simplified to basically just
refcount the scaled font. I.e. there's no need to run the full
constructor and lookup and instantiate the cairo scaled font again.
2019-01-09 18:50:16 +01:00
Daniel Eklöf
aa38063e37 wip: verify configuration
We now verify the configuration (currently down to module level, but
not including particles) that are present are of the expected type.
2019-01-06 20:04:01 +01:00
Daniel Eklöf
0d8704737e module/alsa: monitors volume and muted state of selected card/mixer 2019-01-02 18:07:16 +01:00
Daniel Eklöf
14f9aec088 module/removables: monitors removable devices using udev 2019-01-01 20:07:50 +01:00
Daniel Eklöf
b3f3f91dc2 module/network: drop libnl dependency, use raw netlink sockets instead 2018-12-31 13:19:01 +01:00
Daniel Eklöf
4c4f0ce7a0 module: network: monitor ethernet interfaces
State exposed (tag names):

* name: the interface name ("eth0" etc)
* index: the interface index, "ifindex"
* state: operational state (down, up etc)
* mac: the Ethernet hardware address
* ipv4: the *last* IPv4 address added to the interface
* ipv6: the *last* IPv6 address added to the interface

State we monitor (for changes):

* state
* ipv4 addresses
* ipv6 addresses
2018-12-30 20:40:10 +01:00
Daniel Eklöf
b7e7ad522f remove module subfolders 2018-12-29 22:18:08 +01:00
Daniel Eklöf
52f13dec3d dynlist: move to particles folder 2018-12-29 22:13:00 +01:00
Daniel Eklöf
8d94202057 particle/progress-bar: renders a progrss-bar-like thingy 2018-12-27 14:22:05 +01:00
Daniel Eklöf
ce895ac44f particle/empty: placeholder particle, renders nothing
But may have margins.
2018-12-27 14:21:33 +01:00
Daniel Eklöf
9a94c9c1f7 module/mpd: monitors MPD 2018-12-27 11:36:38 +01:00
Daniel Eklöf
1b50808da5 bar: set_cursor(): new interface function, to set the X cursor
Use this to explicitly set the initial/default cursor to "left_ptr"
2018-12-26 17:16:54 +01:00
Daniel Eklöf
a745436ee2 decoration: stack: stacks multiple decorations on top of each other 2018-12-26 15:59:48 +01:00
Daniel Eklöf
09cd27b688 decoration/underline: draws a line at the bottom of the particle 2018-12-26 15:59:16 +01:00
Daniel Eklöf
0284f5ac85 decoration: configurable graphical effects, added to a particle 2018-12-26 15:30:47 +01:00
Daniel Eklöf
1929099ca4 module/backlight: new module 2018-12-26 12:44:17 +01:00
Daniel Eklöf
d516ffdda0 log: initial framework for logging things 2018-12-17 20:25:18 +01:00
Daniel Eklöf
c1e71eca60 make: add global definition _DEBUG when building in debug mode 2018-12-17 20:24:47 +01:00
Daniel Eklöf
ef594b877b module/xkb: monitor current xkb layout 2018-12-17 19:59:29 +01:00
Daniel Eklöf
d600960d69 cmake: sort 2018-12-16 19:17:43 +01:00
Daniel Eklöf
fa3c17aa4a module/battery: use libudev to monitor for battery changes
This allows us to detect plug/unplug events immediately, instead of
having to wait for the next poll event.

Unfortunately, capacity changes do not appear to generate events :(
2018-12-16 17:04:44 +01:00
Daniel Eklöf
47b36bdd35 particle/ramp: new particle, selects one particle from a list
The ramp particle is configured with a tag name and a list of
particles.

At instantiation time, a single particle is selected from the list,
depending on the tag value and it's minimum and maximum values.

I.e. this particle acts kind of like a progress bar.
2018-12-16 16:20:45 +01:00
Daniel Eklöf
6a0385e294 module/battery: monitors battery state and capacity 2018-12-16 15:58:17 +01:00
Daniel Eklöf
b4a3a09ae4 cmake: foobar -> f00bar 2018-12-13 19:07:33 +01:00
Daniel Eklöf
92a1a35c90 module/i3: new module; tracks i3 workspaces 2018-12-13 19:05:52 +01:00
Daniel Eklöf
92c9593ff5 particle/map: new particle; maps a tag value to a particle
This particle is basically a dictionary mapping tag values to
particles.
2018-12-13 19:05:52 +01:00
Daniel Eklöf
081bccf06d modules: put all modules in separate sub directories 2018-11-17 23:15:32 +01:00
Daniel Eklöf
8bf8a398b9 initial commit: wip 2018-11-17 11:30:33 +01:00