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:
parent
ee19176a2c
commit
03e6f10141
15 changed files with 552 additions and 202 deletions
|
@ -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>(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue