-
Notifications
You must be signed in to change notification settings - Fork 229
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
Module <layout> not showing changes #788
Comments
Yes, unfortunately, the layout module doesn't pick up on that :( Can you please give |
Hope this helps! |
Installed |
No, I am very sorry, if the tool (e.g. The only thing I can think of is more of a workaround - using an explicit i3 binding that invokes |
I think I found the problem, but I don't know how to solve it. I'm now using |
Regarding the update interval: The only way bumblebee has to get the layout is to poll - by default, once prr second. And then, it shows the new layout only when the underlying tool -xkb-switch - shows it. So unless you use a poll interval lower than the default 1s, Icdon't think there is a lot of possibility to speed that up. If you are using multiple keyboards - is it possible that both of them have different layouts and bumblebee is showing only the layout of one of them? I.e. if the other changes layout, bumblebee does not update? |
oh ok, got it! I think it is possible. But right now even the changes from the bluetooth keyboard don't show up. |
Sounds great, thanks for the update! I have only recently figured out that different keyboards can have different layouts in X11, but have no clue how to query that in Python reliably. If you find something, I can update the layout module. Thanks! |
One update to this: I found out that |
Note sure if this helps, but: I wrote a small C tool that seems to (finally) correctly determine the keyboard layout:
You need the X11 library headers (usually something like X11-devel or X11-dev) and compile it with: ./get-layout gives you the "core" layout then, and you can specify a device ID (from xinput -list|grep key) to get the layouts of a specific keyboard. IF that works for you, that would be a first step towards a clean solution :) |
Thank you! Where should I specify the device ID? And for which of the three modules? |
Well, right now, that is not for any module, just to see whether this way retrieves the layout correctly. You can get the ID of the keyboard by executing "xinput -list|grep key" - this gives you a list of your keyboard input devices along with their ID. I am trying to call this directly in Python (by loading libX11), but ctypes is giving me a lot of grief :( |
It does retrieve the layout correctly. It works! |
Great! Then I just need to call those functions with ctypes correctly, and bumblebee will finally have a working layout module :) Thanks a lot for your patience! |
It's you who doing the work, thank you! |
@enrico223 There is now a new module "layout" that accepts a parameter "device" that should be the device ID - e.g. for me, It's very much alpha (i.e. no switching keyboard layouts via the module yet), but if it works fine for you, I will extend it to be "the" main module in the future. |
Closing for now, further changes will be tracked in #790 |
Bug Report
I'm Kubuntu 20.04 LTS, using i3wm. I set up the keybinding Super+space to change the keyboard layout.
The module does its work of changing the keyboard layout and showing the change if clicked on. When the layout is changed with the shortcut, then the layout changes, but the change is not shown in the module.
Description
Affected module: layout
Version used: latest git
Relevant i3 section:
# Start i3bar to display a workspace bar (plus the system information i3status finds out, if available)
bar { position top status_command /home/enrico/bumblebee-status/bumblebee-status -m datetime pomodoro battery layout memory \ pasink pasource -p time.format="%H:%M" -t iceberg-rainbow }
How to reproduce
Simply install the bumblebee status bar and set a keybinding in the system for changing keyboard layout.
The text was updated successfully, but these errors were encountered: