Commit graph

523 commits

Author SHA1 Message Date
Daniel Eklöf
4d9ee6ff82 cmake: use find_program() to locate wayland-scanner binary 2019-02-13 21:45:31 +01:00
Daniel Eklöf
236511db88 Merge branch 'i3-expose-window-title' 2019-02-12 22:13:29 +01:00
Daniel Eklöf
c34dc7f025 Merge branch 'master' into i3-expose-window-title 2019-02-12 22:13:16 +01:00
Daniel Eklöf
21b2e249bc cmake: install header files 2019-02-12 22:12:57 +01:00
Daniel Eklöf
0e41c6560b cmake: install header files 2019-02-12 22:12:35 +01:00
Daniel Eklöf
6f021b62de Merge branch 'master' into i3-expose-window-title 2019-02-12 20:53:37 +01: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
bc4f1723d4 Merge branch 'master' into i3-expose-window-title 2019-02-12 20:01:01 +01:00
Daniel Eklöf
1e466a24ba Pull in wlr-protocols instead of wlroots
We're not interested in anything in wlroots, except the wlr protocols.
2019-02-12 20:00:35 +01:00
Daniel Eklöf
ffd85cf4ae Merge branch 'master' into i3-expose-window-title 2019-02-10 12:50:35 +01:00
Daniel Eklöf
6a30f66894 README: wayland is now supported 2019-02-10 12:50:23 +01:00
Daniel Eklöf
97ff63044f module/i3: cleanup 2019-02-10 12:29:33 +01:00
Daniel Eklöf
d631e47a5e module/i3: detect 'current' workspace while iterating workspaces 2019-02-10 12:29:33 +01:00
Daniel Eklöf
330ad48dfd module/i3: handle 'label' like an extra workspace called 'current' 2019-02-10 12:29:33 +01:00
Daniel Eklöf
a3be2839e5 module/i3: avoid calling json_object_get_int() multiple times 2019-02-10 12:29:33 +01:00
Daniel Eklöf
83db675e01 module/i3: subscribe *before* requesting initial workspace list
This ensures we don't have a race, where we might miss workspace
changes between the initial list and subscribing.
2019-02-10 12:29:33 +01:00
Daniel Eklöf
be4765fadd module/i3: 'dynlist' -> 'workspaces' 2019-02-10 12:29:33 +01:00
Daniel Eklöf
4100922b7a module/i3: allow 'content' to also contain a regular 'label'
Previously, the 'content' of i3 was a map, where the keys where i3
workspace names, mapping to a particle template.

Now, that configuration type is still allowed. But we also allow a
variant where the 'content' is a list, of either 1 or 2 entries.

Both entries *must* be dictionaries. The key is either 'dynlist',
which is the same as the dictionary-only type of
configuration. I.e. it maps to a dictionary where the keys are
workspace names, mapping to particle templates.

If the key is *not* dynlist, then it is assumed to be a particle name,
and we treat that as a "regular" label, that will be appended after
the workspace dynlist when instantiating the content.

This particle will be instantiated with, for now, the title and
application of the _currently focused_ workspace.
2019-02-10 12:29:33 +01:00
Daniel Eklöf
d565fbe2f0 module/i3: track active window title and application name
This is done on a per-workspace basis.

Note that the initial state is currently not detected. I.e. we
retrieve the initial workspace list, but we don't get the currently
focused window.
2019-02-10 12:29:33 +01:00
Daniel Eklöf
5ed6e0acbc module/i3: look for I3SOCK env variable before reading X properties 2019-02-10 12:29:33 +01:00
Daniel Eklöf
1c5d017dc3 Merge branch 'calloc-not-malloc' 2019-02-10 12:29:14 +01:00
Daniel Eklöf
b6e61f9c7e modules: use calloc() instead of malloc()
In cases where it makes sense, use calloc() instead of malloc():

* When allocating large objects with many members, many for which
  NULL/0 is a good default value.
* Arrays etc where we explicitly initialize to NULL anyway.
2019-02-09 11:11:31 +01:00
Daniel Eklöf
6bba9200cf particles: use calloc() instead of malloc()
In cases where it makes sense, use calloc() instead of malloc():

* When allocating large objects with many members, many for which
  NULL/0 is a good default value.
* Arrays etc where we explicitly initialize to NULL anyway.
2019-02-09 11:05:12 +01:00
Daniel Eklöf
29e9cea1dd decorations: use calloc() instead of malloc()
In cases where it makes sense, use calloc() instead of malloc():

* When allocating large objects with many members, many for which
  NULL/0 is a good default value.
* Arrays etc where we explicitly initialize to NULL anyway.
2019-02-09 10:58:26 +01:00
Daniel Eklöf
83591b9269 bar: use calloc() instead of malloc()
In cases where it makes sense, use calloc() instead of malloc():

* When allocating large objects with many members, many for which
  NULL/0 is a good default value.
* Arrays etc where we explicitly initialize to NULL anyway.
2019-02-09 10:55:42 +01:00
Daniel Eklöf
ad3a33cf3d bar/wayland: do *not* enable keyboard interactivity 2019-02-07 18:27: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
ac11638303 PKGBUILD: add new wayland dependencies 2019-02-07 13:00:52 +01:00
Daniel Eklöf
57cbde064c PKGCONFIG: add missing xcb-util-wm (for xcb-ewmh) dependency 2019-02-07 13:00:34 +01:00
Daniel Eklöf
3b1998a8e3 Merge branch 'wayland' 2019-02-07 12:49:45 +01:00
Daniel Eklöf
68727006f3 ci: checkout git submodules 2019-02-07 12:47:42 +01:00
Daniel Eklöf
f85117431a ci: install wayland-protocols 2019-02-07 12:45:37 +01:00
Daniel Eklöf
4b0c4c669c cmake: ensure the wayland-protocols package is available 2019-02-07 12:45:05 +01:00
Daniel Eklöf
a62c7e675c ci: *append* to repository list 2019-02-07 12:43:08 +01:00
Daniel Eklöf
4ee2afa48f ci: add x11-only, wayland-only and plugins-as-shared-libraries builds 2019-02-07 12:41:00 +01:00
Daniel Eklöf
da3185dc79 ci: re-enable wayland port 2019-02-07 12:40:51 +01:00
Daniel Eklöf
719d4b95d0 ci: wlroots is available in the "testing" repo (edge only) 2019-02-07 12:37:55 +01:00
Daniel Eklöf
7ff0f5a2f3 cmake: need CMake >= 3.13 since we use target_link_options() 2019-02-07 12:26:05 +01:00
Daniel Eklöf
5884300b5b cmake: use target_link_options() instead of setting CMAKE_EXE_LINKER_FLAGS 2019-02-07 12:25:01 +01:00
Daniel Eklöf
e4f3695f5e cmake: (maybe) build xcb-stuff STATIC library with -fPIC
When building plugins as shared libraries, xcb-stuff needs to be built
with -fPIC, since a couple of the plugins link against it.
2019-02-07 12:24:20 +01:00
Daniel Eklöf
d185f7237d bar: cmake: remove trailing whitespace 2019-02-07 12:09:38 +01:00
Daniel Eklöf
ccd5948585 bar: cmake: not necessary when building STATIC, but we do depend on threads 2019-02-07 12:07:53 +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
76655bc944 bar/wayland: much improved error handling
Most asserts() have now been replaced with error messages. Cleanup()
no longer tries to free/destroy NULL resources.
2019-02-07 11:51:42 +01:00
Daniel Eklöf
e48d90ae12 bar/xcb: cleanup: don't try to free NULL resources 2019-02-07 11:51:26 +01:00
Daniel Eklöf
f71aaf9615 bar: call backend->cleanup() when backend->setup() fails
This makes it easier to implement proper cleanup in the backends, as
setup() doesn't have to clean up it's own mess upon failure.
2019-02-07 11:50:52 +01:00
Daniel Eklöf
0fc5778107 bar/wayland: wl_* APIs typically don't handle destroy(NULL) 2019-02-07 11:22:02 +01:00
Daniel Eklöf
a831490462 modules: fix strncpy calls to ensure strings are NULL-terminated 2019-02-06 18:10:06 +01: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
4a064ebfff bar/wayland: fix includes 2019-02-06 18:04:32 +01:00