diff --git a/src/layout.rs b/src/layout.rs index 9cfa9f6..88758ff 100644 --- a/src/layout.rs +++ b/src/layout.rs @@ -59,7 +59,7 @@ impl State { state.focused_tags().next().cloned().map(|tag| tag.layout()) }) else { return }; - let (windows_on_foc_tags, windows_not_on_foc_tags): (Vec<_>, _) = + let (windows_on_foc_tags, mut windows_not_on_foc_tags): (Vec<_>, _) = output.with_state(|state| { let focused_tags = state.focused_tags().collect::>(); self.windows.iter().cloned().partition(|win| { @@ -67,6 +67,8 @@ impl State { }) }); + windows_not_on_foc_tags.retain(|win| win.output(self) == Some(output.clone())); + let tiled_windows = windows_on_foc_tags .iter() .filter(|win| { diff --git a/src/state.rs b/src/state.rs index c393b0e..194490f 100644 --- a/src/state.rs +++ b/src/state.rs @@ -351,9 +351,15 @@ impl State { fn start_config() -> Result<(), Box> { let config_dir = { - let config_dir = std::env::var("PINNACLE_CONFIG_DIR") - .or_else(|_| std::env::var("XDG_CONFIG_HOME")) - .unwrap_or("~/.config".to_string()); + let config_dir = std::env::var("PINNACLE_CONFIG_DIR").unwrap_or_else(|_| { + let default_config_dir = + std::env::var("XDG_CONFIG_HOME").unwrap_or("~/.config".to_string()); + + PathBuf::from(default_config_dir) + .join("pinnacle") + .to_string_lossy() + .to_string() + }); PathBuf::from(shellexpand::tilde(&config_dir).to_string()) };