aboutsummaryrefslogtreecommitdiffstats
path: root/config.h
diff options
context:
space:
mode:
authorphilw <dscr@duck.com>2025-04-15 01:41:05 +0200
committerphilw <dscr@duck.com>2025-04-15 01:41:05 +0200
commit8146021a2ea4130cfb0d2bf846b451ec538b1bb6 (patch)
tree3a946ef5ee4769bf4eae89b4e77858cc67b8060b /config.h
parent515b7f3b4f048b29325e3e38f0f4a2ef898e8daa (diff)
downloaddwm-8146021a2ea4130cfb0d2bf846b451ec538b1bb6.tar.gz
dwm-8146021a2ea4130cfb0d2bf846b451ec538b1bb6.zip
Refactor the project
Refactored core logic to improve readability and maintainability. Documented the 'transient.c' file to provide clear explanations of its purpose and functions. Updated the 'util.c' file with necessary comments and improvements to existing code. Documented the 'util.h' header file to clarify function prototypes and usage. This update should improve the overall code quality and make it easier for future development. Signed-off-by: philw <dscr@duck.com>
Diffstat (limited to 'config.h')
-rw-r--r--config.h129
1 files changed, 0 insertions, 129 deletions
diff --git a/config.h b/config.h
deleted file mode 100644
index e6d32c5..0000000
--- a/config.h
+++ /dev/null
@@ -1,129 +0,0 @@
1// #include <cstddef>
2static const unsigned int borderpx = 0;
3static const unsigned int snap = 32;
4static const unsigned int systraypinning = 0;
5static const unsigned int systrayonleft = 0;
6static const unsigned int systrayspacing = 2;
7static const unsigned int gappih = 5;
8static const unsigned int gappiv = 5;
9static const unsigned int gappoh = 5;
10static const unsigned int gappov = 5;
11
12static const int showsystray = 1;
13static const int systraypinningfailfirst = 1;
14static const int smartgaps = 0;
15static const int swallowfloating = 1;
16static const int showbar = 0;
17static const int topbar = 1;
18
19static const char *fonts[] = {"monospace:size=10"};
20static const char dmenufont[] = "monospace:size=10";
21static const char col_gray1[] = "#222222";
22static const char col_gray2[] = "#444444";
23static const char col_gray3[] = "#bbbbbb";
24static const char col_gray4[] = "#eeeeee";
25static const char col_cyan[] = "#005577";
26static const char norm_fg[] = "#383a42";
27static const char norm_bg[] = "#e1e3ea";
28static const char norm_border[] = "#3f3f40";
29
30static const char sel_fg[] = "#383a42";
31static const char sel_bg[] = "#e1e3ea";
32static const char sel_border[] = "#225588";
33
34static const char urg_fg[] = "#225588";
35static const char urg_bg[] = "#e1e3ea";
36static const char urg_border[] = "#000c18";
37
38static const char *colors[][3] = {
39 [SchemeNorm] = {norm_fg, norm_bg, norm_border}, // unfocused wins
40 [SchemeSel] = {sel_fg, sel_bg, sel_border}, // the focused win
41};
42
43/* tagging */
44static const char *tags[] = {"1", "2", "3", "4", "5", "6", "7", "8", "9"};
45
46static const Rule rules[] = {
47 /* class instance title tags mask isfloating isterminal
48 noswallow monitor */
49 {"St", NULL, NULL, 0, 0, 1, 0, -1},
50 {NULL, NULL, "Event Tester", 0, 0, 0, 1, -1}, /* xev */
51};
52
53static const float mfact = 0.50;
54static const int nmaster = 1;
55static const int resizehints = 0;
56static const int lockfullscreen = 1;
57
58static const Layout layouts[] = {
59 /* symbol arrange function */
60 {"[]=", tile}, /* first entry is default */
61 {"><>", NULL}, /* no layout function means floating behavior */
62 // {"[M]", monocle},
63};
64
65/* key definitions */
66#define MODKEY Mod4Mask
67#define TAGKEYS(KEY, TAG) \
68 {MODKEY, KEY, view, {.ui = 1 << TAG}}, \
69 {MODKEY | ControlMask, KEY, toggleview, {.ui = 1 << TAG}}, \
70 {MODKEY | ShiftMask, KEY, tag, {.ui = 1 << TAG}}, \
71 {MODKEY | ControlMask | ShiftMask, KEY, toggletag, {.ui = 1 << TAG}},
72
73/* commands */
74static char dmenumon[2] = "0";
75
76static const char *dmenucmd[] = {"dmenucmd.sh", NULL};
77static const char *termcmd[] = {"st", NULL};
78static const char *screenshotcmd[] = {"screenshotsel.sh", NULL};
79
80static const Key keys[] = {
81 /* modifier key function argument */
82 {MODKEY, XK_space, spawn, {.v = dmenucmd}},
83 {MODKEY, XK_Return, spawn, {.v = termcmd}},
84 {MODKEY | ShiftMask, XK_s, spawn, {.v = screenshotcmd}},
85 {MODKEY, XK_b, togglebar, {0}},
86 {MODKEY, XK_q, killclient, {0}},
87 {MODKEY, XK_f, togglefullscr, {0}},
88 {MODKEY, XK_l, setlayout, {0}},
89 {MODKEY | ShiftMask, XK_space, togglefloating, {0}},
90 TAGKEYS(XK_1, 0) TAGKEYS(XK_2, 1) TAGKEYS(XK_3, 2) TAGKEYS(XK_4, 3)
91 TAGKEYS(XK_5, 4) TAGKEYS(XK_6, 5) TAGKEYS(XK_7, 6) TAGKEYS(XK_8, 7)
92 TAGKEYS(XK_9, 8){MODKEY | ShiftMask, XK_q, quit, {0}},
93 {0,
94 XF86XK_AudioMute,
95 spawn,
96 {.v = (const char *[]){"wpctl", "set-mute", "@DEFAULT_AUDIO_SINK@",
97 "toggle"}}},
98 {0,
99 XF86XK_AudioMicMute,
100 spawn,
101 {.v = (const char *[]){"wpctl", "set-mute", "54", "toggle"}}},
102 {0,
103 XF86XK_AudioRaiseVolume,
104 spawn,
105 {.v = (const char *[]){"wpctl", "set-volume", "@DEFAULT_AUDIO_SINK@",
106 "10%+"}}},
107 {0,
108 XF86XK_AudioLowerVolume,
109 spawn,
110 {.v = (const char *[]){"wpctl", "set-volume", "@DEFAULT_AUDIO_SINK@",
111 "10%-"}}},
112};
113
114static const Button buttons[] = {
115 /* click event mask button function argument */
116 {ClkLtSymbol, 0, Button1, setlayout, {0}},
117 {ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]}},
118 {ClkTagBar, MODKEY, Button1, tag, {0}},
119 {ClkTagBar, MODKEY, Button3, toggletag, {0}},
120 {ClkWinTitle, 0, Button2, zoom, {0}},
121 {ClkStatusText, 0, Button2, spawn, {.v = termcmd}},
122 {ClkClientWin, MODKEY, Button1, movemouse, {0}},
123 {ClkClientWin, MODKEY, Button2, togglefloating, {0}},
124 {ClkClientWin, MODKEY, Button3, resizemouse, {0}},
125 {ClkTagBar, 0, Button1, view, {0}},
126 {ClkTagBar, 0, Button3, toggleview, {0}},
127 {ClkTagBar, MODKEY, Button1, tag, {0}},
128 {ClkTagBar, MODKEY, Button3, toggletag, {0}},
129};