summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsalmonik <salmon@2137697.xyz>2026-11-15 18:07:17 +0100
committersalmonik <salmon@2137697.xyz>2026-11-15 18:07:17 +0100
commitd6e6771eb6726046b54d30f604b65ab941d90676 (patch)
tree818b67be1ec45768b939105ec73aeb536ac0246a
parentsetlayout: NUL terminate ltsymbol (diff)
downloaddwm-d6e6771eb6726046b54d30f604b65ab941d90676.tar.gz
dwm-d6e6771eb6726046b54d30f604b65ab941d90676.zip
debloat + important info about Mod's
Diffstat (limited to '')
-rw-r--r--config.h124
-rw-r--r--drw.obin0 -> 9068 bytes
-rwxr-xr-xdwmbin0 -> 56056 bytes
-rw-r--r--dwm.c40
-rw-r--r--dwm.obin0 -> 40780 bytes
-rw-r--r--util.obin0 -> 1752 bytes
6 files changed, 124 insertions, 40 deletions
diff --git a/config.h b/config.h
new file mode 100644
index 0000000..0a89621
--- /dev/null
+++ b/config.h
@@ -0,0 +1,124 @@
1/* See LICENSE file for copyright and license details. */
2
3/* appearance */
4static const unsigned int borderpx = 1; /* border pixel of windows */
5static const unsigned int snap = 32; /* snap pixel */
6static const int showbar = 1; /* 0 means no bar */
7static const int topbar = 1; /* 0 means bottom bar */
8static const char *fonts[] = { "monospace:size=10" };
9static const char dmenufont[] = "monospace:size=10";
10static const char col_gray1[] = "#222222";
11static const char col_gray2[] = "#444444";
12static const char col_gray3[] = "#bbbbbb";
13static const char col_gray4[] = "#eeeeee";
14static const char col_cyan[] = "#005577";
15static 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 */
22static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
23
24static const Rule rules[] = {
25 /* xprop(1):
26 * WM_CLASS(STRING) = instance, class
27 * WM_NAME(STRING) = title
28 */
29 /* class instance title tags mask isfloating monitor */
30 { "Gimp", NULL, NULL, 0, 1, -1 },
31 { "Firefox", NULL, NULL, 1 << 8, 0, -1 },
32};
33
34/* layout(s) */
35static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
36static const int nmaster = 1; /* number of clients in master area */
37static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
38static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
39static const int refreshrate = 120; /* refresh rate (per second) for client move/resize */
40
41static const Layout layouts[] = {
42 /* symbol arrange function */
43 { "[]=", tile }, /* first entry is default */
44 { "><>", NULL }, /* no layout function means floating behavior */
45 { "[M]", monocle },
46};
47
48/* key definitions */
49
50/*
51 * xmodmap: up to 4 keys per modifier, (keycodes in parentheses):
52 *
53 * shift Shift_L (0x32), Shift_R (0x3e)
54 * lock Caps_Lock (0x42)
55 * control Control_L (0x25), Control_R (0x69)
56 * mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd)
57 * mod2 Num_Lock (0x4d)
58 * mod3
59 * mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)
60 * mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)
61*/
62
63#define MODKEY Mod1Mask
64#define TAGKEYS(KEY,TAG) \
65 { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
66 { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
67 { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
68 { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
69
70/* commands */
71static char dmenumon[8]; /* component of dmenucmd, manipulated in spawn() */
72static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
73static const char *termcmd[] = { "st", NULL };
74
75static const Key keys[] = {
76 /* modifier key function argument */
77 { MODKEY, XK_p, spawn, {.v = dmenucmd } },
78 { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
79 { MODKEY, XK_b, togglebar, {0} },
80 { MODKEY, XK_j, focusstack, {.i = +1 } },
81 { MODKEY, XK_k, focusstack, {.i = -1 } },
82 { MODKEY, XK_i, incnmaster, {.i = +1 } },
83 { MODKEY, XK_d, incnmaster, {.i = -1 } },
84 { MODKEY, XK_h, setmfact, {.f = -0.05} },
85 { MODKEY, XK_l, setmfact, {.f = +0.05} },
86 { MODKEY, XK_Return, zoom, {0} },
87 { MODKEY, XK_Tab, view, {0} },
88 { MODKEY|ShiftMask, XK_c, killclient, {0} },
89 { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
90 { MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
91 { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
92 { MODKEY, XK_space, setlayout, {0} },
93 { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
94 { MODKEY, XK_0, view, {.ui = ~0 } },
95 { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
96 TAGKEYS( XK_1, 0)
97 TAGKEYS( XK_2, 1)
98 TAGKEYS( XK_3, 2)
99 TAGKEYS( XK_4, 3)
100 TAGKEYS( XK_5, 4)
101 TAGKEYS( XK_6, 5)
102 TAGKEYS( XK_7, 6)
103 TAGKEYS( XK_8, 7)
104 TAGKEYS( XK_9, 8)
105 { MODKEY|ShiftMask|ControlMask, XK_e, quit, {0} },
106};
107
108/* button definitions */
109/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
110static const Button buttons[] = {
111 /* click event mask button function argument */
112 { ClkLtSymbol, 0, Button1, setlayout, {0} },
113 { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
114 { ClkWinTitle, 0, Button2, zoom, {0} },
115 { ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
116 { ClkClientWin, MODKEY, Button1, movemouse, {0} },
117 { ClkClientWin, MODKEY, Button2, togglefloating, {0} },
118 { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
119 { ClkTagBar, 0, Button1, view, {0} },
120 { ClkTagBar, 0, Button3, toggleview, {0} },
121 { ClkTagBar, MODKEY, Button1, tag, {0} },
122 { ClkTagBar, MODKEY, Button3, toggletag, {0} },
123};
124
diff --git a/drw.o b/drw.o
new file mode 100644
index 0000000..386e495
--- /dev/null
+++ b/drw.o
Binary files differ
diff --git a/dwm b/dwm
new file mode 100755
index 0000000..17d9237
--- /dev/null
+++ b/dwm
Binary files differ
diff --git a/dwm.c b/dwm.c
index 35cce9a..9ae39fc 100644
--- a/dwm.c
+++ b/dwm.c
@@ -159,14 +159,12 @@ static Monitor *createmon(void);
159static void destroynotify(XEvent *e); 159static void destroynotify(XEvent *e);
160static void detach(Client *c); 160static void detach(Client *c);
161static void detachstack(Client *c); 161static void detachstack(Client *c);
162static Monitor *dirtomon(int dir);
163static void drawbar(Monitor *m); 162static void drawbar(Monitor *m);
164static void drawbars(void); 163static void drawbars(void);
165static void enternotify(XEvent *e); 164static void enternotify(XEvent *e);
166static void expose(XEvent *e); 165static void expose(XEvent *e);
167static void focus(Client *c); 166static void focus(Client *c);
168static void focusin(XEvent *e); 167static void focusin(XEvent *e);
169static void focusmon(const Arg *arg);
170static void focusstack(const Arg *arg); 168static void focusstack(const Arg *arg);
171static Atom getatomprop(Client *c, Atom prop); 169static Atom getatomprop(Client *c, Atom prop);
172static int getrootptr(int *x, int *y); 170static int getrootptr(int *x, int *y);
@@ -206,7 +204,6 @@ static void seturgent(Client *c, int urg);
206static void showhide(Client *c); 204static void showhide(Client *c);
207static void spawn(const Arg *arg); 205static void spawn(const Arg *arg);
208static void tag(const Arg *arg); 206static void tag(const Arg *arg);
209static void tagmon(const Arg *arg);
210static void tile(Monitor *m); 207static void tile(Monitor *m);
211static void togglebar(const Arg *arg); 208static void togglebar(const Arg *arg);
212static void togglefloating(const Arg *arg); 209static void togglefloating(const Arg *arg);
@@ -684,21 +681,6 @@ detachstack(Client *c)
684 } 681 }
685} 682}
686 683
687Monitor *
688dirtomon(int dir)
689{
690 Monitor *m = NULL;
691
692 if (dir > 0) {
693 if (!(m = selmon->next))
694 m = mons;
695 } else if (selmon == mons)
696 for (m = mons; m->next; m = m->next);
697 else
698 for (m = mons; m->next != selmon; m = m->next);
699 return m;
700}
701
702void 684void
703drawbar(Monitor *m) 685drawbar(Monitor *m)
704{ 686{
@@ -826,20 +808,6 @@ focusin(XEvent *e)
826} 808}
827 809
828void 810void
829focusmon(const Arg *arg)
830{
831 Monitor *m;
832
833 if (!mons->next)
834 return;
835 if ((m = dirtomon(arg->i)) == selmon)
836 return;
837 unfocus(selmon->sel, 0);
838 selmon = m;
839 focus(NULL);
840}
841
842void
843focusstack(const Arg *arg) 811focusstack(const Arg *arg)
844{ 812{
845 Client *c = NULL, *i; 813 Client *c = NULL, *i;
@@ -1690,14 +1658,6 @@ tag(const Arg *arg)
1690} 1658}
1691 1659
1692void 1660void
1693tagmon(const Arg *arg)
1694{
1695 if (!selmon->sel || !mons->next)
1696 return;
1697 sendmon(selmon->sel, dirtomon(arg->i));
1698}
1699
1700void
1701tile(Monitor *m) 1661tile(Monitor *m)
1702{ 1662{
1703 unsigned int i, n, h, mw, my, ty; 1663 unsigned int i, n, h, mw, my, ty;
diff --git a/dwm.o b/dwm.o
new file mode 100644
index 0000000..3ff4ca4
--- /dev/null
+++ b/dwm.o
Binary files differ
diff --git a/util.o b/util.o
new file mode 100644
index 0000000..d4dcbe2
--- /dev/null
+++ b/util.o
Binary files differ