From b2fcba1d7412ace99bd458378e086d2b61a0907a Mon Sep 17 00:00:00 2001 From: Ambrose Date: Tue, 17 Feb 2026 02:08:30 -0500 Subject: ThinkPad volume keys --- config.def.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config.def.h b/config.def.h index 7c14ccc..ddf73f2 100644 --- a/config.def.h +++ b/config.def.h @@ -1,5 +1,5 @@ /* See LICENSE file for copyright and license details. */ - +#include /* appearance */ static const unsigned int borderpx = 1; /* border pixel of windows */ static const unsigned int gappx = 5; /* gaps between windows */ @@ -71,6 +71,7 @@ static const char *browser[] = { "librewolf", NULL }; static const char *email[] = { "claws-mail", NULL }; static const char *volup[] = { "sh", "-c", "pactl set-sink-volume @DEFAULT_SINK@ +5%", NULL }; static const char *voldown[] = { "sh", "-c", "pactl set-sink-volume @DEFAULT_SINK@ -5%", NULL }; +static const char *volmute[] = { "sh", "-c", "pactl set-sink-mute @DEFAULT_SINK@ toggle", NULL }; static const Key keys[] = { /* modifier key function argument */ @@ -92,6 +93,9 @@ static const Key keys[] = { { MODKEY, XK_q, killclient, {0} }, { ShiftMask, XK_F2, spawn, {.v = volup } }, { ShiftMask, XK_F1, spawn, {.v = voldown } }, + { 0, XF86XK_AudioRaiseVolume, spawn, {.v = volup } }, + { 0, XF86XK_AudioLowerVolume, spawn, {.v = voldown } }, + { 0, XF86XK_AudioMute, spawn, {.v = volmute } }, { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, -- cgit v1.2.3