Commits

Anonymous committed 40ab096

tagnextmon.c hinzugefuegt

Comments (0)

Files changed (1)

+static void tagnextmon(const Arg *arg);
+static void viewmon(const Arg *arg);
+
+static void 
+tagnextmon(const Arg *arg) {
+    Monitor *m;
+    Client *c = selmon->sel;
+	if(!selmon->sel || !mons->next)
+		return;
+    if(!(m = selmon->next))
+			m = mons;
+    sendmon(c, m);
+	if(c && arg->ui & TAGMASK) {
+		c->tags = arg->ui & TAGMASK;
+		arrange(m);
+    }
+}
+static void
+viewmon(const Arg *arg) {
+    Monitor *m; 
+    if (!mons->next)
+        return;
+    if(!(m = selmon->next))
+        m = mons;
+	m->seltags ^= 1; /* toggle sel tagset */
+    if(arg->ui & TAGMASK)
+        m->tagset[m->seltags] = arg->ui & TAGMASK;
+    unfocus(selmon->sel);
+    selmon=m;
+    focus(NULL);
+    arrange(m);
+}
+static void
+tagviewnextmon(const Arg *arg) {
+    Monitor *m; 
+    Client *c = selmon->sel;
+    if (!mons->next)
+        return;
+    if(!(m = selmon->next))
+        m = mons;
+    sendmon(c, m);
+	if(c && arg->ui & TAGMASK) {
+		c->tags = arg->ui & TAGMASK;
+    }
+	m->seltags ^= 1; /* toggle sel tagset */
+    if(arg->ui & TAGMASK)
+        m->tagset[m->seltags] = arg->ui & TAGMASK;
+    unfocus(selmon->sel);
+    selmon=m;
+    focus(c);
+    arrange(m);
+}