aboutsummaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorc2023-12-06 16:03:15 -0500
committerc2023-12-06 16:03:15 -0500
commit5f6eff938bcf9c1ef32ad6b5749766fc7cbc1751 (patch)
tree5e55875f8f5f82871ebdae8832777199af2b52e2 /config.h
parent6bf8456862368e600a1ced1aeb2cf4358c3df25a (diff)
More patches. Things are broken. I do not care.
Diffstat (limited to 'config.h')
-rw-r--r--config.h51
1 files changed, 35 insertions, 16 deletions
diff --git a/config.h b/config.h
index ea0b97a..08c8f92 100644
--- a/config.h
+++ b/config.h
@@ -2,9 +2,10 @@
/* Appearance. */
static unsigned int borderpx = 5; /* border pixel of windows */
-static unsigned int snap = 32; /* snap pixel */
+const static unsigned int snap= 48; /* snap pixel */
static unsigned int gappx = 15;
+static const int swallowfloating = 1; /* Swallow floating windows by default. */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static int sidepad = 15;
@@ -38,10 +39,12 @@ static const int resizehints = 0; /* 1 means respect size hints in tiled
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
static const Layout layouts[] = {
- /* Symbol, layout. */
- { "[]=", tile }, /* First entry is default. */
- { "><>", NULL }, /* No layout function means floating behavior. */
- { "[M]", monocle }, /* Active window fills all available space. */
+ /* Symbol, layout. */
+ { "[]=", tile }, /* First entry is default. */
+ { "><>", NULL }, /* No layout function means floating behavior. */
+ { "[M]", monocle }, /* Active window fills all available space. */
+ { "|M|", centeredmaster }, /* Centered master window. */
+ { "-M-", centeredfloatingmaster }, /* Floating centered master window. */
};
/* Xresources. */
@@ -55,7 +58,6 @@ ResourcePref resources[] = {
{"bor_px", INTEGER, &borderpx },
{"sidepad", INTEGER, &sidepad },
{"vertpad", INTEGER, &vertpad },
- {"snap_px", INTEGER, &snap },
{"gap_px", INTEGER, &gappx },
{"mfact", FLOAT, &mfact },
{"font", STRING, &font },
@@ -66,9 +68,15 @@ ResourcePref resources[] = {
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
static const Rule rules[] = {
- /* Class instance, title, tags mask, is floating, monitor. */
- { "Gimp", NULL, NULL, 0, 1, -1 },
- { "Firefox", NULL, NULL, 1 << 8, 0, -1 },
+ /* xprop(1):
+ * WM_CLASS(STRING) = instance, class
+ * WM_NAME(STRING) = title
+ */
+ /* class instance title tags mask isfloating isterminal noswallow monitor */
+ { "Gimp", NULL, NULL, 0, 1, 0, 0, -1 },
+ { "Firefox", NULL, NULL, 1 << 8, 0, 0, -1, -1 },
+ { "St", NULL, NULL, 0, 0, 1, 0, -1 },
+ { NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 }, /* xev */
};
/* Key definitions. */
@@ -114,16 +122,27 @@ static const Key keys[] = {
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY|ShiftMask, XK_j, movestack, {.i = +1 } },
{ MODKEY|ShiftMask, XK_k, movestack, {.i = -1 } },
- { MODKEY, XK_i, incnmaster, {.i = +1 } }, /* Increase the number of master windows. */
- { MODKEY, XK_d, incnmaster, {.i = -1 } }, /* Decrease the number of master windows. */
+ { MODKEY, XK_x, incnmaster, {.i = +1 } }, /* Increase the number of master windows. */
+ { MODKEY, XK_z, incnmaster, {.i = -1 } }, /* Decrease the number of master windows. */
{ MODKEY, XK_h, setmfact, {.f = -0.05} }, /* Increase master/stack ratio. */
{ MODKEY, XK_l, setmfact, {.f = +0.05} }, /* Decrease master/stack ratio. */
{ MODKEY, XK_q, killclient, {0} }, /* Kill active window. */
+ { MODKEY, XK_Down, moveresize, {.v = (int []){ 0, snap, 0, 0 }} },
+ { MODKEY, XK_Up, moveresize, {.v = (int []){ 0, -snap, 0, 0 }} },
+ { MODKEY, XK_Right, moveresize, {.v = (int []){ snap, 0, 0, 0 }} },
+ { MODKEY, XK_Left, moveresize, {.v = (int []){ -snap, 0, 0, 0 }} },
+ { MODKEY|ShiftMask, XK_Down, moveresize, {.v = (int []){ snap/2, snap/2, -snap, -snap }} },
+ { MODKEY|ShiftMask, XK_Up, moveresize, {.v = (int []){ -snap/2, -snap/2, snap, snap }} },
+ { MODKEY|ShiftMask, XK_Right, moveresize, {.v = (int []){ -snap/2, 0, snap, 0 }} },
+ { MODKEY|ShiftMask, XK_Left, moveresize, {.v = (int []){ snap/2, 0, -snap, 0 }} },
+
/* Layouts. */
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, /* Default master/stack layout. */
{ MODKEY, XK_y, setlayout, {.v = &layouts[1]} }, /* Floating layout. */
{ MODKEY, XK_u, setlayout, {.v = &layouts[2]} }, /* Monocle layout. */
+ { MODKEY, XK_i, setlayout, {.v = &layouts[3]} }, /* Centered master layout. */
+ { MODKEY|ShiftMask, XK_i, setlayout, {.v = &layouts[4]} }, /* Floating centered master layout. */
{ MODKEY|ShiftMask, XK_f, togglefloating, {0} }, /* Toggle floating layout for a window. */
{ MODKEY, XK_f, togglefullscr, {0} }, /* Toggle fullscreen for a window. */
@@ -163,11 +182,11 @@ static const Key keys[] = {
/* A click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin. */
static const Button buttons[] = {
/* Click, mask, button, function, argument. */
- { ClkLtSymbol, 0, Button1, setlayout, {0} },
- { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
- { ClkWinTitle, 0, Button2, zoom, {0} },
- { ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
- { ClkClientWin, MODKEY, Button1, movemouse, {0} },
+ { ClkLtSymbol, 0, Button1, setlayout, {0} },
+ { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
+ { ClkWinTitle, 0, Button2, zoom, {0} },
+ { ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
+ { ClkClientWin, MODKEY, Button1, movemouse, {0} },
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
{ ClkTagBar, 0, Button1, view, {0} },