Specific input device configuration
YaLTeR opened this issue · comments
Ability to configure specific input devices.
Syntax: something along
input {
mouse "identifier" {
// Settings for this device.
}
}
Resolution for a given device:
- Search for settings block matching this device's identifier.
- If not found, use the general block for this device's type.
Identifier: check what other compositors use, guess it's something libinput should be exposing.
For keyboards, it should support per-keyboard XKB config.
This should include the ability to disable the device, too
I was looking through the current implementation and at the smithay
code, and I don't see how to accomplish this at the moment. 100% possible I'm just missing something obvious, still trying to get to know the code base.
Are you referring to something in particular? For libinput settings, it should be possible to simply get the device name and find the right config section in apply_libinput_settings()
.
For dynamic XKB, you need to look in on_keyboard()
, extract the libinput device like this (pretty cursed, but possible), then switch the XKB settings similar to how config hot-reload works I guess?
This should include the ability to disable the device, too
I'm expand the request: it should be permanent/toggle (via config file) or eventually (via niri msg action ...
).
Use cases are: hotkeys to on/off touchpad, temporary off touchpad while mouse is connected.
This can work similarly to niri msg output
: apply a config change transiently until the input section is modified in the real config.