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

feat(workspaces): niri support

Co-authored-by: Jake Stanger <mail@jstanger.dev>
This commit is contained in:
Anant Sharma 2024-09-08 18:44:54 +01:00 committed by Jake Stanger
parent 57bfab1dcc
commit 02a8ddabf0
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
12 changed files with 367 additions and 31 deletions

View file

@ -327,11 +327,8 @@ impl Client {
}
impl WorkspaceClient for Client {
fn focus(&self, id: String) {
let identifier = id.parse::<i32>().map_or_else(
|_| WorkspaceIdentifierWithSpecial::Name(&id),
WorkspaceIdentifierWithSpecial::Id,
);
fn focus(&self, id: i64) {
let identifier = WorkspaceIdentifierWithSpecial::Id(id as i32);
if let Err(e) = Dispatch::call(DispatchType::Workspace(identifier)) {
error!("Couldn't focus workspace '{id}': {e:#}");