aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorcrecher <crecher@crecher.net>2026-10-24 08:25:45 +0000
committercrecher <crecher@crecher.net>2026-10-24 08:25:45 +0000
commitd6392b555ffb52ecd9db9307442e435dd3552a5b (patch)
tree10a8afc9c1e9df255ab0b04b621a1c5cca5c393d /main.go
parent0aa9fdd81cb4ae58d39f09396f29827092b6e49c (diff)
downloadwm-d6392b555ffb52ecd9db9307442e435dd3552a5b.tar.gz
wm-d6392b555ffb52ecd9db9307442e435dd3552a5b.zip
feat: moving to and toggling tags
Signed-off-by: crecher <crecher@crecher.net>
Diffstat (limited to 'main.go')
-rw-r--r--main.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/main.go b/main.go
index 698bafa..cb16435 100644
--- a/main.go
+++ b/main.go
@@ -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