1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-08-17 14:51:04 +02:00

feat(keyboard): ability to display and switch kb layout (#836)

This extends the existing `keys` module to be able to show the current keyboard layout, and cycle between layouts (using the `next` command) by clicking. The `keys` module has been renamed to `keyboard` to more accurately reflect its extended featureset.
This commit is contained in:
kuzy000 2025-02-04 00:19:30 +03:00 committed by GitHub
parent ee19176a2c
commit 03e6f10141
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 552 additions and 202 deletions

View file

@ -196,7 +196,7 @@ impl Module<gtk::Box> for WorkspacesModule {
let client = context.ironbar.clients.borrow_mut().workspaces()?;
// Subscribe & send events
spawn(async move {
let mut srx = client.subscribe_workspace_change();
let mut srx = client.subscribe();
trace!("Set up workspace subscription");
@ -213,9 +213,7 @@ impl Module<gtk::Box> for WorkspacesModule {
trace!("Setting up UI event handler");
while let Some(name) = rx.recv().await {
if let Err(e) = client.focus(name.clone()) {
warn!("Couldn't focus workspace '{name}': {e:#}");
};
client.focus(name.clone());
}
Ok::<(), Report>(())