~bt/dwm

d6d645e5bc1beff2c5fa693b6e0243978f250d3b — Bradley Taunt 7 months ago 69754c7
Default to pulseaudio controls for audio config
4 files changed, 16 insertions(+), 8 deletions(-)

M config.def.h
M config.h
M dwm
M dwm.o
M config.def.h => config.def.h +8 -4
@@ 67,6 67,10 @@ static const char *webcmd[]  = { "firefox", NULL };
static const char *lockcmd[] = { "slock", NULL };
static const char *brupcmd[] = { "doas", "light", "-A", "10", NULL };
static const char *brdowncmd[] = { "doas", "light", "-U", "10", NULL };
static const char *upvol[]   = { "/usr/bin/pactl", "set-sink-volume", "0", "+5%",     NULL };
static const char *downvol[] = { "/usr/bin/pactl", "set-sink-volume", "0", "-5%",     NULL };
static const char *mutevol[] = { "/usr/bin/pactl", "set-sink-mute",   "0", "toggle",  NULL };


static const Key keys[] = {
	/* modifier                     key        function        argument */


@@ 107,10 111,10 @@ static const Key keys[] = {
	TAGKEYS(                        XK_9,                      8)
	{ MODKEY|ShiftMask,             XK_q,      quit,           {0} },
	{ MODKEY|ControlMask|ShiftMask, XK_q,      quit,           {1} },
	{ 0,                            XK_Print,  spawn,          SHCMD("scrot -a $(slop -f '%x,%y,%w,%h')") },
	{ 0,                            XF86XK_AudioLowerVolume,     spawn,          SHCMD("amixer set Master playback 5%-") },
	{ 0,                            XF86XK_AudioRaiseVolume,     spawn,          SHCMD("amixer set Master playback 5%+") },
	{ 0,                            XF86XK_AudioMute,     spawn,          SHCMD("amixer set Master playback toggle") },
	{ 0,                            XK_Print,                    spawn,          SHCMD("scrot -a $(slop -f '%x,%y,%w,%h')") },
	{ 0,                            XF86XK_AudioLowerVolume,     spawn,          {.v = downvol}},
	{ 0,                            XF86XK_AudioRaiseVolume,     spawn,          {.v = upvol}},
	{ 0,                            XF86XK_AudioMute,            spawn,          {.v = mutevol}},
  { 0,                            XK_F6,     spawn,          {.v = brupcmd} },
  { 0,                            XK_F5,     spawn,          {.v = brdowncmd} },
};

M config.h => config.h +8 -4
@@ 67,6 67,10 @@ static const char *webcmd[]  = { "firefox", NULL };
static const char *lockcmd[] = { "slock", NULL };
static const char *brupcmd[] = { "doas", "light", "-A", "10", NULL };
static const char *brdowncmd[] = { "doas", "light", "-U", "10", NULL };
static const char *upvol[]   = { "/usr/bin/pactl", "set-sink-volume", "0", "+5%",     NULL };
static const char *downvol[] = { "/usr/bin/pactl", "set-sink-volume", "0", "-5%",     NULL };
static const char *mutevol[] = { "/usr/bin/pactl", "set-sink-mute",   "0", "toggle",  NULL };


static const Key keys[] = {
	/* modifier                     key        function        argument */


@@ 107,10 111,10 @@ static const Key keys[] = {
	TAGKEYS(                        XK_9,                      8)
	{ MODKEY|ShiftMask,             XK_q,      quit,           {0} },
	{ MODKEY|ControlMask|ShiftMask, XK_q,      quit,           {1} },
	{ 0,                            XK_Print,  spawn,          SHCMD("scrot -a $(slop -f '%x,%y,%w,%h')") },
	{ 0,                            XF86XK_AudioLowerVolume,     spawn,          SHCMD("amixer set Master playback 5%-") },
	{ 0,                            XF86XK_AudioRaiseVolume,     spawn,          SHCMD("amixer set Master playback 5%+") },
	{ 0,                            XF86XK_AudioMute,     spawn,          SHCMD("amixer set Master playback toggle") },
	{ 0,                            XK_Print,                    spawn,          SHCMD("scrot -a $(slop -f '%x,%y,%w,%h')") },
	{ 0,                            XF86XK_AudioLowerVolume,     spawn,          {.v = downvol}},
	{ 0,                            XF86XK_AudioRaiseVolume,     spawn,          {.v = upvol}},
	{ 0,                            XF86XK_AudioMute,            spawn,          {.v = mutevol}},
  { 0,                            XK_F6,     spawn,          {.v = brupcmd} },
  { 0,                            XK_F5,     spawn,          {.v = brdowncmd} },
};

M dwm => dwm +0 -0
M dwm.o => dwm.o +0 -0