diff options
Diffstat (limited to 'config.def.h')
| -rw-r--r-- | config.def.h | 221 |
1 files changed, 108 insertions, 113 deletions
diff --git a/config.def.h b/config.def.h index b678309..9f6be48 100644 --- a/config.def.h +++ b/config.def.h | |||
| @@ -1,137 +1,132 @@ | |||
| 1 | static const unsigned int borderpx = 0; /* border pixel of windows */ | 1 | static const unsigned int borderpx = 0; /* border pixel of windows */ |
| 2 | static const unsigned int snap = 32; /* snap pixel */ | 2 | static const unsigned int snap = 32; /* snap pixel */ |
| 3 | static const unsigned int gappih = 10; /* horiz inner gap between windows */ | 3 | static const unsigned int systraypinning = |
| 4 | static const unsigned int gappiv = 10; /* vert inner gap between windows */ | 4 | 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor |
| 5 | static const unsigned int gappoh = 10; /* horiz outer gap between windows and screen edge */ | 5 | X */ |
| 6 | static const unsigned int gappov = 10; /* vert outer gap between windows and screen edge */ | 6 | static const unsigned int systrayonleft = |
| 7 | static const int smartgaps = 0; /* 1 means no outer gap when there is only one window */ | 7 | 0; /* 0: systray in the right corner, >0: systray on left of status text */ |
| 8 | static const int showbar = 1; /* 0 means no bar */ | 8 | static const unsigned int systrayspacing = 2; /* systray spacing */ |
| 9 | static const int topbar = 1; /* 0 means bottom bar */ | 9 | static const int systraypinningfailfirst = |
| 10 | static const char *fonts[] = { "monospace:size=10" }; | 10 | 1; /* 1: if pinning fails, display systray on the first monitor, False: |
| 11 | static const char dmenufont[] = "monospace:size=10"; | 11 | display systray on the last monitor*/ |
| 12 | static const char col_gray1[] = "#222222"; | 12 | static const int showsystray = 1; /* 0 means no systray */ |
| 13 | static const char col_gray2[] = "#444444"; | 13 | static const unsigned int gappih = 10; /* horiz inner gap between windows */ |
| 14 | static const char col_gray3[] = "#bbbbbb"; | 14 | static const unsigned int gappiv = 10; /* vert inner gap between windows */ |
| 15 | static const char col_gray4[] = "#eeeeee"; | 15 | static const unsigned int gappoh = |
| 16 | static const char col_cyan[] = "#005577"; | 16 | 10; /* horiz outer gap between windows and screen edge */ |
| 17 | static const char *colors[][3] = { | 17 | static const unsigned int gappov = |
| 18 | /* fg bg border */ | 18 | 10; /* vert outer gap between windows and screen edge */ |
| 19 | [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, | 19 | static const int smartgaps = |
| 20 | [SchemeSel] = { col_gray4, col_cyan, col_cyan }, | 20 | 0; /* 1 means no outer gap when there is only one window */ |
| 21 | static const int swallowfloating = | ||
| 22 | 1; /* 1 means no outer gap when there is only one window */ | ||
| 23 | static const int showbar = 0; /* 0 means no bar */ | ||
| 24 | static const int topbar = 1; /* 0 means bottom bar */ | ||
| 25 | static const char *fonts[] = {"monospace:size=10"}; | ||
| 26 | static const char dmenufont[] = "monospace:size=10"; | ||
| 27 | static const char col_gray1[] = "#222222"; | ||
| 28 | static const char col_gray2[] = "#444444"; | ||
| 29 | static const char col_gray3[] = "#bbbbbb"; | ||
| 30 | static const char col_gray4[] = "#eeeeee"; | ||
| 31 | static const char col_cyan[] = "#005577"; | ||
| 32 | static const char norm_fg[] = "#bfbfbf"; | ||
| 33 | static const char norm_bg[] = "#000001"; | ||
| 34 | static const char norm_border[] = "#3f3f40"; | ||
| 35 | |||
| 36 | static const char sel_fg[] = "#bfbfbf"; | ||
| 37 | static const char sel_bg[] = "#5A4A63"; | ||
| 38 | static const char sel_border[] = "#bfbfbf"; | ||
| 39 | |||
| 40 | static const char urg_fg[] = "#bfbfbf"; | ||
| 41 | static const char urg_bg[] = "#501C61"; | ||
| 42 | static const char urg_border[] = "#501C61"; | ||
| 43 | |||
| 44 | static const char *colors[][3] = { | ||
| 45 | /* fg bg border */ | ||
| 46 | [SchemeNorm] = {norm_fg, norm_bg, norm_border}, // unfocused wins | ||
| 47 | [SchemeSel] = {sel_fg, sel_bg, sel_border}, // the focused win | ||
| 21 | }; | 48 | }; |
| 22 | 49 | ||
| 23 | /* tagging */ | 50 | /* tagging */ |
| 24 | static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; | 51 | static const char *tags[] = {"1", "2", "3", "4", "5", "6", "7", "8", "9"}; |
| 25 | 52 | ||
| 26 | static const Rule rules[] = { | 53 | static const Rule rules[] = { |
| 27 | /* xprop(1): | 54 | /* class instance title tags mask isfloating isterminal |
| 28 | * WM_CLASS(STRING) = instance, class | 55 | noswallow monitor */ |
| 29 | * WM_NAME(STRING) = title | 56 | {"St", NULL, NULL, 0, 0, 1, 0, -1}, |
| 30 | */ | 57 | {NULL, NULL, "Event Tester", 0, 0, 0, 1, -1}, /* xev */ |
| 31 | /* class instance title tags mask isfloating isterminal noswallow monitor */ | ||
| 32 | { "Gimp", NULL, NULL, 0, 1, 0, 0, -1 }, | ||
| 33 | { "Brave", NULL, NULL, 1 << 8, 0, 0, -1, -1 }, | ||
| 34 | { "St", NULL, NULL, 0, 0, 1, 0, -1 }, | ||
| 35 | { NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 }, /* xev */ | ||
| 36 | }; | 58 | }; |
| 37 | 59 | ||
| 38 | /* layout(s) */ | 60 | /* layout(s) */ |
| 39 | static const float mfact = 0.50; /* factor of master area size [0.05..0.95] */ | 61 | static const float mfact = 0.50; /* factor of master area size [0.05..0.95] */ |
| 40 | static const int nmaster = 1; /* number of clients in master area */ | 62 | static const int nmaster = 1; /* number of clients in master area */ |
| 41 | static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */ | 63 | static const int resizehints = |
| 42 | static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ | 64 | 0; /* 1 means respect size hints in tiled resizals */ |
| 65 | static const int lockfullscreen = | ||
| 66 | 1; /* 1 will force focus on the fullscreen window */ | ||
| 43 | 67 | ||
| 44 | static const Layout layouts[] = { | 68 | static const Layout layouts[] = { |
| 45 | /* symbol arrange function */ | 69 | /* symbol arrange function */ |
| 46 | { "[]=", tile }, /* first entry is default */ | 70 | {"[]=", tile}, /* first entry is default */ |
| 47 | { "><>", NULL }, /* no layout function means floating behavior */ | 71 | {"><>", NULL}, /* no layout function means floating behavior */ |
| 48 | { "[M]", monocle }, | 72 | {"[M]", monocle}, |
| 49 | }; | 73 | }; |
| 50 | 74 | ||
| 51 | /* key definitions */ | 75 | /* key definitions */ |
| 52 | #define MODKEY Mod1Mask | 76 | #define MODKEY Mod4Mask |
| 53 | #define TAGKEYS(KEY,TAG) \ | 77 | #define TAGKEYS(KEY, TAG) \ |
| 54 | { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ | 78 | {MODKEY, KEY, view, {.ui = 1 << TAG}}, \ |
| 55 | { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ | 79 | {MODKEY | ControlMask, KEY, toggleview, {.ui = 1 << TAG}}, \ |
| 56 | { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ | 80 | {MODKEY | ShiftMask, KEY, tag, {.ui = 1 << TAG}}, \ |
| 57 | { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, | 81 | {MODKEY | ControlMask | ShiftMask, KEY, toggletag, {.ui = 1 << TAG}}, |
| 58 | 82 | ||
| 59 | /* helper for spawning shell commands in the pre dwm-5.0 fashion */ | 83 | /* helper for spawning shell commands in the pre dwm-5.0 fashion */ |
| 60 | #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } | 84 | #define SHCMD(cmd) \ |
| 85 | { \ | ||
| 86 | .v = (const char *[]) { "/bin/sh", "-c", cmd, NULL } \ | ||
| 87 | } | ||
| 61 | 88 | ||
| 62 | /* commands */ | 89 | /* commands */ |
| 63 | static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ | 90 | static char dmenumon[2] = |
| 64 | static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; | 91 | "0"; /* component of dmenucmd, manipulated in spawn() */ |
| 65 | static const char *termcmd[] = { "st", NULL }; | 92 | // static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", |
| 93 | // dmenufont, "-nb", norm_bg, "-nf", norm_fg, "-sb", sel_bg, "-sf", sel_fg, NULL | ||
| 94 | // }; | ||
| 95 | static const char *dmenucmd[] = {"dmenu_run", "-m", dmenumon, NULL}; | ||
| 96 | static const char *termcmd[] = {"st", NULL}; | ||
| 66 | 97 | ||
| 67 | static const Key keys[] = { | 98 | static const Key keys[] = { |
| 68 | /* modifier key function argument */ | 99 | /* modifier key function argument */ |
| 69 | { MODKEY, XK_p, spawn, {.v = dmenucmd } }, | 100 | {MODKEY, XK_d, spawn, {.v = dmenucmd}}, |
| 70 | { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, | 101 | {MODKEY, XK_Return, spawn, {.v = termcmd}}, |
| 71 | { MODKEY, XK_b, togglebar, {0} }, | 102 | {MODKEY, XK_b, togglebar, {0}}, |
| 72 | { MODKEY, XK_j, focusstack, {.i = +1 } }, | 103 | {MODKEY, XK_q, killclient, {0}}, |
| 73 | { MODKEY, XK_k, focusstack, {.i = -1 } }, | 104 | {MODKEY, XK_f, togglefullscr, {0}}, |
| 74 | { MODKEY, XK_i, incnmaster, {.i = +1 } }, | 105 | {MODKEY, XK_space, setlayout, {0}}, |
| 75 | { MODKEY, XK_d, incnmaster, {.i = -1 } }, | 106 | {MODKEY | ShiftMask, XK_space, togglefloating, {0}}, |
| 76 | { MODKEY, XK_h, setmfact, {.f = -0.05} }, | 107 | TAGKEYS(XK_1, 0) TAGKEYS(XK_2, 1) TAGKEYS(XK_3, 2) TAGKEYS(XK_4, 3) |
| 77 | { MODKEY, XK_l, setmfact, {.f = +0.05} }, | 108 | TAGKEYS(XK_5, 4) TAGKEYS(XK_6, 5) TAGKEYS(XK_7, 6) TAGKEYS(XK_8, 7) |
| 78 | { MODKEY|Mod4Mask, XK_h, incrgaps, {.i = +1 } }, | 109 | TAGKEYS(XK_9, 8){MODKEY | ShiftMask, XK_q, quit, {0}}, |
| 79 | { MODKEY|Mod4Mask, XK_l, incrgaps, {.i = -1 } }, | 110 | { 0, XF86XK_MonBrightnessUp, spawn, {.v = (const char*[]){ "xbacklight", "-inc", "15", NULL } } }, |
| 80 | { MODKEY|Mod4Mask|ShiftMask, XK_h, incrogaps, {.i = +1 } }, | 111 | { 0, XF86XK_MonBrightnessDown, spawn, {.v = (const char*[]){ "xbacklight", "-dec", "15", NULL } } }, |
| 81 | { MODKEY|Mod4Mask|ShiftMask, XK_l, incrogaps, {.i = -1 } }, | ||
| 82 | { MODKEY|Mod4Mask|ControlMask, XK_h, incrigaps, {.i = +1 } }, | ||
| 83 | { MODKEY|Mod4Mask|ControlMask, XK_l, incrigaps, {.i = -1 } }, | ||
| 84 | { MODKEY|Mod4Mask, XK_0, togglegaps, {0} }, | ||
| 85 | { MODKEY|Mod4Mask|ShiftMask, XK_0, defaultgaps, {0} }, | ||
| 86 | { MODKEY, XK_y, incrihgaps, {.i = +1 } }, | ||
| 87 | { MODKEY, XK_o, incrihgaps, {.i = -1 } }, | ||
| 88 | { MODKEY|ControlMask, XK_y, incrivgaps, {.i = +1 } }, | ||
| 89 | { MODKEY|ControlMask, XK_o, incrivgaps, {.i = -1 } }, | ||
| 90 | { MODKEY|Mod4Mask, XK_y, incrohgaps, {.i = +1 } }, | ||
| 91 | { MODKEY|Mod4Mask, XK_o, incrohgaps, {.i = -1 } }, | ||
| 92 | { MODKEY|ShiftMask, XK_y, incrovgaps, {.i = +1 } }, | ||
| 93 | { MODKEY|ShiftMask, XK_o, incrovgaps, {.i = -1 } }, | ||
| 94 | { MODKEY, XK_Return, zoom, {0} }, | ||
| 95 | { MODKEY, XK_Tab, view, {0} }, | ||
| 96 | { MODKEY|ShiftMask, XK_c, killclient, {0} }, | ||
| 97 | { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, | ||
| 98 | { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, | ||
| 99 | { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, | ||
| 100 | { MODKEY, XK_space, setlayout, {0} }, | ||
| 101 | { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, | ||
| 102 | { MODKEY|ShiftMask, XK_f, togglefullscr, {0} }, | ||
| 103 | { MODKEY, XK_0, view, {.ui = ~0 } }, | ||
| 104 | { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, | ||
| 105 | { MODKEY, XK_comma, focusmon, {.i = -1 } }, | ||
| 106 | { MODKEY, XK_period, focusmon, {.i = +1 } }, | ||
| 107 | { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, | ||
| 108 | { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, | ||
| 109 | TAGKEYS( XK_1, 0) | ||
| 110 | TAGKEYS( XK_2, 1) | ||
| 111 | TAGKEYS( XK_3, 2) | ||
| 112 | TAGKEYS( XK_4, 3) | ||
| 113 | TAGKEYS( XK_5, 4) | ||
| 114 | TAGKEYS( XK_6, 5) | ||
| 115 | TAGKEYS( XK_7, 6) | ||
| 116 | TAGKEYS( XK_8, 7) | ||
| 117 | TAGKEYS( XK_9, 8) | ||
| 118 | { MODKEY|ShiftMask, XK_q, quit, {0} }, | ||
| 119 | }; | 112 | }; |
| 120 | 113 | ||
| 121 | /* button definitions */ | 114 | /* button definitions */ |
| 122 | /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ | 115 | /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, |
| 116 | * ClkClientWin, or ClkRootWin */ | ||
| 123 | static const Button buttons[] = { | 117 | static const Button buttons[] = { |
| 124 | /* click event mask button function argument */ | 118 | /* click event mask button function argument */ |
| 125 | { ClkTagBar, MODKEY, Button1, tag, {0} }, | 119 | {ClkLtSymbol, 0, Button1, setlayout, {0}}, |
| 126 | { ClkTagBar, MODKEY, Button3, toggletag, {0} }, | 120 | {ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]}}, |
| 127 | { ClkWinTitle, 0, Button2, zoom, {0} }, | 121 | {ClkTagBar, MODKEY, Button1, tag, {0}}, |
| 128 | { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, | 122 | {ClkTagBar, MODKEY, Button3, toggletag, {0}}, |
| 129 | { ClkClientWin, MODKEY, Button1, movemouse, {0} }, | 123 | {ClkWinTitle, 0, Button2, zoom, {0}}, |
| 130 | { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, | 124 | {ClkStatusText, 0, Button2, spawn, {.v = termcmd}}, |
| 131 | { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, | 125 | {ClkClientWin, MODKEY, Button1, movemouse, {0}}, |
| 132 | { ClkTagBar, 0, Button1, view, {0} }, | 126 | {ClkClientWin, MODKEY, Button2, togglefloating, {0}}, |
| 133 | { ClkTagBar, 0, Button3, toggleview, {0} }, | 127 | {ClkClientWin, MODKEY, Button3, resizemouse, {0}}, |
| 134 | { ClkTagBar, MODKEY, Button1, tag, {0} }, | 128 | {ClkTagBar, 0, Button1, view, {0}}, |
| 135 | { ClkTagBar, MODKEY, Button3, toggletag, {0} }, | 129 | {ClkTagBar, 0, Button3, toggleview, {0}}, |
| 130 | {ClkTagBar, MODKEY, Button1, tag, {0}}, | ||
| 131 | {ClkTagBar, MODKEY, Button3, toggletag, {0}}, | ||
| 136 | }; | 132 | }; |
| 137 | |||
