aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSn4il <sn4il@thedroth.rocks>2025-01-05 13:22:37 +0300
committerSn4il <sn4il@thedroth.rocks>2025-01-05 13:22:37 +0300
commit7ba538ac427b68b5a91792c65380453cc27aacb3 (patch)
treec7e5159fafaa4d0bef7995688f00238e2255f77b
parent82ab822ba60750561eb564031eb1112a362ae5df (diff)
downloaddotfiles-7ba538ac427b68b5a91792c65380453cc27aacb3.tar.gz
dotfiles-7ba538ac427b68b5a91792c65380453cc27aacb3.zip
DWM - добавил регулировку звука
-rw-r--r--dwm/config.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/dwm/config.h b/dwm/config.h
index f2f041a..cf91686 100644
--- a/dwm/config.h
+++ b/dwm/config.h
@@ -1,4 +1,5 @@
/* See LICENSE file for copyright and license details. */
+#include <X11/XF86keysym.h>
/* appearance */
static const unsigned int borderpx = 3; /* border pixel of windows */
@@ -71,6 +72,9 @@ static const char *brightercmd[] = { "ddcutil", "setvcp", "10", "+", "1", NULL
static const char *darkercmd[] = { "ddcutil", "setvcp", "10", "-", "1", NULL };
static const char *dunstcmd[] = { "dunstctl", "close-all", NULL };
static const char *flameshot[] = { "flameshot", "gui", NULL };
+static const char *upvol[] = { "/usr/bin/pactl", "set-sink-volume", "@DEFAULT_SINK@", "+5%", NULL };
+static const char *downvol[] = { "/usr/bin/pactl", "set-sink-volume", "@DEFAULT_SINK@", "-5%", NULL };
+static const char *mutevol[] = { "/usr/bin/pactl", "set-sink-mute", "@DEFAULT_SINK@", "toggle", NULL };
static const Key keys[] = {
/* modifier key function argument */
@@ -101,6 +105,9 @@ static const Key keys[] = {
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
+ { 0, XF86XK_AudioLowerVolume, spawn, {.v = downvol } },
+ { 0, XF86XK_AudioMute, spawn, {.v = mutevol } },
+ { 0, XF86XK_AudioRaiseVolume, spawn, {.v = upvol } },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)