config.def.h (6825B)
1 /* See LICENSE file for copyright and license details. */ 2 3 /* appearance */ 4 static const unsigned int borderpx = 1; /* border pixel of windows */ 5 static const unsigned int snap = 32; /* snap pixel */ 6 static const int showbar = 1; /* 0 means no bar */ 7 static const int topbar = 1; /* 0 means bottom bar */ 8 static const char font[] = "monospace:size=10"; 9 static const char dmenufont[] = "monospace:size=10"; 10 static const char col_gray1[] = "#222222"; 11 static const char col_gray2[] = "#444444"; 12 static const char col_gray3[] = "#bbbbbb"; 13 static const char col_gray4[] = "#eeeeee"; 14 static const char col_cyan[] = "#005577"; 15 static const char *colors[][3] = { 16 /* fg bg border */ 17 [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, 18 [SchemeSel] = { col_gray4, col_cyan, col_cyan }, 19 }; 20 21 /* tagging */ 22 static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; 23 24 static const struct Rule rules[] = { 25 /* app_id title tags mask isfloating monitor */ 26 { "gimp", NULL, 0, 1, -1 }, 27 { "firefox", NULL, 1 << 8, 0, -1 }, 28 }; 29 30 /* layout(s) */ 31 static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ 32 static const int nmaster = 1; /* number of clients in master area */ 33 static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ 34 static const int refreshrate = 120; /* refresh rate (per second) for client move/resize */ 35 36 static const struct Layout layouts[] = { 37 /* symbol arrange function */ 38 { "[]=", tile }, /* first entry is default */ 39 { "><>", NULL }, /* no layout function means floating behavior */ 40 { "[M]", monocle }, 41 }; 42 43 /* key definitions */ 44 #define MODKEY SWC_MOD_ALT /* set to SWC_MOD_LOGO for Super Key */ 45 #define TAGKEYS(KEY,TAG) \ 46 { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ 47 { MODKEY|SWC_MOD_CTRL, KEY, toggleview, {.ui = 1 << TAG} }, \ 48 { MODKEY|SWC_MOD_SHIFT, KEY, tag, {.ui = 1 << TAG} }, \ 49 { MODKEY|SWC_MOD_CTRL|SWC_MOD_SHIFT, KEY, toggletag, {.ui = 1 << TAG} }, 50 51 /* helper for spawning shell commands */ 52 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } 53 54 /* commands */ 55 static const char *dmenucmd[] = { "neumenu_run", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; 56 static const char *termcmd[] = { "st-wl", NULL }; 57 58 static const struct Key keys[] = { 59 /* modifier key function argument */ 60 { MODKEY, XKB_KEY_p, spawn, {.v = dmenucmd } }, 61 { MODKEY|SWC_MOD_SHIFT, XKB_KEY_Return, spawn, {.v = termcmd } }, 62 { MODKEY, XKB_KEY_b, togglebar, {0} }, 63 { MODKEY, XKB_KEY_j, focusstack, {.i = +1 } }, 64 { MODKEY, XKB_KEY_k, focusstack, {.i = -1 } }, 65 { MODKEY, XKB_KEY_i, incnmaster, {.i = +1 } }, 66 { MODKEY, XKB_KEY_d, incnmaster, {.i = -1 } }, 67 { MODKEY, XKB_KEY_h, setmfact, {.f = -0.05} }, 68 { MODKEY, XKB_KEY_l, setmfact, {.f = +0.05} }, 69 { MODKEY, XKB_KEY_Return, zoom, {0} }, 70 { MODKEY, XKB_KEY_Tab, view, {0} }, 71 { MODKEY|SWC_MOD_SHIFT, XKB_KEY_c, killclient, {0} }, 72 { MODKEY, XKB_KEY_t, setlayout, {.v = &layouts[0]} }, 73 { MODKEY, XKB_KEY_f, setlayout, {.v = &layouts[1]} }, 74 { MODKEY, XKB_KEY_m, setlayout, {.v = &layouts[2]} }, 75 { MODKEY|SWC_MOD_SHIFT, XKB_KEY_f, togglefullscreen, {0} }, 76 { MODKEY, XKB_KEY_space, setlayout, {0} }, 77 { MODKEY|SWC_MOD_SHIFT, XKB_KEY_space, togglefloating, {0} }, 78 { MODKEY, XKB_KEY_0, view, {.ui = ~0 } }, 79 { MODKEY|SWC_MOD_SHIFT, XKB_KEY_0, tag, {.ui = ~0 } }, 80 { MODKEY, XKB_KEY_comma, focusmon, {.i = -1 } }, 81 { MODKEY, XKB_KEY_period, focusmon, {.i = +1 } }, 82 { MODKEY|SWC_MOD_SHIFT, XKB_KEY_comma, tagmon, {.i = -1 } }, 83 { MODKEY|SWC_MOD_SHIFT, XKB_KEY_period, tagmon, {.i = +1 } }, 84 TAGKEYS( XKB_KEY_1, 0) 85 TAGKEYS( XKB_KEY_2, 1) 86 TAGKEYS( XKB_KEY_3, 2) 87 TAGKEYS( XKB_KEY_4, 3) 88 TAGKEYS( XKB_KEY_5, 4) 89 TAGKEYS( XKB_KEY_6, 5) 90 TAGKEYS( XKB_KEY_7, 6) 91 TAGKEYS( XKB_KEY_8, 7) 92 TAGKEYS( XKB_KEY_9, 8) 93 { MODKEY|SWC_MOD_SHIFT, XKB_KEY_q, quit, {0} }, 94 }; 95 96 /* button definitions */ 97 /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ 98 static const struct Button buttons[] = { 99 /* click event mask button function argument */ 100 { ClkLtSymbol, 0, Button1, setlayout, {0} }, 101 { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, 102 { ClkWinTitle, 0, Button2, zoom, {0} }, 103 { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, 104 { ClkClientWin, MODKEY, Button1, movemouse, {0} }, 105 { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, 106 { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, 107 { ClkTagBar, 0, Button1, view, {0} }, 108 { ClkTagBar, 0, Button3, toggleview, {0} }, 109 { ClkTagBar, MODKEY, Button1, tag, {0} }, 110 { ClkTagBar, MODKEY, Button3, toggletag, {0} }, 111 }; 112