diff options
author | tcmal <me@aria.rip> | 2024-08-30 16:51:50 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-08-30 17:10:47 +0100 |
commit | 8fc827a3b30de16b6adbf80abea3bc224d507268 (patch) | |
tree | c9a37a1dbaf02ec3b52000b5feaa3cba6af511ef /src/clients/mod.rs | |
parent | a568b4a79d1ccabfdff0a5a8ecbb908e96f17cf5 (diff) |
Add bind for going back and forth between tags
Diffstat (limited to 'src/clients/mod.rs')
-rw-r--r-- | src/clients/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/clients/mod.rs b/src/clients/mod.rs index 70ffb00..d093fb1 100644 --- a/src/clients/mod.rs +++ b/src/clients/mod.rs @@ -432,11 +432,17 @@ impl ClientState { .for_each(|c| c.ensure_unmapped(conn)); debug!("setting tag focus to {:?} on mon {}", tag_focus, mon); + self.mons[mon].last_focused_tag = curr_focus; self.mons[mon].focused_tag = tag_focus; self.unfocus(conn); self.rearrange_mon(conn, mon); } + /// Set the given monitor's focused tag to its previous value + pub fn mon_prev_tag_focus(&mut self, conn: &Connection<'_>, mon: MonitorIdx) { + self.set_mon_tag_focus(conn, mon, self.mons[mon].last_focused_tag); + } + /// Set the tag for the given client pub fn set_client_tag(&mut self, conn: &Connection<'_>, pos: ClientIdx, tag: Tag) { let c = self.client_mut(pos); |