X-Git-Url: https://git.xinqibao.xyz/dwm.git/blobdiff_plain/6d5f67a0922d40d52290c12f9c0d937f4121406e..52f0b9e2e3e7eba1e7d2b940863d9a72fa8112d6:/config.default.h?ds=sidebyside

diff --git a/config.default.h b/config.default.h
index 10000d9..eb6933b 100644
--- a/config.default.h
+++ b/config.default.h
@@ -2,16 +2,7 @@
  * See LICENSE file for license details.
  */
 
-#define TAGS \
-const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", NULL };
-
-#define LAYOUTS \
-Layout layout[] = { \
-	/* symbol		function */ \
-	{ "[]=",		tile }, /* first entry is default */ \
-	{ "><>",		versatile }, \
-};
-
+/* appearance */
 #define BORDERPX		1
 #define FONT			"-*-fixed-medium-r-normal-*-13-*-*-*-*-*-*-*"
 #define NORMBORDERCOLOR		"#dddddd"
@@ -20,13 +11,34 @@ Layout layout[] = { \
 #define SELBORDERCOLOR		"#ff0000"
 #define SELBGCOLOR		"#006699"
 #define SELFGCOLOR		"#ffffff"
+#define TOPBAR			True		/* False */
+
+/* behavior */
+#define SNAP			20		/* pixel */
+#define TAGS \
+const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", NULL };
+/* Query class:instance:title for regex matching info with following command:
+ * xprop | awk -F '"' '/^WM_CLASS/ { printf("%s:%s:",$4,$2) }; /^WM_NAME/ { printf("%s\n",$2) }' */
+#define RULES \
+static Rule rule[] = { \
+	/* class:instance:title regex	tags regex	isversatile */ \
+	{ "Gimp",			NULL,		True }, \
+	{ "MPlayer",			NULL,		True }, \
+	{ "Acroread",			NULL,		True }, \
+};
 
+/* layout(s) */
+#define LAYOUTS \
+static Layout layout[] = { \
+	/* symbol		function */ \
+	{ "[]=",		tile }, /* first entry is default */ \
+	{ "><>",		versatile }, \
+};
 #define MASTER			600		/* per thousand */
-#define MODKEY			Mod1Mask
 #define NMASTER			1		/* clients in master area */
-#define SNAP			20		/* pixel */
-#define TOPBAR			True		/* False */
 
+/* key definitions */
+#define MODKEY			Mod1Mask
 #define KEYS \
 static Key key[] = { \
 	/* modifier			key		function	argument */ \
@@ -58,8 +70,8 @@ static Key key[] = { \
 	{ MODKEY|ControlMask|ShiftMask,	XK_8,		toggletag,	{ .i = 7 } }, \
 	{ MODKEY|ControlMask|ShiftMask,	XK_9,		toggletag,	{ .i = 8 } }, \
 	{ MODKEY|ShiftMask,		XK_c,		killclient,	{ 0 } }, \
-	{ MODKEY,			XK_space,	togglelayout,	{ 0 } }, \
-	{ MODKEY|ShiftMask,		XK_space,	toggleversatile	{ 0 } }, \
+	{ MODKEY,			XK_space,	setlayout,	{ .i = -1 } }, \
+	{ MODKEY|ShiftMask,		XK_space,	toggleversatile,{ 0 } }, \
 	{ MODKEY,			XK_0,		view,		{ .i = -1 } }, \
 	{ MODKEY,			XK_1,		view,		{ .i = 0 } }, \
 	{ MODKEY,			XK_2,		view,		{ .i = 1 } }, \
@@ -81,13 +93,3 @@ static Key key[] = { \
 	{ MODKEY|ControlMask,		XK_9,		toggleview,	{ .i = 8 } }, \
 	{ MODKEY|ShiftMask,		XK_q,		quit,		{ 0 } }, \
 };
-
-/* Query class:instance:title for regex matching info with following command:
- * xprop | awk -F '"' '/^WM_CLASS/ { printf("%s:%s:",$4,$2) }; /^WM_NAME/ { printf("%s\n",$2) }' */
-#define RULES \
-static Rule rule[] = { \
-	/* class:instance:title regex	tags regex	versatile */ \
-	{ "Gimp",			NULL,		True }, \
-	{ "MPlayer",			NULL,		True }, \
-	{ "Acroread",			NULL,		True }, \
-};