static const char *up_vol[]   = { "pactl", "set-sink-volume", "@DEFAULT_SINK@", "+10%",   NULL };
static const char *down_vol[] = { "pactl", "set-sink-volume", "@DEFAULT_SINK@", "-10%",   NULL };
static const char *mute_vol[] = { "pactl", "set-sink-mute",   "@DEFAULT_SINK@", "toggle", NULL };
...

static const Key keys[] = {
       ...

       { 0, XF86XK_AudioMute,        spawn, {.v = mute_vol } },
       { 0, XF86XK_AudioLowerVolume, spawn, {.v = down_vol } },
       { 0, XF86XK_AudioRaiseVolume, spawn, {.v = up_vol } },

       ...
};

调节亮度

static const char *brighter[] = { "brightnessctl", "set", "10%+", NULL };
static const char *dimmer[]   = { "brightnessctl", "set", "10%-", NULL };
...

static const Key keys[] = {
       ...

       { 0, XF86XK_MonBrightnessDown, spawn, {.v = dimmer } },
       { 0, XF86XK_MonBrightnessUp,   spawn, {.v = brighter } },

       ...
};

2.修改mod键
在dwm中默认是alt为mod键,我本人不太习惯,所以我把它更改为win键
#define MODKEY Mod4Mask
3.窗口标签配置
static const char *tags[] = { "壹", "貳", "叁", "肆", "伍", "陸", "柒", "捌", "玖" };
4.更改默认终端
dwm默认的st我用不太惯,所以我换成了alacritty
static const char *termcmd[] = { "alacritty", NULL };
5.配置状态栏内容
状态栏我使用的是i3status
在.xinitrc中添加

i3status | while :
do
    read line
    xsetroot -name "$line"
done &

6.自启动软件
我们编辑.xinitrc文件
在里面添加

exec  fcitx5 & 

7.打补丁
补丁是dwm的一大特色,我们可以到https://dwm.suckless.org/patches/去找补丁,然后在dwm目录下新建一个叫patches的文件夹
mkdir patches
把你想要的补丁下载下来,如attachaside,再安装补丁
patch -F3 -i patches/dwm-xxxxxxx.diff
卸载补丁
patch -R < patches/dwm-xxxxxxxxx.diff