dwm-amixer-integration-6.5.diff - sites - public wiki contents of suckless.org
(HTM) git clone git://git.suckless.org/sites
(DIR) Log
(DIR) Files
(DIR) Refs
---
dwm-amixer-integration-6.5.diff (1668B)
---
1 From ac5b105c8c1d8c8043d7b8be17e331e871d1c597 Mon Sep 17 00:00:00 2001
2 From: Pranav Jha <pranavj765@gmail.com>
3 Date: Thu, 17 Oct 2024 23:42:22 -0700
4 Subject: [PATCH] amixer integration
5
6 ---
7 config.def.h | 4 ++++
8 dwm.c | 1 +
9 2 files changed, 5 insertions(+)
10
11 diff --git a/config.def.h b/config.def.h
12 index 9efa774..e9d980d 100644
13 --- a/config.def.h
14 +++ b/config.def.h
15 @@ -59,6 +59,8 @@ static const Layout layouts[] = {
16 static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
17 static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
18 static const char *termcmd[] = { "st", NULL };
19 +static const char *incvol[] = {"/usr/bin/amixer", "set", "Master", "5+", NULL};
20 +static const char *decvol[] = {"/usr/bin/amixer", "set", "Master", "5-", NULL};
21
22 static const Key keys[] = {
23 /* modifier key function argument */
24 @@ -95,6 +97,8 @@ static const Key keys[] = {
25 TAGKEYS( XK_8, 7)
26 TAGKEYS( XK_9, 8)
27 { MODKEY|ShiftMask, XK_q, quit, {0} },
28 + { 0, XF86XK_AudioLowerVolume,spawn,{.v = decvol} },
29 + { 0, XF86XK_AudioRaiseVolume,spawn,{.v = incvol} },
30 };
31
32 /* button definitions */
33 diff --git a/dwm.c b/dwm.c
34 index 1443802..5439d3e 100644
35 --- a/dwm.c
36 +++ b/dwm.c
37 @@ -36,6 +36,7 @@
38 #include <X11/Xlib.h>
39 #include <X11/Xproto.h>
40 #include <X11/Xutil.h>
41 +#include <X11/XF86keysym.h>
42 #ifdef XINERAMA
43 #include <X11/extensions/Xinerama.h>
44 #endif /* XINERAMA */
45 --
46 2.34.1
47