Browse Source

restricting number of mons by length of monsyms

master
Anselm R Garbe 16 years ago
parent
commit
5e408d8ff6
2 changed files with 3 additions and 1 deletions
  1. +1
    -1
      config.def.h
  2. +2
    -0
      dwm.c

+ 1
- 1
config.def.h View File

@ -14,7 +14,7 @@ static const Bool showbar = True; /* False means no bar */
static const Bool topbar = True; /* False means bottom bar */ static const Bool topbar = True; /* False means bottom bar */
/* monitor(s) symbols */ /* monitor(s) symbols */
static const char *monsyms[] = { "<1>", "<2>", "<3>", "<4>", "<5>" };
static const char *monsyms[] = { "<1>", "<2>", "<3>", "<4>" };
/* tagging */ /* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };


+ 2
- 0
dwm.c View File

@ -1690,6 +1690,8 @@ updategeom(void) {
if(XineramaIsActive(dpy)) if(XineramaIsActive(dpy))
info = XineramaQueryScreens(dpy, &n); info = XineramaQueryScreens(dpy, &n);
#endif /* XINERAMA */ #endif /* XINERAMA */
if(n > LENGTH(monsyms))
n = LENGTH(monsyms);
/* allocate monitor(s) for the new geometry setup */ /* allocate monitor(s) for the new geometry setup */
for(i = 0; i < n; i++) { for(i = 0; i < n; i++) {
if(!(m = (Monitor *)malloc(sizeof(Monitor)))) if(!(m = (Monitor *)malloc(sizeof(Monitor))))


Loading…
Cancel
Save