-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use cosmic-config for input config; changeable at runtime #140
Conversation
efcf877
to
c5baef2
Compare
Looks good to me code-wise.
Me neither, seems clean enough to me anyway.
I think this is the biggest issue here. Looking at the cosmic-settings design, we need a way to configure defaults for a device type. I would like to retain the ability to special case the configuration of specific devices, though updating the defaults should probably also update all known devices, otherwise cosmic-settings UI wouldn't work as expected. Thinking about this we might want to make a
Though this depends on the wlr-output-configuration protocol, which doesn't necessarily expose everything we want to make configurable in the long term. E.g. it only recently added variable refresh rate, so for cosmic-settings I think we want to use the cosmic-config, while keeping wlr-output-configuration for compatibility with other apps. |
Would that group mouse and touchpad acceleration? I think the designs have those separate, as is commonly done. |
Right... So maybe we need to match on some property of the |
41dc432
to
0fea3e4
Compare
0fea3e4
to
7955b16
Compare
So the solution is to just treat touchpads differently from everything else? |
Yes. It's awkward, but I don't see a better way to do it with the current design we have for settings. Unless we want to just have individual settings like We can't really have settings per capability because a device can (in principle) have any number of capabilities. Libinput doesn't have "device types" even if things like Gnome Shell try to act like it does. I guess settings are largely tied to a particular capability, looking at libinput I didn't see any explicit association. |
Just wanted to confirm, I don't think this is a terrible idea and I also don't see any obvious issues, it just seemed.. odd. What is missing to get this out of "Draft"-status? |
I still need to make use of this for mouse/touchpad settings in cosmic-settings and use that to test that its working as expected, but otherwise this PR should be good. Moving other settings to cosmic-settings can be done after this is merged. |
Sounds good. Please give me a ping once this is ready for final review and merge. I haven't found any glaring issues with the approach. Quite the opposite, I think this version looks quite clean! :) |
This adds a `input-default` setting, which is used for input settings if a device isn't set in `input-devices`. More awkwardly, it also adds an `input-touchpad` setting, which is used instead of `input-default` for touchpad devices, so we can separate mouse and touchpad settings even though they use the same capability and settings. This no longer sets the input config, and only reads it. If we add a UI for per-device config, we'll need some IPC mechanism to list connected devices. (Assuming cosmic-settings can't use libinput directly for that.) This moves `InputConfig` and `XkbConfig` to a new `cosmic-comp-config` crate, so they can be used in `cosmic-settings`.
7955b16
to
9140c38
Compare
After a couple small changes to So probably no need to do more on this branch, and we can merge it. |
983ca0a
to
1ea0ffd
Compare
Adds a note about "Read-only filesystem" when testing
With this, it's possible to change
xkb-config
andinput-devices
and immediately see them effect the compositor.In an earlier draft for input configuration I had a method:
But I'm not sure that makes the code less entangled without more changes.
pop-os/libcosmic#126 would make a few things cleaner, but I'm still not sure on that design.
Leaving as a draft until cosmic-settings is updated to make use of this. And
input-devices
may not be the best way to configure input, but we'll need to think about the design there.After input settings, settings from
config.ron
can also be migrated to cosmic-config and made changeable at runtime.outputs.ron
can be dealt with later since we already have dynamic persistent output configuration that more or less works withwdisplays
.