diff options
| author | yuzu-eva <stevenhu@web.de> | 2022-08-19 15:21:14 +0200 |
|---|---|---|
| committer | yuzu-eva <stevenhu@web.de> | 2022-08-19 15:21:14 +0200 |
| commit | bc034ab9bdff61efbb7cd7b72a10bb33c199aba1 (patch) | |
| tree | cda6a370c307e5a10e6dc653cb617feb80b5ca76 /config.h | |
| parent | 005408c4aae36ee57818439cbe52357072644238 (diff) | |
volume control
Diffstat (limited to 'config.h')
| -rw-r--r-- | config.h | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -31,7 +31,7 @@ static const Rule rules[] = { /* class instance title tags mask isfloating isterminal noswallow monitor */ { "Gimp", NULL, NULL, 0, 1, 0, 0, -1 }, { "Firefox", NULL, NULL, 1 << 8, 0, 0, -1, -1 }, - { "Kitty", NULL, NULL, 0, 0, 1, 0, -1 }, + { "kitty", NULL, NULL, 0, 0, 1, 0, -1 }, { NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 }, /* xev */ }; @@ -67,6 +67,9 @@ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; static const char *roficmd[] = { "rofi", "-show", "drun", "-show-icons", NULL }; static const char *termcmd[] = { "kitty", 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 Key keys[] = { /* modifier key function argument */ @@ -99,6 +102,11 @@ static Key keys[] = { TAGKEYS( XK_3, 2) TAGKEYS( XK_4, 3) { MODKEY|ShiftMask, XK_q, quit, {0} }, + + { 0, XF86XK_AudioRaiseVolume, spawn, {.v = upvol} }, + { 0, XF86XK_AudioLowerVolume, spawn, {.v = downvol} }, + { 0, XF86XK_AudioMute, spawn, {.v = mutevol} }, + }; /* button definitions */ |
