Commit graph

16 commits

Author SHA1 Message Date
Timur Celik
24a3b90a01
modules: Implement workspace move event
Implementing the move event required to pass the IPC socket to
`i3_ipc_callback_t`, because we won't get notified about any visibility
changes of other workspaces.  That's why we query all workspaces again
after a focused workspace was moved.
2022-12-13 16:21:55 +01:00
Daniel Eklöf
6433373f93
module/i3-common: fix compilation warning with asan 2020-07-07 14:06:29 +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
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
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
Daniel Eklöf
f959d96c17 module/i3-common: add LOG_ENABLE_DBG define, but leave it disabled 2019-02-17 20:05:30 +01:00
Daniel Eklöf
db211de70c modules/i3-common: add support for sway's IPC_GET_INPUTS 2019-02-15 22:30:12 +01:00
Daniel Eklöf
06ae704ded module/i3-commonh: I3_IPC_REPLY_TYPE_SYNC is relatively new
And is for example not present in our CI.
2019-02-15 22:06:24 +01:00
Daniel Eklöf
e40b50bf5e module/i3-common: add missing include
Needed for e.g strncpy() and strcmp()
2019-02-15 22:06:03 +01:00
Daniel Eklöf
f9044ec883 module/i3: add a 'burst_done()' callback
This callback is called after all received packets have been
processed, before going into a blocking poll() again.
2019-02-15 22:01:07 +01:00
Daniel Eklöf
e36ba56caf module/i3-common: being disconnected is usually not an error 2019-02-15 20:57:31 +01:00
Daniel Eklöf
fce37e86e4 module/i3: break out I3 IPC receive loop 2019-02-15 18:58:21 +01:00
Daniel Eklöf
6df68f1c23 module/i3-common: const:ify 2019-02-13 22:00:42 +01:00
Daniel Eklöf
92319714c7 module/i3: break out send_pkg() 2019-02-13 22:00:13 +01:00
Daniel Eklöf
76dc4f82cd module/i3-common: always disconnect from XCB on error 2019-02-13 21:58:20 +01:00
Daniel Eklöf
37d15096f9 module/i3: break out get_socket_address() 2019-02-13 21:55:03 +01:00