forked from external/yambar
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.
This commit is contained in:
parent
1534e00236
commit
d576802e49
5 changed files with 381 additions and 0 deletions
|
@ -38,6 +38,9 @@ struct i3_ipc_callbacks {
|
|||
i3_ipc_callback_t event_binding;
|
||||
i3_ipc_callback_t event_shutdown;
|
||||
i3_ipc_callback_t event_tick;
|
||||
|
||||
/* Sway extensions */
|
||||
i3_ipc_callback_t event_input;
|
||||
};
|
||||
|
||||
bool i3_receive_loop(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue