diff options
| author | crecher <crecher@crecher.net> | 2026-10-24 08:25:45 +0000 |
|---|---|---|
| committer | crecher <crecher@crecher.net> | 2026-10-24 08:25:45 +0000 |
| commit | d6392b555ffb52ecd9db9307442e435dd3552a5b (patch) | |
| tree | 10a8afc9c1e9df255ab0b04b621a1c5cca5c393d | |
| parent | 0aa9fdd81cb4ae58d39f09396f29827092b6e49c (diff) | |
| download | wm-d6392b555ffb52ecd9db9307442e435dd3552a5b.tar.gz wm-d6392b555ffb52ecd9db9307442e435dd3552a5b.zip | |
feat: moving to and toggling tags
Signed-off-by: crecher <crecher@crecher.net>
| -rw-r--r-- | main.go | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -419,6 +419,27 @@ func unmanageWindow(conn *xgb.Conn, win xproto.Window) { } } +func moveToTag(conn *xgb.Conn, tags BitMask) { + c, ok := clients[focused] + if !ok { + return + } + c.Tags = tags + if c.Tags&GlobalTags == 0 { + xproto.UnmapWindow(conn, c.Win) + } + updateWindows(conn) + drawBar(conn) +} + +func toggleView(conn *xgb.Conn, tags BitMask) { + view := GlobalTags ^ tags + if view == 0 { + return + } + switchTags(conn, view) +} + func switchTags(conn *xgb.Conn, tags BitMask) { GlobalTags = tags |