bumblebee-status: Layout module doesn't handle multiple layouts properly
I’m currently using bumblebee with the following Xorg configuration:
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "us,ara"
Option "XkbVariant" ",qwerty_digits"
Option "XkbOptions" "caps:swapescape"
EndSection
The layout module shows as follows:

It should detect and display the active layout(s) and allow switching between them as is the case in gnome-panel, for example.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 30 (16 by maintainers)
Commits related to this issue
- [modules] Add layout-xkb using xkbgroup to display current layout Package xkbgroup as "thirdparty", because it was slightly patched for python2.x compatibility. see #177 — committed to tobi-wan-kenobi/bumblebee-status by tobi-wan-kenobi 7 years ago
- [modules/layout-xkb] Use set-xkbmap to switch layouts Use the data retrieved via xkb and set the new layouts and variants using set-xkbmap. see #177 — committed to tobi-wan-kenobi/bumblebee-status by tobi-wan-kenobi 7 years ago
- [modules/layout-xkb] Parameter to show full layout name If parameter "showname" is specified, do not show the symbol (e.g. "us"), but the full layout name (e.g. "English (US)"). see #177 — committed to tobi-wan-kenobi/bumblebee-status by tobi-wan-kenobi 7 years ago
- [modules/xkbgroup] Remove thirdparty xkb, use system xkb Providing a custom-built xkb module obviously doesn't really work, so use the system one instead. see #177 — committed to tobi-wan-kenobi/bumblebee-status by tobi-wan-kenobi 7 years ago
- [modules/layout-xkb] Gracefully handle missing xkbgroup library Show "n/a" is xkbgroup is not installed/available see #177 — committed to tobi-wan-kenobi/bumblebee-status by tobi-wan-kenobi 7 years ago
@mahmoudhossam @tobi-wan-kenobi
xkbgroup0.2.0 released, please check it out!I just spent some time playing around with this issue.
What happened in my setup is that by using this line
exec --no-startup-id setxkbmap -layout "fr,us,ru" -option "grp:alt_shift_toggle"in my.config/i3/config, when I switch the layout, the keymap changes but thesetxkbmap -querystill gives out the layoutfr,us,ru.I solved this locally by creating a script that changes the layout (
fr,us,ruthenus,ru,fr, etc…) instead of using the optiongrp:alt_shift_toggleabove. And I use:where change layout is:
I’m sorry I don’t have a more thorough insight on this. Is there a better solution ?
@mahmoudhossam I fully agree, the current implementation seems a safe choice now.
Glad to hear it (finally) works!
Yeah, that would be the short-term solution. Mid-term, I hope that there will be a xkbgroup release on PIP that 1. supports Python 2.7 and 2. works with missing cfree().
Thanks & have a nice day!
Update: I’m not neglecting this issue, I can now call the libX11 library from Python and just need to find the time to figure out how to query the layouts.