Commit graph

26 commits

Author SHA1 Message Date
Daniel Eklöf
63f7f6b3d8 main: get_config_path: look in XDG_CONFIG_HOME first 2019-04-29 18:55:08 +02:00
Daniel Eklöf
aba597d5cc main: print error and exit when we fail to find a conf file 2019-04-29 18:47:21 +02:00
Daniel Eklöf
8c72d1f2a9 main: config: also support XDG_CONFIG_HOME/f00bar/config.yml 2019-02-12 20:53:09 +01:00
Daniel Eklöf
8b527e3fe5 main: load config from config.yml, not config-wayland.yml 2019-02-07 13:48:41 +01:00
Daniel Eklöf
ae5029826b cmake: break out bar stuff to separate CMakeLists.txt 2019-02-07 12:06:16 +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
785fe8bb0c main: poll() return value is unused in release builds
Because it's only used in an assert()
2019-01-29 21:38:21 +01:00
Daniel Eklöf
deb9105d3e main: move xcb_init() call to bar's XCB backend 2019-01-29 21:37:38 +01:00
Daniel Eklöf
9239d4298c main: drop xcb dependency
Handle program termination by a) using a signal handler to detect
e.g. ctrl-c, and b) listening on the abort_fd to detect when the bar
aborts (e.g. due to XCB disconnect, i.e. when the X server dies).
2019-01-29 21:35:38 +01:00
Daniel Eklöf
314b43b4f0 main: initialize locale
This affects e.g. the clock module, which (by default) formats the
date according to the locale's preferred format.
2019-01-19 20:50:02 +01:00
Daniel Eklöf
9d5bbe0566 misc: xcb_connect() always returns a non-NULL pointer
Instead, we need to check if xcb_connection_has_error() says something
went wrong. We also need to call xcb_disconnect() on the disfunctional
XCB connection object.
2019-01-19 18:45:15 +01:00
Daniel Eklöf
dc7fde335e main: refactor 2019-01-16 17:22:08 +01:00
Daniel Eklöf
b195c19599 bar: remove struct bar_run_context; store abort_fd in bar struct 2019-01-16 16:38:04 +01:00
Daniel Eklöf
a4ce3372ce main: refactor 2019-01-16 16:34:59 +01:00
Daniel Eklöf
c18b5a1bbe main: catch SIGTERM
And when exiting, log which signal we were killed by.
2019-01-09 18:50:26 +01:00
Daniel Eklöf
fdadf577e9 main: detect when X server dies, and abort
This is done by creating an XCB connection, whose only purpose is to
detect a POLLHUP (xcb disconncet).

Furthermore, make sure SIGINT is blocked in all threads except the
main thread.
2019-01-07 18:27:43 +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
4d46a14a67 main: print a descriptive error message when yaml parsing fails 2019-01-01 23:26:10 +01:00
Daniel Eklöf
5abd825137 yml: yml_load(): optionally allocates an error string (on error) 2019-01-01 23:25:36 +01:00
Daniel Eklöf
449210cc07 main: use bar's return value as exit value 2018-12-29 17:57:30 +01:00
Daniel Eklöf
10877d7c2e main: error handling 2018-12-29 17:56:26 +01:00
Daniel Eklöf
825c5c82b5 main: load config file from ~/.config/f00bar/config.yml 2018-12-29 17:54:33 +01:00
Daniel Eklöf
c2e53a6bf7 main: no need for EFD_NONBLOCK 2018-12-28 12:41:21 +01:00
Daniel Eklöf
db2535bd72 main: remove ifdef 2018-12-13 19:05:52 +01:00
Daniel Eklöf
7c468c20c0 xcb: add xcb_init(): checks the x server + extensions, and caches atoms 2018-11-17 11:47:34 +01:00
Daniel Eklöf
8bf8a398b9 initial commit: wip 2018-11-17 11:30:33 +01:00