Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Incorporated default layout patch into my combined patch (original patch
posted unmodified in patches folder).
- Loading branch information
Showing
3 changed files
with
73 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
diff --git a/dwm/config.h b/dwm/config.h | ||
index 126c864..a29f170 100644 | ||
--- a/dwm/config.h | ||
+++ b/dwm/config.h | ||
@@ -22,6 +22,7 @@ static const Bool topbar = True; /* False means bottom bar */ | ||
|
||
/* tagging */ | ||
static const char *tags[] = { "web", "media", "msg", "4", "5"}; | ||
+static const int taglayouts[] = {2, 2, 0, 0, 0}; | ||
|
||
static const Rule rules[] = { | ||
/* class instance title tags mask isfloating monitor */ | ||
diff --git a/dwm/dwm.c b/dwm/dwm.c | ||
index ef8db79..3f2ac21 100644 | ||
--- a/dwm/dwm.c | ||
+++ b/dwm/dwm.c | ||
@@ -1645,6 +1645,21 @@ setup(void) { | ||
XChangeWindowAttributes(dpy, root, CWEventMask|CWCursor, &wa); | ||
XSelectInput(dpy, root, wa.event_mask); | ||
grabkeys(); | ||
+ | ||
+ /* set default tag layouts */ | ||
+ for (int i = 0; i < LENGTH(tags); i++) | ||
+ { | ||
+ if (taglayouts[i]!=0) | ||
+ { | ||
+ Layout *l; | ||
+ view(&((Arg) { .ui = 1 << i })); | ||
+ l = (Layout *)layouts; | ||
+ for (int j = 0; j < taglayouts[i]; j++) | ||
+ l++; | ||
+ setlayout(&((Arg) { .v = l })); | ||
+ } | ||
+ } | ||
+ view(&((Arg) { .ui = 1 << 0 })); | ||
} | ||
|
||
void |