chore: updated config 9d2636a0
Steve Simkins · 2025-11-09 10:24 7 file(s) · +139 −66
README (deleted) +0 −48
1 -
dwm - dynamic window manager
2 -
============================
3 -
dwm is an extremely fast, small, and dynamic window manager for X.
4 -
5 -
6 -
Requirements
7 -
------------
8 -
In order to build dwm you need the Xlib header files.
9 -
10 -
11 -
Installation
12 -
------------
13 -
Edit config.mk to match your local setup (dwm is installed into
14 -
the /usr/local namespace by default).
15 -
16 -
Afterwards enter the following command to build and install dwm (if
17 -
necessary as root):
18 -
19 -
    make clean install
20 -
21 -
22 -
Running dwm
23 -
-----------
24 -
Add the following line to your .xinitrc to start dwm using startx:
25 -
26 -
    exec dwm
27 -
28 -
In order to connect dwm to a specific display, make sure that
29 -
the DISPLAY environment variable is set correctly, e.g.:
30 -
31 -
    DISPLAY=foo.bar:1 exec dwm
32 -
33 -
(This will start dwm on display :1 of the host foo.bar.)
34 -
35 -
In order to display status info in the bar, you can do something
36 -
like this in your .xinitrc:
37 -
38 -
    while xsetroot -name "`date` `uptime | sed 's/.*,//'`"
39 -
    do
40 -
    	sleep 1
41 -
    done &
42 -
    exec dwm
43 -
44 -
45 -
Configuration
46 -
-------------
47 -
The configuration of dwm is done by creating a custom config.h
48 -
and (re)compiling the source code.
config.def.h +20 −18
1 1
/* See LICENSE file for copyright and license details. */
2 -
3 2
/* appearance */
4 -
static const unsigned int borderpx  = 1;        /* border pixel of windows */
3 +
static const unsigned int borderpx  = 2;        /* border pixel of windows */
5 4
static const unsigned int snap      = 32;       /* snap pixel */
6 5
static const int showbar            = 1;        /* 0 means no bar */
7 6
static const int topbar             = 1;        /* 0 means bottom bar */
8 -
static const char *fonts[]          = { "monospace:size=10" };
9 -
static const char dmenufont[]       = "monospace:size=10";
10 -
static const char col_gray1[]       = "#222222";
11 -
static const char col_gray2[]       = "#444444";
12 -
static const char col_gray3[]       = "#bbbbbb";
13 -
static const char col_gray4[]       = "#eeeeee";
14 -
static const char col_cyan[]        = "#005577";
7 +
static const char *fonts[]          = { "BerkeleyMono Nerd Font:size=16", "monospace:size=16" };
8 +
static const char dmenufont[]       = "BerkeleyMono Nerd Font:size=16";
9 +
static const char col_bg[]          = "#121113";  /* background */
10 +
static const char col_fg[]          = "#ffffff";  /* foreground */
11 +
static const char col_selection[]   = "#222222";  /* selection bg */
12 +
static const char col_gray[]        = "#888888";  /* muted gray */
13 +
static const char col_accent[]      = "#fbcb97";  /* accent color */
15 14
static const char *colors[][3]      = {
16 15
	/*               fg         bg         border   */
17 -
	[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
18 -
	[SchemeSel]  = { col_gray4, col_cyan,  col_cyan  },
16 +
	[SchemeNorm] = { col_fg,    col_bg,    col_gray     },
17 +
	[SchemeSel]  = { col_accent,    col_bg, col_accent  },
19 18
};
20 19
21 20
/* tagging */
46 45
};
47 46
48 47
/* key definitions */
49 -
#define MODKEY Mod1Mask
48 +
#define MODKEY Mod4Mask
50 49
#define TAGKEYS(KEY,TAG) \
51 50
	{ MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
52 51
	{ MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
57 56
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
58 57
59 58
/* commands */
59 +
static const char *dmenucmd[] = { "rofi", "-show", "drun", NULL };
60 60
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
61 -
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
62 -
static const char *termcmd[]  = { "st", NULL };
61 +
static const char *termcmd[]  = { "wezterm", NULL };
62 +
static const char *browsercmd[]  = { "/home/stevedylandev/Applications/helium-0.6.4.1-x86_64_892a013378cdb3a291a71a624890c408.AppImage %U", NULL };
63 63
64 64
static const Key keys[] = {
65 65
	/* modifier                     key        function        argument */
66 66
	{ MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
67 -
	{ MODKEY|ShiftMask,             XK_Return, spawn,          {.v = termcmd } },
68 -
	{ MODKEY,                       XK_b,      togglebar,      {0} },
67 +
	{ MODKEY,                       XK_Return, spawn,          {.v = termcmd } },
68 +
	{ MODKEY,                       XK_b,			 spawn,          SHCMD("/home/stevedylandev/Applications/helium-0.6.4.1-x86_64_892a013378cdb3a291a71a624890c408.AppImage %U")},
69 69
	{ MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
70 70
	{ MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
71 +
	{ MODKEY,                       XK_h,      focusstack,     {.i = -1 } },
72 +
	{ MODKEY,                       XK_l,      focusstack,     {.i = +1 } },
71 73
	{ MODKEY,                       XK_i,      incnmaster,     {.i = +1 } },
72 74
	{ MODKEY,                       XK_d,      incnmaster,     {.i = -1 } },
73 -
	{ MODKEY,                       XK_h,      setmfact,       {.f = -0.05} },
74 -
	{ MODKEY,                       XK_l,      setmfact,       {.f = +0.05} },
75 +
	// { MODKEY,                       XK_h,      setmfact,       {.f = -0.05} },
76 +
	// { MODKEY,                       XK_l,      setmfact,       {.f = +0.05} },
75 77
	{ MODKEY,                       XK_Return, zoom,           {0} },
76 78
	{ MODKEY,                       XK_Tab,    view,           {0} },
77 79
	{ MODKEY|ShiftMask,             XK_c,      killclient,     {0} },
config.h (added) +119 −0
1 +
/* See LICENSE file for copyright and license details. */
2 +
/* appearance */
3 +
static const unsigned int borderpx  = 2;        /* border pixel of windows */
4 +
static const unsigned int snap      = 32;       /* snap pixel */
5 +
static const int showbar            = 1;        /* 0 means no bar */
6 +
static const int topbar             = 1;        /* 0 means bottom bar */
7 +
static const char *fonts[]          = { "BerkeleyMono Nerd Font:size=16", "monospace:size=16" };
8 +
static const char dmenufont[]       = "BerkeleyMono Nerd Font:size=16";
9 +
static const char col_bg[]          = "#121113";  /* background */
10 +
static const char col_fg[]          = "#ffffff";  /* foreground */
11 +
static const char col_selection[]   = "#222222";  /* selection bg */
12 +
static const char col_gray[]        = "#888888";  /* muted gray */
13 +
static const char col_accent[]      = "#fbcb97";  /* accent color */
14 +
static const char *colors[][3]      = {
15 +
	/*               fg         bg         border   */
16 +
	[SchemeNorm] = { col_fg,    col_bg,    col_gray     },
17 +
	[SchemeSel]  = { col_accent,    col_bg, col_accent  },
18 +
};
19 +
20 +
/* tagging */
21 +
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
22 +
23 +
static const Rule rules[] = {
24 +
	/* xprop(1):
25 +
	 *	WM_CLASS(STRING) = instance, class
26 +
	 *	WM_NAME(STRING) = title
27 +
	 */
28 +
	/* class      instance    title       tags mask     isfloating   monitor */
29 +
	{ "Gimp",     NULL,       NULL,       0,            1,           -1 },
30 +
	{ "Firefox",  NULL,       NULL,       1 << 8,       0,           -1 },
31 +
};
32 +
33 +
/* layout(s) */
34 +
static const float mfact     = 0.55; /* factor of master area size [0.05..0.95] */
35 +
static const int nmaster     = 1;    /* number of clients in master area */
36 +
static const int resizehints = 1;    /* 1 means respect size hints in tiled resizals */
37 +
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
38 +
static const int refreshrate = 120;  /* refresh rate (per second) for client move/resize */
39 +
40 +
static const Layout layouts[] = {
41 +
	/* symbol     arrange function */
42 +
	{ "[]=",      tile },    /* first entry is default */
43 +
	{ "><>",      NULL },    /* no layout function means floating behavior */
44 +
	{ "[M]",      monocle },
45 +
};
46 +
47 +
/* key definitions */
48 +
#define MODKEY Mod4Mask
49 +
#define TAGKEYS(KEY,TAG) \
50 +
	{ MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
51 +
	{ MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
52 +
	{ MODKEY|ShiftMask,             KEY,      tag,            {.ui = 1 << TAG} }, \
53 +
	{ MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} },
54 +
55 +
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
56 +
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
57 +
58 +
/* commands */
59 +
static const char *dmenucmd[] = { "rofi", "-show", "drun", NULL };
60 +
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
61 +
static const char *termcmd[]  = { "wezterm", NULL };
62 +
static const char *browsercmd[]  = { "/home/stevedylandev/Applications/helium-0.6.4.1-x86_64_892a013378cdb3a291a71a624890c408.AppImage %U", NULL };
63 +
64 +
static const Key keys[] = {
65 +
	/* modifier                     key        function        argument */
66 +
	{ MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
67 +
	{ MODKEY,                       XK_Return, spawn,          {.v = termcmd } },
68 +
	{ MODKEY,                       XK_b,			 spawn,          SHCMD("/home/stevedylandev/Applications/helium-0.6.4.1-x86_64_892a013378cdb3a291a71a624890c408.AppImage %U")},
69 +
	{ MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
70 +
	{ MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
71 +
	{ MODKEY,                       XK_h,      focusstack,     {.i = -1 } },
72 +
	{ MODKEY,                       XK_l,      focusstack,     {.i = +1 } },
73 +
	{ MODKEY,                       XK_i,      incnmaster,     {.i = +1 } },
74 +
	{ MODKEY,                       XK_d,      incnmaster,     {.i = -1 } },
75 +
	// { MODKEY,                       XK_h,      setmfact,       {.f = -0.05} },
76 +
	// { MODKEY,                       XK_l,      setmfact,       {.f = +0.05} },
77 +
	{ MODKEY,                       XK_Return, zoom,           {0} },
78 +
	{ MODKEY,                       XK_Tab,    view,           {0} },
79 +
	{ MODKEY|ShiftMask,             XK_c,      killclient,     {0} },
80 +
	{ MODKEY,                       XK_t,      setlayout,      {.v = &layouts[0]} },
81 +
	{ MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
82 +
	{ MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },
83 +
	{ MODKEY,                       XK_space,  setlayout,      {0} },
84 +
	{ MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
85 +
	{ MODKEY,                       XK_0,      view,           {.ui = ~0 } },
86 +
	{ MODKEY|ShiftMask,             XK_0,      tag,            {.ui = ~0 } },
87 +
	{ MODKEY,                       XK_comma,  focusmon,       {.i = -1 } },
88 +
	{ MODKEY,                       XK_period, focusmon,       {.i = +1 } },
89 +
	{ MODKEY|ShiftMask,             XK_comma,  tagmon,         {.i = -1 } },
90 +
	{ MODKEY|ShiftMask,             XK_period, tagmon,         {.i = +1 } },
91 +
	TAGKEYS(                        XK_1,                      0)
92 +
	TAGKEYS(                        XK_2,                      1)
93 +
	TAGKEYS(                        XK_3,                      2)
94 +
	TAGKEYS(                        XK_4,                      3)
95 +
	TAGKEYS(                        XK_5,                      4)
96 +
	TAGKEYS(                        XK_6,                      5)
97 +
	TAGKEYS(                        XK_7,                      6)
98 +
	TAGKEYS(                        XK_8,                      7)
99 +
	TAGKEYS(                        XK_9,                      8)
100 +
	{ MODKEY|ShiftMask,             XK_q,      quit,           {0} },
101 +
};
102 +
103 +
/* button definitions */
104 +
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
105 +
static const Button buttons[] = {
106 +
	/* click                event mask      button          function        argument */
107 +
	{ ClkLtSymbol,          0,              Button1,        setlayout,      {0} },
108 +
	{ ClkLtSymbol,          0,              Button3,        setlayout,      {.v = &layouts[2]} },
109 +
	{ ClkWinTitle,          0,              Button2,        zoom,           {0} },
110 +
	{ ClkStatusText,        0,              Button2,        spawn,          {.v = termcmd } },
111 +
	{ ClkClientWin,         MODKEY,         Button1,        movemouse,      {0} },
112 +
	{ ClkClientWin,         MODKEY,         Button2,        togglefloating, {0} },
113 +
	{ ClkClientWin,         MODKEY,         Button3,        resizemouse,    {0} },
114 +
	{ ClkTagBar,            0,              Button1,        view,           {0} },
115 +
	{ ClkTagBar,            0,              Button3,        toggleview,     {0} },
116 +
	{ ClkTagBar,            MODKEY,         Button1,        tag,            {0} },
117 +
	{ ClkTagBar,            MODKEY,         Button3,        toggletag,      {0} },
118 +
};
119 +
drw.o (added) +0 −0

Binary file — no preview.

dwm (added) +0 −0

Binary file — no preview.

dwm.o (added) +0 −0

Binary file — no preview.

util.o (added) +0 −0

Binary file — no preview.