diff options
| author | philw <dscr@duck.com> | 2024-02-18 12:50:42 +0100 |
|---|---|---|
| committer | philw <dscr@duck.com> | 2024-02-18 12:50:42 +0100 |
| commit | afe7f928e1661de422cb3620b724dd3ffcf63f60 (patch) | |
| tree | a3b75733552c71667aed666abde5fdc6f61f8806 /config.h | |
| parent | 2807bbc931a63fddef7c099054b665a5ce71bee4 (diff) | |
| download | dwm-afe7f928e1661de422cb3620b724dd3ffcf63f60.tar.gz dwm-afe7f928e1661de422cb3620b724dd3ffcf63f60.zip | |
Update dwm
Diffstat (limited to 'config.h')
| -rw-r--r-- | config.h | 174 |
1 files changed, 92 insertions, 82 deletions
| @@ -1,25 +1,34 @@ | |||
| 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 systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */ | 3 | static const unsigned int systraypinning = |
| 4 | static const unsigned int systrayonleft = 0; /* 0: systray in the right corner, >0: systray on left of status text */ | 4 | 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor |
| 5 | static const unsigned int systrayspacing = 2; /* systray spacing */ | 5 | X */ |
| 6 | static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/ | 6 | static const unsigned int systrayonleft = |
| 7 | static const int showsystray = 1; /* 0 means no systray */ | 7 | 0; /* 0: systray in the right corner, >0: systray on left of status text */ |
| 8 | static const unsigned int gappih = 10; /* horiz inner gap between windows */ | 8 | static const unsigned int systrayspacing = 2; /* systray spacing */ |
| 9 | static const unsigned int gappiv = 10; /* vert inner gap between windows */ | 9 | static const int systraypinningfailfirst = |
| 10 | static const unsigned int gappoh = 10; /* horiz outer gap between windows and screen edge */ | 10 | 1; /* 1: if pinning fails, display systray on the first monitor, False: |
| 11 | static const unsigned int gappov = 10; /* vert outer gap between windows and screen edge */ | 11 | display systray on the last monitor*/ |
| 12 | static const int smartgaps = 0; /* 1 means no outer gap when there is only one window */ | 12 | static const int showsystray = 1; /* 0 means no systray */ |
| 13 | static const int swallowfloating = 1; /* 1 means no outer gap when there is only one window */ | 13 | static const unsigned int gappih = 10; /* horiz inner gap between windows */ |
| 14 | static const int showbar = 0; /* 0 means no bar */ | 14 | static const unsigned int gappiv = 10; /* vert inner gap between windows */ |
| 15 | static const int topbar = 1; /* 0 means bottom bar */ | 15 | static const unsigned int gappoh = |
| 16 | static const char *fonts[] = { "monospace:size=10" }; | 16 | 10; /* horiz outer gap between windows and screen edge */ |
| 17 | static const char dmenufont[] = "monospace:size=10"; | 17 | static const unsigned int gappov = |
| 18 | static const char col_gray1[] = "#222222"; | 18 | 10; /* vert outer gap between windows and screen edge */ |
| 19 | static const char col_gray2[] = "#444444"; | 19 | static const int smartgaps = |
| 20 | static const char col_gray3[] = "#bbbbbb"; | 20 | 0; /* 1 means no outer gap when there is only one window */ |
| 21 | static const char col_gray4[] = "#eeeeee"; | 21 | static const int swallowfloating = |
| 22 | static const char col_cyan[] = "#005577"; | 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"; | ||
| 23 | static const char norm_fg[] = "#bfbfbf"; | 32 | static const char norm_fg[] = "#bfbfbf"; |
| 24 | static const char norm_bg[] = "#000001"; | 33 | static const char norm_bg[] = "#000001"; |
| 25 | static const char norm_border[] = "#3f3f40"; | 34 | static const char norm_border[] = "#3f3f40"; |
| @@ -32,89 +41,90 @@ static const char urg_fg[] = "#bfbfbf"; | |||
| 32 | static const char urg_bg[] = "#501C61"; | 41 | static const char urg_bg[] = "#501C61"; |
| 33 | static const char urg_border[] = "#501C61"; | 42 | static const char urg_border[] = "#501C61"; |
| 34 | 43 | ||
| 35 | static const char *colors[][3] = { | 44 | static const char *colors[][3] = { |
| 36 | /* fg bg border */ | 45 | /* fg bg border */ |
| 37 | [SchemeNorm] = { norm_fg, norm_bg, norm_border }, // unfocused wins | 46 | [SchemeNorm] = {norm_fg, norm_bg, norm_border}, // unfocused wins |
| 38 | [SchemeSel] = { sel_fg, sel_bg, sel_border }, // the focused win | 47 | [SchemeSel] = {sel_fg, sel_bg, sel_border}, // the focused win |
| 39 | }; | 48 | }; |
| 40 | 49 | ||
| 41 | /* tagging */ | 50 | /* tagging */ |
| 42 | 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"}; |
| 43 | 52 | ||
| 44 | static const Rule rules[] = { | 53 | static const Rule rules[] = { |
| 45 | /* class instance title tags mask isfloating isterminal noswallow monitor */ | 54 | /* class instance title tags mask isfloating isterminal |
| 46 | { "St", NULL, NULL, 0, 0, 1, 0, -1 }, | 55 | noswallow monitor */ |
| 47 | { NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 }, /* xev */ | 56 | {"St", NULL, NULL, 0, 0, 1, 0, -1}, |
| 57 | {NULL, NULL, "Event Tester", 0, 0, 0, 1, -1}, /* xev */ | ||
| 48 | }; | 58 | }; |
| 49 | 59 | ||
| 50 | /* layout(s) */ | 60 | /* layout(s) */ |
| 51 | 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] */ |
| 52 | static const int nmaster = 1; /* number of clients in master area */ | 62 | static const int nmaster = 1; /* number of clients in master area */ |
| 53 | static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */ | 63 | static const int resizehints = |
| 54 | 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 */ | ||
| 55 | 67 | ||
| 56 | static const Layout layouts[] = { | 68 | static const Layout layouts[] = { |
| 57 | /* symbol arrange function */ | 69 | /* symbol arrange function */ |
| 58 | { "[]=", tile }, /* first entry is default */ | 70 | {"[]=", tile}, /* first entry is default */ |
| 59 | { "><>", NULL }, /* no layout function means floating behavior */ | 71 | {"><>", NULL}, /* no layout function means floating behavior */ |
| 60 | { "[M]", monocle }, | 72 | {"[M]", monocle}, |
| 61 | }; | 73 | }; |
| 62 | 74 | ||
| 63 | /* key definitions */ | 75 | /* key definitions */ |
| 64 | #define MODKEY Mod4Mask | 76 | #define MODKEY Mod4Mask |
| 65 | #define TAGKEYS(KEY,TAG) \ | 77 | #define TAGKEYS(KEY, TAG) \ |
| 66 | { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ | 78 | {MODKEY, KEY, view, {.ui = 1 << TAG}}, \ |
| 67 | { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ | 79 | {MODKEY | ControlMask, KEY, toggleview, {.ui = 1 << TAG}}, \ |
| 68 | { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ | 80 | {MODKEY | ShiftMask, KEY, tag, {.ui = 1 << TAG}}, \ |
| 69 | { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, | 81 | {MODKEY | ControlMask | ShiftMask, KEY, toggletag, {.ui = 1 << TAG}}, |
| 70 | 82 | ||
| 71 | /* 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 */ |
| 72 | #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 | } | ||
| 73 | 88 | ||
| 74 | /* commands */ | 89 | /* commands */ |
| 75 | static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ | 90 | static char dmenumon[2] = |
| 76 | //static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", norm_bg, "-nf", norm_fg, "-sb", sel_bg, "-sf", sel_fg, NULL }; | 91 | "0"; /* component of dmenucmd, manipulated in spawn() */ |
| 77 | static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, NULL}; | 92 | // static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", |
| 78 | static const char *termcmd[] = { "st", NULL }; | 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}; | ||
| 79 | 97 | ||
| 80 | static const Key keys[] = { | 98 | static const Key keys[] = { |
| 81 | /* modifier key function argument */ | 99 | /* modifier key function argument */ |
| 82 | { MODKEY, XK_d, spawn, {.v = dmenucmd } }, | 100 | {MODKEY, XK_d, spawn, {.v = dmenucmd}}, |
| 83 | { MODKEY, XK_Return, spawn, {.v = termcmd } }, | 101 | {MODKEY, XK_Return, spawn, {.v = termcmd}}, |
| 84 | { MODKEY, XK_b, togglebar, {0} }, | 102 | {MODKEY, XK_b, togglebar, {0}}, |
| 85 | { MODKEY, XK_q, killclient, {0} }, | 103 | {MODKEY, XK_q, killclient, {0}}, |
| 86 | { MODKEY, XK_f, togglefullscr, {0} }, | 104 | {MODKEY, XK_f, togglefullscr, {0}}, |
| 87 | { MODKEY, XK_space, setlayout, {0} }, | 105 | {MODKEY, XK_space, setlayout, {0}}, |
| 88 | { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, | 106 | {MODKEY | ShiftMask, XK_space, togglefloating, {0}}, |
| 89 | TAGKEYS( XK_1, 0) | 107 | TAGKEYS(XK_1, 0) TAGKEYS(XK_2, 1) TAGKEYS(XK_3, 2) TAGKEYS(XK_4, 3) |
| 90 | TAGKEYS( XK_2, 1) | 108 | TAGKEYS(XK_5, 4) TAGKEYS(XK_6, 5) TAGKEYS(XK_7, 6) TAGKEYS(XK_8, 7) |
| 91 | TAGKEYS( XK_3, 2) | 109 | TAGKEYS(XK_9, 8){MODKEY | ShiftMask, XK_q, quit, {0}}, |
| 92 | TAGKEYS( XK_4, 3) | ||
| 93 | TAGKEYS( XK_5, 4) | ||
| 94 | TAGKEYS( XK_6, 5) | ||
| 95 | TAGKEYS( XK_7, 6) | ||
| 96 | TAGKEYS( XK_8, 7) | ||
| 97 | TAGKEYS( XK_9, 8) | ||
| 98 | { MODKEY|ShiftMask, XK_q, quit, {0} }, | ||
| 99 | }; | 110 | }; |
| 100 | 111 | ||
| 101 | /* button definitions */ | 112 | /* button definitions */ |
| 102 | /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ | 113 | /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, |
| 114 | * ClkClientWin, or ClkRootWin */ | ||
| 103 | static const Button buttons[] = { | 115 | static const Button buttons[] = { |
| 104 | /* click event mask button function argument */ | 116 | /* click event mask button function argument */ |
| 105 | { ClkLtSymbol, 0, Button1, setlayout, {0} }, | 117 | {ClkLtSymbol, 0, Button1, setlayout, {0}}, |
| 106 | { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, | 118 | {ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]}}, |
| 107 | 119 | {ClkTagBar, MODKEY, Button1, tag, {0}}, | |
| 108 | { ClkTagBar, MODKEY, Button1, tag, {0} }, | 120 | {ClkTagBar, MODKEY, Button3, toggletag, {0}}, |
| 109 | { ClkTagBar, MODKEY, Button3, toggletag, {0} }, | 121 | {ClkWinTitle, 0, Button2, zoom, {0}}, |
| 110 | { ClkWinTitle, 0, Button2, zoom, {0} }, | 122 | {ClkStatusText, 0, Button2, spawn, {.v = termcmd}}, |
| 111 | { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, | 123 | {ClkClientWin, MODKEY, Button1, movemouse, {0}}, |
| 112 | { ClkClientWin, MODKEY, Button1, movemouse, {0} }, | 124 | {ClkClientWin, MODKEY, Button2, togglefloating, {0}}, |
| 113 | { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, | 125 | {ClkClientWin, MODKEY, Button3, resizemouse, {0}}, |
| 114 | { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, | 126 | {ClkTagBar, 0, Button1, view, {0}}, |
| 115 | { ClkTagBar, 0, Button1, view, {0} }, | 127 | {ClkTagBar, 0, Button3, toggleview, {0}}, |
| 116 | { ClkTagBar, 0, Button3, toggleview, {0} }, | 128 | {ClkTagBar, MODKEY, Button1, tag, {0}}, |
| 117 | { ClkTagBar, MODKEY, Button1, tag, {0} }, | 129 | {ClkTagBar, MODKEY, Button3, toggletag, {0}}, |
| 118 | { ClkTagBar, MODKEY, Button3, toggletag, {0} }, | ||
| 119 | }; | 130 | }; |
| 120 | |||
