Skip to content
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

Keyboardlayout widget for custom layouts #3691

Open
bodograumann opened this issue Sep 9, 2022 · 0 comments · May be fixed by #3907
Open

Keyboardlayout widget for custom layouts #3691

bodograumann opened this issue Sep 9, 2022 · 0 comments · May be fixed by #3907

Comments

@bodograumann
Copy link

Output of awesome --version:

awesome v4.3 (Too long)
• Compiled against Lua 5.3.6 (running with Lua 5.3)
• D-Bus support: ✔
• execinfo support: ✔
• xcb-randr version: 1.6
• LGI version: 0.9.2

How to reproduce the issue:

Define a custom keyboard layout in /usr/share/X11/xkb/symbols/custom and add it as a variant in /usr/share/X11/rules/{base,evdev}.{lst,xml}. (This is on arch linux)
Then use that layout e.g. with setxkbmap -layout custom,de -variant mycustomlayoutname,nodeadkeys.

Also have the awful.widget.keyboardlayout() active.

Actual result:

When the custom layout is active, the widget shows de(nodeadkeys) and when that layout is actually active, the widget shows nothing.

Expected result:

The widget shows custom(mycustomlayoutname), when the custom layout is active and de(nodeadkeys) when the predefined layout is active.

I choose to create a variant in the custom xkb layout, because that already exists in the .xml and .lst of xkeyboard-config, just with no variants. Cf. https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/blob/master/rules/base.xml#L6867-6874

Adding ["custom"] = true, in keyboardlayout.xkeyboard_country_code is enough to solve this problem for me, but I think when a layout can not be found, there should at least be some kind of placeholder text and the order of the layouts should not be affected as described above.

greenfork added a commit to greenfork/awesome that referenced this issue Mar 30, 2024
Can be used like this:

	awful.widget.keyboardlayout({country_codes = {"raku"}})

Closes awesomeWM#3691
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant