config.def.h
author Stiletto <blasux@blasux.ru>
Wed, 02 Feb 2011 22:33:33 +0300
branchstil
changeset 1533 e2e1cbb46541
parent 1531 606ac98e35df
child 1534 ff21639cb978
permissions -rw-r--r--
Man, why the fuck you put the binaries and your config in the repo?
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
910
c13cb8c6b7a5 referred to LICENSE file
Anselm R. Garbe <arg@suckless.org>
parents: 909
diff changeset
     1
/* See LICENSE file for copyright and license details. */
146
f328ce9c558c centralized/externalized configuration to config.h
arg@10ksloc.org
parents:
diff changeset
     2
798
2c42d9e7f79c cleaned up and commented the config.*.h
Anselm R. Garbe <arg@suckless.org>
parents: 788
diff changeset
     3
/* appearance */
1531
606ac98e35df Pango patch,
Stiletto <blasux@blasux.ru>
parents: 1514
diff changeset
     4
static const char font[]            = "Sans 8";
1275
e121660425a0 removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents: 1272
diff changeset
     5
static const char normbordercolor[] = "#cccccc";
e121660425a0 removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents: 1272
diff changeset
     6
static const char normbgcolor[]     = "#cccccc";
e121660425a0 removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents: 1272
diff changeset
     7
static const char normfgcolor[]     = "#000000";
e121660425a0 removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents: 1272
diff changeset
     8
static const char selbordercolor[]  = "#0066ff";
e121660425a0 removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents: 1272
diff changeset
     9
static const char selbgcolor[]      = "#0066ff";
e121660425a0 removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents: 1272
diff changeset
    10
static const char selfgcolor[]      = "#ffffff";
1452
769fb14ae867 introducing const where it might make some sense
Anselm R Garbe <anselm@garbe.us>
parents: 1445
diff changeset
    11
static const unsigned int borderpx  = 1;        /* border pixel of windows */
769fb14ae867 introducing const where it might make some sense
Anselm R Garbe <anselm@garbe.us>
parents: 1445
diff changeset
    12
static const unsigned int snap      = 32;       /* snap pixel */
769fb14ae867 introducing const where it might make some sense
Anselm R Garbe <anselm@garbe.us>
parents: 1445
diff changeset
    13
static const Bool showbar           = True;     /* False means no bar */
769fb14ae867 introducing const where it might make some sense
Anselm R Garbe <anselm@garbe.us>
parents: 1445
diff changeset
    14
static const Bool topbar            = True;     /* False means bottom bar */
1398
597063a22a73 experimental xinerama support, two new actions, Mod1-w/e and Mod1-Shift-w/e
Anselm R Garbe <anselm@garbe.us>
parents: 1396
diff changeset
    15
1117
fac7660be3de renamed monocle into maxmise, documented the keybindings in dwm(1)
anselm@anselm1
parents: 1116
diff changeset
    16
/* tagging */
1396
440dda47ae5b removed MAXTAGLEN
Anselm R Garbe <garbeam@gmail.com>
parents: 1392
diff changeset
    17
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
1106
084b17f96d9b proceeded, though we still miss a real Tag struct
anselm@anselm1
parents: 1105
diff changeset
    18
1452
769fb14ae867 introducing const where it might make some sense
Anselm R Garbe <anselm@garbe.us>
parents: 1445
diff changeset
    19
static const Rule rules[] = {
1458
e30739eebeed extended rule to apply monitors if set up accordingly
Anselm R Garbe <anselm@garbe.us>
parents: 1454
diff changeset
    20
	/* class      instance    title       tags mask     isfloating   monitor */
e30739eebeed extended rule to apply monitors if set up accordingly
Anselm R Garbe <anselm@garbe.us>
parents: 1454
diff changeset
    21
	{ "Gimp",     NULL,       NULL,       0,            True,        -1 },
e30739eebeed extended rule to apply monitors if set up accordingly
Anselm R Garbe <anselm@garbe.us>
parents: 1454
diff changeset
    22
	{ "Firefox",  NULL,       NULL,       1 << 8,       False,       -1 },
798
2c42d9e7f79c cleaned up and commented the config.*.h
Anselm R. Garbe <arg@suckless.org>
parents: 788
diff changeset
    23
};
787
9728e9e85f93 changed some odering in config*.h
Anselm R. Garbe <arg@suckless.org>
parents: 785
diff changeset
    24
1190
c8eaba1445a4 removed Geom stuff, introduced updategeom() again, still view is somewhat broken?
Anselm R Garbe <garbeam@gmail.com>
parents: 1189
diff changeset
    25
/* layout(s) */
1452
769fb14ae867 introducing const where it might make some sense
Anselm R Garbe <anselm@garbe.us>
parents: 1445
diff changeset
    26
static const float mfact      = 0.55; /* factor of master area size [0.05..0.95] */
1490
e3492f42fc39 applied Tony Lainson's config.def.h patch
Anselm R Garbe <garbeam@gmail.com>
parents: 1458
diff changeset
    27
static const Bool resizehints = True; /* True means respect size hints in tiled resizals */
1209
c2dc0bd92158 recent changes, introduced togglebar, changed some defines into variable declarations where possible
Anselm R Garbe <garbeam@gmail.com>
parents: 1207
diff changeset
    28
1452
769fb14ae867 introducing const where it might make some sense
Anselm R Garbe <anselm@garbe.us>
parents: 1445
diff changeset
    29
static const Layout layouts[] = {
1237
7af79b380a77 removed Layout->updategeom, unnecessary
Anselm R Garbe <garbeam@gmail.com>
parents: 1235
diff changeset
    30
	/* symbol     arrange function */
1289
064cfe1e8f84 untested monocle
Anselm R Garbe <garbeam@gmail.com>
parents: 1286
diff changeset
    31
	{ "[]=",      tile },    /* first entry is default */
064cfe1e8f84 untested monocle
Anselm R Garbe <garbeam@gmail.com>
parents: 1286
diff changeset
    32
	{ "><>",      NULL },    /* no layout function means floating behavior */
1305
027ae8f1bd1d removed useless comment
Anselm R Garbe <garbeam@gmail.com>
parents: 1301
diff changeset
    33
	{ "[M]",      monocle },
787
9728e9e85f93 changed some odering in config*.h
Anselm R. Garbe <arg@suckless.org>
parents: 785
diff changeset
    34
};
1531
606ac98e35df Pango patch,
Stiletto <blasux@blasux.ru>
parents: 1514
diff changeset
    35
static const int deflayouts[] = { 0, 0, 0,  0, 0, 0,  0, 0, 0 };
787
9728e9e85f93 changed some odering in config*.h
Anselm R. Garbe <arg@suckless.org>
parents: 785
diff changeset
    36
798
2c42d9e7f79c cleaned up and commented the config.*.h
Anselm R. Garbe <arg@suckless.org>
parents: 788
diff changeset
    37
/* key definitions */
1199
94ecece0f25d renamed setlayout into togglelayout
Anselm R Garbe <garbeam@gmail.com>
parents: 1192
diff changeset
    38
#define MODKEY Mod1Mask
1235
13f86ee1a8e6 applied yiyus domax patch with slight modifications
Anselm R Garbe <garbeam@gmail.com>
parents: 1232
diff changeset
    39
#define TAGKEYS(KEY,TAG) \
1270
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    40
	{ MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    41
	{ MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    42
	{ MODKEY|ShiftMask,             KEY,      tag,            {.ui = 1 << TAG} }, \
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    43
	{ MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} },
1235
13f86ee1a8e6 applied yiyus domax patch with slight modifications
Anselm R Garbe <garbeam@gmail.com>
parents: 1232
diff changeset
    44
1272
Anselm R Garbe <garbeam@gmail.com>
parents: 1270
diff changeset
    45
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
1275
e121660425a0 removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents: 1272
diff changeset
    46
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
e121660425a0 removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents: 1272
diff changeset
    47
e121660425a0 removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents: 1272
diff changeset
    48
/* commands */
e121660425a0 removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents: 1272
diff changeset
    49
static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
e121660425a0 removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents: 1272
diff changeset
    50
static const char *termcmd[]  = { "uxterm", NULL };
1265
f3b595da1c6b added nsz' patch
Anselm R Garbe <garbeam@gmail.com>
parents: 1261
diff changeset
    51
1260
2d3d08d2dd19 applied anydot's patchset.diff
Anselm R Garbe <garbeam@gmail.com>
parents: 1250
diff changeset
    52
static Key keys[] = {
1199
94ecece0f25d renamed setlayout into togglelayout
Anselm R Garbe <garbeam@gmail.com>
parents: 1192
diff changeset
    53
	/* modifier                     key        function        argument */
1275
e121660425a0 removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents: 1272
diff changeset
    54
	{ MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
e121660425a0 removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents: 1272
diff changeset
    55
	{ MODKEY|ShiftMask,             XK_Return, spawn,          {.v = termcmd } },
1270
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    56
	{ MODKEY,                       XK_b,      togglebar,      {0} },
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    57
	{ MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    58
	{ MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    59
	{ MODKEY,                       XK_h,      setmfact,       {.f = -0.05} },
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    60
	{ MODKEY,                       XK_l,      setmfact,       {.f = +0.05} },
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    61
	{ MODKEY,                       XK_Return, zoom,           {0} },
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    62
	{ MODKEY,                       XK_Tab,    view,           {0} },
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    63
	{ MODKEY|ShiftMask,             XK_c,      killclient,     {0} },
1289
064cfe1e8f84 untested monocle
Anselm R Garbe <garbeam@gmail.com>
parents: 1286
diff changeset
    64
	{ MODKEY,                       XK_t,      setlayout,      {.v = &layouts[0]} },
064cfe1e8f84 untested monocle
Anselm R Garbe <garbeam@gmail.com>
parents: 1286
diff changeset
    65
	{ MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
064cfe1e8f84 untested monocle
Anselm R Garbe <garbeam@gmail.com>
parents: 1286
diff changeset
    66
	{ MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },
064cfe1e8f84 untested monocle
Anselm R Garbe <garbeam@gmail.com>
parents: 1286
diff changeset
    67
	{ MODKEY,                       XK_space,  setlayout,      {0} },
1270
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    68
	{ MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
1260
2d3d08d2dd19 applied anydot's patchset.diff
Anselm R Garbe <garbeam@gmail.com>
parents: 1250
diff changeset
    69
	{ MODKEY,                       XK_0,      view,           {.ui = ~0 } },
2d3d08d2dd19 applied anydot's patchset.diff
Anselm R Garbe <garbeam@gmail.com>
parents: 1250
diff changeset
    70
	{ MODKEY|ShiftMask,             XK_0,      tag,            {.ui = ~0 } },
1445
4ad1f24d38ec changed focusmon/tagmon to work on prev/next instead (-1/+1), changed shortcuts to Mod1-, Mod1-. and Mod1-Shift-, Mod1-Shift-.
Anselm R Garbe <anselm@garbe.us>
parents: 1442
diff changeset
    71
	{ MODKEY,                       XK_comma,  focusmon,       {.i = -1 } },
4ad1f24d38ec changed focusmon/tagmon to work on prev/next instead (-1/+1), changed shortcuts to Mod1-, Mod1-. and Mod1-Shift-, Mod1-Shift-.
Anselm R Garbe <anselm@garbe.us>
parents: 1442
diff changeset
    72
	{ MODKEY,                       XK_period, focusmon,       {.i = +1 } },
4ad1f24d38ec changed focusmon/tagmon to work on prev/next instead (-1/+1), changed shortcuts to Mod1-, Mod1-. and Mod1-Shift-, Mod1-Shift-.
Anselm R Garbe <anselm@garbe.us>
parents: 1442
diff changeset
    73
	{ MODKEY|ShiftMask,             XK_comma,  tagmon,         {.i = -1 } },
4ad1f24d38ec changed focusmon/tagmon to work on prev/next instead (-1/+1), changed shortcuts to Mod1-, Mod1-. and Mod1-Shift-, Mod1-Shift-.
Anselm R Garbe <anselm@garbe.us>
parents: 1442
diff changeset
    74
	{ MODKEY|ShiftMask,             XK_period, tagmon,         {.i = +1 } },
1270
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    75
	TAGKEYS(                        XK_1,                      0)
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    76
	TAGKEYS(                        XK_2,                      1)
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    77
	TAGKEYS(                        XK_3,                      2)
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    78
	TAGKEYS(                        XK_4,                      3)
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    79
	TAGKEYS(                        XK_5,                      4)
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    80
	TAGKEYS(                        XK_6,                      5)
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    81
	TAGKEYS(                        XK_7,                      6)
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    82
	TAGKEYS(                        XK_8,                      7)
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    83
	TAGKEYS(                        XK_9,                      8)
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    84
	{ MODKEY|ShiftMask,             XK_q,      quit,           {0} },
146
f328ce9c558c centralized/externalized configuration to config.h
arg@10ksloc.org
parents:
diff changeset
    85
};
1270
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    86
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    87
/* button definitions */
1490
e3492f42fc39 applied Tony Lainson's config.def.h patch
Anselm R Garbe <garbeam@gmail.com>
parents: 1458
diff changeset
    88
/* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
1270
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    89
static Button buttons[] = {
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    90
	/* click                event mask      button          function        argument */
1289
064cfe1e8f84 untested monocle
Anselm R Garbe <garbeam@gmail.com>
parents: 1286
diff changeset
    91
	{ ClkLtSymbol,          0,              Button1,        setlayout,      {0} },
064cfe1e8f84 untested monocle
Anselm R Garbe <garbeam@gmail.com>
parents: 1286
diff changeset
    92
	{ ClkLtSymbol,          0,              Button3,        setlayout,      {.v = &layouts[2]} },
1270
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    93
	{ ClkWinTitle,          0,              Button2,        zoom,           {0} },
1275
e121660425a0 removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents: 1272
diff changeset
    94
	{ ClkStatusText,        0,              Button2,        spawn,          {.v = termcmd } },
1270
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    95
	{ ClkClientWin,         MODKEY,         Button1,        movemouse,      {0} },
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    96
	{ ClkClientWin,         MODKEY,         Button2,        togglefloating, {0} },
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
    97
	{ ClkClientWin,         MODKEY,         Button3,        resizemouse,    {0} },
1301
45e486845a1f removed useless characters
Anselm R Garbe <garbeam@gmail.com>
parents: 1295
diff changeset
    98
	{ ClkTagBar,            0,              Button1,        view,           {0} },
45e486845a1f removed useless characters
Anselm R Garbe <garbeam@gmail.com>
parents: 1295
diff changeset
    99
	{ ClkTagBar,            0,              Button3,        toggleview,     {0} },
45e486845a1f removed useless characters
Anselm R Garbe <garbeam@gmail.com>
parents: 1295
diff changeset
   100
	{ ClkTagBar,            MODKEY,         Button1,        tag,            {0} },
1295
9f20458e3bbc applied Gottox' ClkTagBar patch
Anselm R Garbe <garbeam@gmail.com>
parents: 1289
diff changeset
   101
	{ ClkTagBar,            MODKEY,         Button3,        toggletag,      {0} },
1270
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
   102
};
262ee84a2fdb integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents: 1269
diff changeset
   103