diff options
| author | Ambrose <me@librelife.org> | 2026-02-17 02:08:30 -0500 |
|---|---|---|
| committer | Ambrose <me@librelife.org> | 2026-02-17 02:08:30 -0500 |
| commit | b2fcba1d7412ace99bd458378e086d2b61a0907a (patch) | |
| tree | 8ea28530c548e20085cd59e99260c09b3ac820de | |
| parent | c3249864924762fe6112869e9015b38ca153be6e (diff) | |
ThinkPad volume keys
| -rw-r--r-- | config.def.h | 6 |
1 files changed, 5 insertions, 1 deletions
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 <X11/XF86keysym.h> /* 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]} }, |