diff options
Diffstat (limited to 'src/layout.rs')
| -rw-r--r-- | src/layout.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/layout.rs b/src/layout.rs index c4ab517b..7dc89c3d 100644 --- a/src/layout.rs +++ b/src/layout.rs @@ -566,6 +566,16 @@ impl<W: LayoutElement> MonitorSet<W> { .find(|monitor| &monitor.output == output) } + pub fn outputs(&self) -> impl Iterator<Item = &Output> + '_ { + let monitors = if let MonitorSet::Normal { monitors, .. } = self { + &monitors[..] + } else { + &[][..] + }; + + monitors.iter().map(|mon| &mon.output) + } + pub fn move_left(&mut self) { let Some(monitor) = self.active_monitor() else { return; |
