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

[BUG] the actual value of the keyboard layout isnt shown #352

Closed
m54c1 opened this issue Nov 23, 2024 · 5 comments · Fixed by #364
Closed

[BUG] the actual value of the keyboard layout isnt shown #352

m54c1 opened this issue Nov 23, 2024 · 5 comments · Fixed by #364

Comments

@m54c1
Copy link

m54c1 commented Nov 23, 2024

The keyboard layout does not change correctly in nwg-panel, even though it works fine in waybar. The layout remains incorrect even when specifying the keyboard by its identifier from swaymsg get_inputs. The keylayout file simply reads the current value from swaymsg.

Steps to reproduce the behavior:
Simply add several languages in the sway config and add a keyboard layout switcher in nwg-panel.

Expected behavior
i expected that everything would change correctly after changing the active keyboard layout

2024-11-24.01-31-06.webm
  • Linux distribution - arch
  • Sway version - swayfx version 0.4-5f42307 (Sep 26 2024, branch 'master') (based on sway 1.9.0)
  • Panel version - nwg-panel version 0.9.51
@nwg-piotr
Copy link
Owner

No idea what you did to your config, but it works perfectly well for me.

obraz

@m54c1
Copy link
Author

m54c1 commented Nov 24, 2024

The problem is that the keyboard layout changes normally through this switch, but when you invoke the language switch using the hotkey defined in the config, nothing changes on the panel. The change is reflected in the waybar, but not here. I don't know how to display my script on the panel, as this switch does not change the keyboard layout in a timely manner. If needed, here is my bash script, and I would appreciate any help in getting it to show on the panel.

https://pastebin.com/ZvV8BH5S

@nwg-piotr
Copy link
Owner

The script has no refresh interval in order not to add to the CPU load. After all it could be refreshed on a signal, but I expected users just to use the panel UI to switch layouts.

@m54c1
Copy link
Author

m54c1 commented Nov 24, 2024

We didn't understand each other. It is fundamentally important for me to change the keyboard layout using hotkeys and at the same time see the current keyboard layout on the panel. I can't do this here, and the question arises: how can I display the name of the language I will be typing in on the panel?

@nwg-piotr
Copy link
Owner

What you need is an executor. You could refresh in a time interval or on a signal.

nwg-piotr added a commit that referenced this issue Dec 17, 2024
add kb-layout label refresh in time interval #352
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.

2 participants