From 686ecc7a0c01e346eadb5f97e26bdf8df05773c8 Mon Sep 17 00:00:00 2001 From: Nickiel12 Date: Fri, 17 Nov 2023 12:13:21 -0800 Subject: [PATCH] fixed workspace map function --- ewwtilities/src/workspace_switcher.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ewwtilities/src/workspace_switcher.rs b/ewwtilities/src/workspace_switcher.rs index 865afd4..0af69d0 100644 --- a/ewwtilities/src/workspace_switcher.rs +++ b/ewwtilities/src/workspace_switcher.rs @@ -67,7 +67,7 @@ pub fn run_workspace_selector(cli: &CliArgs) { debug!("Monitor number adjusted: {}", monitor_num); // Because there is a monitor 0, make sure it is always at least monitor 1 - let target_workspace = (cli.source_workspace.unwrap() * (monitor_num + 2) as i32) - 1; + let target_workspace = (cli.source_workspace.unwrap() * (ids.len()) as i32) - monitor_num as i32; debug!("Target workspace: {}", target_workspace);