diff --git a/src/main.rs b/src/main.rs index e882c89..52c0ccf 100644 --- a/src/main.rs +++ b/src/main.rs @@ -29,9 +29,10 @@ fn record_screen(config: &mut Config, valid_screens: &Vec) -> Result) -> Result Vec { .expect("Couldn't get current focus"); let stdout = String::from_utf8(output.stdout).expect("Invalid UTF-8 from get_workspaces"); - let valid_screens = stdout.split('\n').map(|s| s.to_string()).collect(); - for screen in &valid_screens { - println!("{}", screen); - } + let valid_screens = stdout + .split('\n') + .map(|s| s.to_string()) + .filter(|s| s != "") + .collect(); + + println!("Found screens: {:?}", valid_screens); + return valid_screens; } @@ -122,7 +128,6 @@ fn main() -> Result<(), Box> { workspace_blacklist: Vec::new(), }; let args: Vec = env::args().collect(); - println!("{:?}", args); let mut i = 1; loop {