set volume with wpctl instead of pamixer

This commit is contained in:
kj-cxa 2022-11-02 01:46:05 +00:00
parent eec78faa7c
commit af1891df1c
No known key found for this signature in database
GPG key ID: 08282E29B983AF9A

View file

@ -150,10 +150,10 @@ static Key keys[] = {
TAGKEYS( XK_9, 8) TAGKEYS( XK_9, 8)
{ MODKEY, XK_0, view, {.ui = ~0 } }, { MODKEY, XK_0, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
{ MODKEY, XK_minus, spawn, SHCMD("pamixer --allow-boost -d 5; kill -44 $(pidof dwmblocks)") }, { MODKEY, XK_minus, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-; kill -44 $(pidof dwmblocks)") },
{ MODKEY|ShiftMask, XK_minus, spawn, SHCMD("pamixer --allow-boost -d 15; kill -44 $(pidof dwmblocks)") }, { MODKEY|ShiftMask, XK_minus, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 15%-; kill -44 $(pidof dwmblocks)") },
{ MODKEY, XK_equal, spawn, SHCMD("pamixer --allow-boost -i 5; kill -44 $(pidof dwmblocks)") }, { MODKEY, XK_equal, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+; kill -44 $(pidof dwmblocks)") },
{ MODKEY|ShiftMask, XK_equal, spawn, SHCMD("pamixer --allow-boost -i 15; kill -44 $(pidof dwmblocks)") }, { MODKEY|ShiftMask, XK_equal, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 15%+; kill -44 $(pidof dwmblocks)") },
{ MODKEY, XK_BackSpace, spawn, {.v = (const char*[]){ "sysact", NULL } } }, { MODKEY, XK_BackSpace, spawn, {.v = (const char*[]){ "sysact", NULL } } },
{ MODKEY|ShiftMask, XK_BackSpace, spawn, {.v = (const char*[]){ "sysact", NULL } } }, { MODKEY|ShiftMask, XK_BackSpace, spawn, {.v = (const char*[]){ "sysact", NULL } } },
@ -219,7 +219,7 @@ static Key keys[] = {
{ MODKEY, XK_n, spawn, {.v = (const char*[]){ TERMINAL, "-e", "nvim", "-c", "VimwikiIndex", NULL } } }, { MODKEY, XK_n, spawn, {.v = (const char*[]){ TERMINAL, "-e", "nvim", "-c", "VimwikiIndex", NULL } } },
{ MODKEY|ShiftMask, XK_n, spawn, SHCMD(TERMINAL " -e newsboat ; pkill -RTMIN+6 dwmblocks") }, { MODKEY|ShiftMask, XK_n, spawn, SHCMD(TERMINAL " -e newsboat ; pkill -RTMIN+6 dwmblocks") },
{ MODKEY, XK_m, spawn, {.v = (const char*[]){ TERMINAL, "-e", "ncmpcpp", NULL } } }, { MODKEY, XK_m, spawn, {.v = (const char*[]){ TERMINAL, "-e", "ncmpcpp", NULL } } },
{ MODKEY|ShiftMask, XK_m, spawn, SHCMD("pamixer -t; kill -44 $(pidof dwmblocks)") }, { MODKEY|ShiftMask, XK_m, spawn, SHCMD("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; kill -44 $(pidof dwmblocks)") },
{ MODKEY, XK_comma, spawn, {.v = (const char*[]){ "mpc", "prev", NULL } } }, { MODKEY, XK_comma, spawn, {.v = (const char*[]){ "mpc", "prev", NULL } } },
{ MODKEY|ShiftMask, XK_comma, spawn, {.v = (const char*[]){ "mpc", "seek", "0%", NULL } } }, { MODKEY|ShiftMask, XK_comma, spawn, {.v = (const char*[]){ "mpc", "seek", "0%", NULL } } },
{ MODKEY, XK_period, spawn, {.v = (const char*[]){ "mpc", "next", NULL } } }, { MODKEY, XK_period, spawn, {.v = (const char*[]){ "mpc", "next", NULL } } },
@ -258,9 +258,9 @@ static Key keys[] = {
{ MODKEY, XK_Delete, spawn, {.v = (const char*[]){ "dmenurecord", "kill", NULL } } }, { MODKEY, XK_Delete, spawn, {.v = (const char*[]){ "dmenurecord", "kill", NULL } } },
{ MODKEY, XK_Scroll_Lock, spawn, SHCMD("killall screenkey || screenkey &") }, { MODKEY, XK_Scroll_Lock, spawn, SHCMD("killall screenkey || screenkey &") },
{ 0, XF86XK_AudioMute, spawn, SHCMD("pamixer -t; kill -44 $(pidof dwmblocks)") }, { 0, XF86XK_AudioMute, spawn, SHCMD("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; kill -44 $(pidof dwmblocks)") },
{ 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("pamixer --allow-boost -i 3; kill -44 $(pidof dwmblocks)") }, { 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 3%+; kill -44 $(pidof dwmblocks)") },
{ 0, XF86XK_AudioLowerVolume, spawn, SHCMD("pamixer --allow-boost -d 3; kill -44 $(pidof dwmblocks)") }, { 0, XF86XK_AudioLowerVolume, spawn, SHCMD("wpctl set-volume @DEFAULT_AUDIO_SINK@ 3%-; kill -44 $(pidof dwmblocks)") },
{ 0, XF86XK_AudioPrev, spawn, {.v = (const char*[]){ "mpc", "prev", NULL } } }, { 0, XF86XK_AudioPrev, spawn, {.v = (const char*[]){ "mpc", "prev", NULL } } },
{ 0, XF86XK_AudioNext, spawn, {.v = (const char*[]){ "mpc", "next", NULL } } }, { 0, XF86XK_AudioNext, spawn, {.v = (const char*[]){ "mpc", "next", NULL } } },
{ 0, XF86XK_AudioPause, spawn, {.v = (const char*[]){ "mpc", "pause", NULL } } }, { 0, XF86XK_AudioPause, spawn, {.v = (const char*[]){ "mpc", "pause", NULL } } },