[wiki] [sites] [dwm][patch] dwm-pertag-perseltag fix bug. include the last tag || Aaron Duxler

From: <git_AT_suckless.org>
Date: Thu, 30 Apr 2020 16:48:45 +0200

commit d8e38771f40ffd487217a69a71721d984bb24aae
Author: Aaron Duxler <aaron_AT_duxler.xyz>
Date: Thu Apr 30 16:48:41 2020 +0200

    [dwm][patch] dwm-pertag-perseltag fix bug. include the last tag

diff --git a/dwm.suckless.org/patches/pertag/dwm-pertag-perseltag-6.2.diff b/dwm.suckless.org/patches/pertag/dwm-pertag-perseltag-6.2.diff
index ad88742f..7ccfeb3a 100644
--- a/dwm.suckless.org/patches/pertag/dwm-pertag-perseltag-6.2.diff
+++ b/dwm.suckless.org/patches/pertag/dwm-pertag-perseltag-6.2.diff
_AT_@ -70,7 +70,7 @@ diff -up a/dwm.c b/dwm.c
          selmon->nmaster = MAX(selmon->nmaster + arg->i, 0);
 + for(i=0; i<=LENGTH(tags); ++i)
 + if(selmon->tagset[selmon->seltags] & 1<<i)
-+ selmon->pertag->nmasters[(i+1)%LENGTH(tags)] = selmon->nmaster;
++ selmon->pertag->nmasters[(i+1)%(LENGTH(tags)+1)] = selmon->nmaster;
          arrange(selmon);
  }
  
_AT_@ -88,8 +88,8 @@ diff -up a/dwm.c b/dwm.c
 + for(i=0; i<=LENGTH(tags); ++i)
 + if(selmon->tagset[selmon->seltags] & 1<<i)
 + {
-+ selmon->pertag->ltidxs[(i+1)%LENGTH(tags)][selmon->sellt] = selmon->lt[selmon->sellt];
-+ selmon->pertag->sellts[(i+1)%LENGTH(tags)] = selmon->sellt;
++ selmon->pertag->ltidxs[(i+1)%(LENGTH(tags)+1)][selmon->sellt] = selmon->lt[selmon->sellt];
++ selmon->pertag->sellts[(i+1)%(LENGTH(tags)+1)] = selmon->sellt;
 + }
 +
          if (selmon->sel)
_AT_@ -111,7 +111,7 @@ diff -up a/dwm.c b/dwm.c
          selmon->mfact = f;
 + for(i=0; i<=LENGTH(tags); ++i)
 + if(selmon->tagset[selmon->seltags] & 1<<i)
-+ selmon->pertag->mfacts[(i+1)%LENGTH(tags)] = f;
++ selmon->pertag->mfacts[(i+1)%(LENGTH(tags)+1)] = f;
          arrange(selmon);
  }
  
_AT_@ -123,7 +123,7 @@ diff -up a/dwm.c b/dwm.c
          selmon->showbar = !selmon->showbar;
 + for(i=0; i<=LENGTH(tags); ++i)
 + if(selmon->tagset[selmon->seltags] & 1<<i)
-+ selmon->pertag->showbars[(i+1)%LENGTH(tags)] = selmon->showbar;
++ selmon->pertag->showbars[(i+1)%(LENGTH(tags)+1)] = selmon->showbar;
          updatebarpos(selmon);
          XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh);
          arrange(selmon);
Received on Thu Apr 30 2020 - 16:48:45 CEST

This archive was generated by hypermail 2.3.0 : Thu Apr 30 2020 - 16:48:49 CEST