summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.def.h17
-rw-r--r--dwm.c10
2 files changed, 13 insertions, 14 deletions
diff --git a/config.def.h b/config.def.h
index a729dcd..dfbbdd1 100644
--- a/config.def.h
+++ b/config.def.h
@@ -1,8 +1,6 @@
1/* See LICENSE file for copyright and license details. */ 1/* See LICENSE file for copyright and license details. */
2 2
3/* appearance */ 3/* appearance */
4#define SHOWBAR True /* False means no bar */
5#define TOPBAR True /* False means bottom bar */
6static const char font[] = "-*-*-medium-*-*-*-14-*-*-*-*-*-*-*"; 4static const char font[] = "-*-*-medium-*-*-*-14-*-*-*-*-*-*-*";
7static const char normbordercolor[] = "#cccccc"; 5static const char normbordercolor[] = "#cccccc";
8static const char normbgcolor[] = "#cccccc"; 6static const char normbgcolor[] = "#cccccc";
@@ -10,8 +8,10 @@ static const char normfgcolor[] = "#000000";
10static const char selbordercolor[] = "#0066ff"; 8static const char selbordercolor[] = "#0066ff";
11static const char selbgcolor[] = "#0066ff"; 9static const char selbgcolor[] = "#0066ff";
12static const char selfgcolor[] = "#ffffff"; 10static const char selfgcolor[] = "#ffffff";
13static unsigned int borderpx = 1; /* border pixel of windows */ 11static const unsigned int borderpx = 1; /* border pixel of windows */
14static unsigned int snap = 32; /* snap pixel */ 12static const unsigned int snap = 32; /* snap pixel */
13static const Bool showbar = True; /* False means no bar */
14static const Bool topbar = True; /* False means bottom bar */
15 15
16/* monitor(s) symbols */ 16/* monitor(s) symbols */
17static const char *monsyms[] = { "<1>", "<2>", "<3>", "<4>", "<5>" }; 17static const char *monsyms[] = { "<1>", "<2>", "<3>", "<4>", "<5>" };
@@ -19,18 +19,17 @@ static const char *monsyms[] = { "<1>", "<2>", "<3>", "<4>", "<5>" };
19/* tagging */ 19/* tagging */
20static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; 20static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
21 21
22static Rule rules[] = { 22static const Rule rules[] = {
23 /* class instance title tags mask isfloating */ 23 /* class instance title tags mask isfloating */
24 { "Gimp", NULL, NULL, 0, True }, 24 { "Gimp", NULL, NULL, 0, True },
25 { "Firefox", NULL, NULL, 1 << 8, False }, 25 { "Firefox", NULL, NULL, 1 << 8, False },
26
27}; 26};
28 27
29/* layout(s) */ 28/* layout(s) */
30static float mfact = 0.55; /* factor of master area size [0.05..0.95] */ 29static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
31static Bool resizehints = True; /* False means respect size hints in tiled resizals */ 30static const Bool resizehints = True; /* False means respect size hints in tiled resizals */
32 31
33static Layout layouts[] = { 32static const Layout layouts[] = {
34 /* symbol arrange function */ 33 /* symbol arrange function */
35 { "[]=", tile }, /* first entry is default */ 34 { "[]=", tile }, /* first entry is default */
36 { "><>", NULL }, /* no layout function means floating behavior */ 35 { "><>", NULL }, /* no layout function means floating behavior */
diff --git a/dwm.c b/dwm.c
index d448f5b..17d5218 100644
--- a/dwm.c
+++ b/dwm.c
@@ -66,7 +66,7 @@ typedef union {
66 int i; 66 int i;
67 unsigned int ui; 67 unsigned int ui;
68 float f; 68 float f;
69 void *v; 69 const void *v;
70} Arg; 70} Arg;
71 71
72typedef struct { 72typedef struct {
@@ -136,7 +136,7 @@ struct Monitor {
136 Client *stack; 136 Client *stack;
137 Monitor *next; 137 Monitor *next;
138 Window barwin; 138 Window barwin;
139 Layout *lt[2]; 139 const Layout *lt[2];
140}; 140};
141 141
142typedef struct { 142typedef struct {
@@ -275,7 +275,7 @@ struct NumTags { char limitexceeded[sizeof(unsigned int) * 8 < LENGTH(tags) ? -1
275void 275void
276applyrules(Client *c) { 276applyrules(Client *c) {
277 unsigned int i; 277 unsigned int i;
278 Rule *r; 278 const Rule *r;
279 XClassHint ch = { 0 }; 279 XClassHint ch = { 0 };
280 280
281 /* rule matching */ 281 /* rule matching */
@@ -1726,8 +1726,8 @@ updategeom(void) {
1726 m->sellt = 0; 1726 m->sellt = 0;
1727 m->tagset[0] = m->tagset[1] = 1; 1727 m->tagset[0] = m->tagset[1] = 1;
1728 m->mfact = mfact; 1728 m->mfact = mfact;
1729 m->showbar = SHOWBAR; 1729 m->showbar = showbar;
1730 m->topbar = TOPBAR; 1730 m->topbar = topbar;
1731 m->lt[0] = &layouts[0]; 1731 m->lt[0] = &layouts[0];
1732 m->lt[1] = &layouts[1 % LENGTH(layouts)]; 1732 m->lt[1] = &layouts[1 % LENGTH(layouts)];
1733 updatebarpos(m); 1733 updatebarpos(m);