aboutsummaryrefslogtreecommitdiffstats
path: root/config.h
diff options
context:
space:
mode:
authorphilw <dscr@duck.com>2024-02-18 12:50:42 +0100
committerphilw <dscr@duck.com>2024-02-18 12:50:42 +0100
commitafe7f928e1661de422cb3620b724dd3ffcf63f60 (patch)
treea3b75733552c71667aed666abde5fdc6f61f8806 /config.h
parent2807bbc931a63fddef7c099054b665a5ce71bee4 (diff)
downloaddwm-afe7f928e1661de422cb3620b724dd3ffcf63f60.tar.gz
dwm-afe7f928e1661de422cb3620b724dd3ffcf63f60.zip
Update dwm
Diffstat (limited to 'config.h')
-rw-r--r--config.h174
1 files changed, 92 insertions, 82 deletions
diff --git a/config.h b/config.h
index 785ca10..726a37d 100644
--- a/config.h
+++ b/config.h
@@ -1,25 +1,34 @@
1static const unsigned int borderpx = 0; /* border pixel of windows */ 1static const unsigned int borderpx = 0; /* border pixel of windows */
2static const unsigned int snap = 32; /* snap pixel */ 2static const unsigned int snap = 32; /* snap pixel */
3static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */ 3static const unsigned int systraypinning =
4static 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
5static const unsigned int systrayspacing = 2; /* systray spacing */ 5 X */
6static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/ 6static const unsigned int systrayonleft =
7static const int showsystray = 1; /* 0 means no systray */ 7 0; /* 0: systray in the right corner, >0: systray on left of status text */
8static const unsigned int gappih = 10; /* horiz inner gap between windows */ 8static const unsigned int systrayspacing = 2; /* systray spacing */
9static const unsigned int gappiv = 10; /* vert inner gap between windows */ 9static const int systraypinningfailfirst =
10static 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:
11static const unsigned int gappov = 10; /* vert outer gap between windows and screen edge */ 11 display systray on the last monitor*/
12static const int smartgaps = 0; /* 1 means no outer gap when there is only one window */ 12static const int showsystray = 1; /* 0 means no systray */
13static const int swallowfloating = 1; /* 1 means no outer gap when there is only one window */ 13static const unsigned int gappih = 10; /* horiz inner gap between windows */
14static const int showbar = 0; /* 0 means no bar */ 14static const unsigned int gappiv = 10; /* vert inner gap between windows */
15static const int topbar = 1; /* 0 means bottom bar */ 15static const unsigned int gappoh =
16static const char *fonts[] = { "monospace:size=10" }; 16 10; /* horiz outer gap between windows and screen edge */
17static const char dmenufont[] = "monospace:size=10"; 17static const unsigned int gappov =
18static const char col_gray1[] = "#222222"; 18 10; /* vert outer gap between windows and screen edge */
19static const char col_gray2[] = "#444444"; 19static const int smartgaps =
20static const char col_gray3[] = "#bbbbbb"; 20 0; /* 1 means no outer gap when there is only one window */
21static const char col_gray4[] = "#eeeeee"; 21static const int swallowfloating =
22static const char col_cyan[] = "#005577"; 22 1; /* 1 means no outer gap when there is only one window */
23static const int showbar = 0; /* 0 means no bar */
24static const int topbar = 1; /* 0 means bottom bar */
25static const char *fonts[] = {"monospace:size=10"};
26static const char dmenufont[] = "monospace:size=10";
27static const char col_gray1[] = "#222222";
28static const char col_gray2[] = "#444444";
29static const char col_gray3[] = "#bbbbbb";
30static const char col_gray4[] = "#eeeeee";
31static const char col_cyan[] = "#005577";
23static const char norm_fg[] = "#bfbfbf"; 32static const char norm_fg[] = "#bfbfbf";
24static const char norm_bg[] = "#000001"; 33static const char norm_bg[] = "#000001";
25static const char norm_border[] = "#3f3f40"; 34static const char norm_border[] = "#3f3f40";
@@ -32,89 +41,90 @@ static const char urg_fg[] = "#bfbfbf";
32static const char urg_bg[] = "#501C61"; 41static const char urg_bg[] = "#501C61";
33static const char urg_border[] = "#501C61"; 42static const char urg_border[] = "#501C61";
34 43
35static const char *colors[][3] = { 44static 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 */
42static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; 51static const char *tags[] = {"1", "2", "3", "4", "5", "6", "7", "8", "9"};
43 52
44static const Rule rules[] = { 53static 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) */
51static const float mfact = 0.50; /* factor of master area size [0.05..0.95] */ 61static const float mfact = 0.50; /* factor of master area size [0.05..0.95] */
52static const int nmaster = 1; /* number of clients in master area */ 62static const int nmaster = 1; /* number of clients in master area */
53static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */ 63static const int resizehints =
54static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ 64 0; /* 1 means respect size hints in tiled resizals */
65static const int lockfullscreen =
66 1; /* 1 will force focus on the fullscreen window */
55 67
56static const Layout layouts[] = { 68static 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 */
75static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ 90static 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() */
77static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, NULL}; 92// static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn",
78static const char *termcmd[] = { "st", NULL }; 93// dmenufont, "-nb", norm_bg, "-nf", norm_fg, "-sb", sel_bg, "-sf", sel_fg, NULL
94// };
95static const char *dmenucmd[] = {"dmenu_run", "-m", dmenumon, NULL};
96static const char *termcmd[] = {"st", NULL};
79 97
80static const Key keys[] = { 98static 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 */
103static const Button buttons[] = { 115static 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