-
Notifications
You must be signed in to change notification settings - Fork 158
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
Add support for listening and reconfiguring the keyboard settings from locale1 #1588
Comments
Neither of your example cases would be addressed by monitoring DBus for these messages. An installer will set some appropriate configuration to indicate the default locale, while the display manager should be setting environment variables to indicate the locale even before labwc launches. The DBus message is relevant when a user updates the locale settings whole labwc is running, but monitoring DBus seems outside the scope of labwc. Unless there is a Wayland protocol that can be used for this purpose, I think your best bet would be to adapt the KWin or Sway helpers to monitor the bus, then write locale variables to |
Installers change the locale live in order to allow input to work as you progress through the install process. |
Hi @Conan-Kudo |
SDDM is another one, as the keyboard layout switching logic for Wayland is intended to use the locale1 interface too. And SDDM can be used with a variety of compositors, such as the default Weston, KWin (from KDE), Sway, and so on. Fedora's Initial Setup tool is built on top of Anaconda and will also use this interface. I expect we'll see more of this sort of thing over time. |
SDDM could also just set the env vars directly before launching the compositor. I get the point about installers and live environments though. |
SDDM lets the user change layouts live for a multi-user situation. |
Here's a downstream request from @jkonecny12 for us to support this with Fedora LXQt (which is currently planned to use labwc for Wayland LXQt): https://pagure.io/fedora-lxqt/SIG/issue/4 |
I don't think we want to add dbus support to labwc. I agree with what @ahesford suggested above, this seems to be the best solution to the issue for me as well:
With labwc >= 0.7.1 that should allow changing the keyboard layout live. |
Just displaying layouts in use is still hacky though. |
And how am I supposed to do these triggers when the layout change is being requested, especially at the display manager level where I don't have anywhere to run anything? |
@Conan-Kudo - Do you have the means and ability to explore doing a script yourself for comment/discussion (like the sway one)? Or are you looking for one of us to write it? I haven't used SDDM for years and it would take me a little while to get the right setup to experiment, so if you can start it off that would be cool. I don't know enough about this to answer your question. Do you know what the sequence of events is? Am I right in thinking that SDDM starts the compositor before it sends the dbus message about keyboard-layout? If so, could we run the script from
@stefonarch Suggest we try to |
I'm probably capable of writing a script, what I'm concerned about is figuring out how to make it so the single exec limitation for sddm lets me have a labwc that responds to when the setting changes in locale1. I guess I need some kind of async listener thing wrapping the execution of labwc itself, since labwc can't do it? |
I think it should be enough to simply have a dbus client script in |
but that would take down the environment, wouldn't it? |
This mostly allows for using scripts that trigger a labwc SIGHUP to work as expected. Before this patch, there was a race between the event loop starting up and the autostart scripts executing. One example of such a use-case is dynamically setting the keyboard layout or cursor theme via environment variable based on feedback from a dbus service like discussed in labwc#1588.
No. It just re-loads |
This mostly allows for using scripts that trigger a labwc SIGHUP to work as expected. Before this patch, there was a race between the event loop starting up and the autostart scripts executing. One example of such a use-case is dynamically setting the keyboard layout or cursor theme via environment variable based on feedback from a dbus service like discussed in #1588.
Is it possible to tell labwc to look in a specific directory for configuration instead of |
There is a |
Proposal
Please add support for listening and dynamically configuring keyboard settings based on
org.freedesktop.locale1
.Use-cases
This is needed in order to handle cases like keyboard layout switching from the login manager (e.g. SDDM) or the installer (e.g. Calamares or Anaconda).
References
Here are a couple of example implementations for other compositors:
The text was updated successfully, but these errors were encountered: