aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2024-03-10 11:11:16 +0530
committerRaghuram Subramani <raghus2247@gmail.com>2024-03-10 11:11:16 +0530
commitc6868f442a5b0cbe3a7d22d2ac62f3428de471f6 (patch)
treea216aee43f6bca43229b2d02ee7aa479eae4951f
parent91c1ec8fecaca817a65039afdc0f0c77b5d9c395 (diff)
update
-rw-r--r--config.def.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/config.def.h b/config.def.h
index ef9d86a..7a4b64d 100644
--- a/config.def.h
+++ b/config.def.h
@@ -126,11 +126,13 @@ static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TA
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
/* commands */
-// for cahnging the volume via alsa amixer //
-static const char *upvol[] = { "amixer", "-q", "-c", "0", "set", "Master", "2+", NULL };
-static const char *downvol[] = { "amixer", "-q", "-c", "0", "set", "Master", "2-", NULL };
-// for muting/unmuting //
-static const char *mute[] = { "amixer", "-q", "set", "Master", "toggle", NULL };
+static const char *upvol[] = { "pamixer -i 5", NULL };
+static const char *downvol[] = { "pamixer -d 5", NULL };
+static const char *mute[] = { "pamixer -t", NULL };
+
+static const char *upbrightness[] = { "brightnessctl set +5%", NULL };
+static const char *downbrightness[] = { "brightnessctl set 5%-", NULL };
+
static const char *termcmd[] = { "alacritty", NULL };
static const char *menucmd[] = { "fuzzel", NULL };
static const char *lockcmd[] = { "swaylock", NULL };
@@ -170,6 +172,11 @@ static const Key keys[] = {
TAGKEYS( XKB_KEY_8, XKB_KEY_asterisk, 7),
TAGKEYS( XKB_KEY_9, XKB_KEY_parenleft, 8),
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_B, quit, {0} },
+ { 0, XF86XK_AudioRaiseVolume,spawn, {.v = upvol } },
+ { 0, XF86XK_AudioLowerVolume,spawn, {.v = downvol } },
+ { 0, XF86XK_AudioMute, spawn, {.v = mute } },
+ { 0, XF86XK_MonBrightnessUp,spawn, {.v = upbrightness } },
+ { 0, XF86XK_MonBrightnessDown,spawn, {.v = downbrightness } },
/* Ctrl-Alt-Backspace and Ctrl-Alt-Fx used to be handled by X server */
{ WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_Terminate_Server, quit, {0} },
@@ -179,9 +186,6 @@ static const Key keys[] = {
#define CHVT(n) { WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_XF86Switch_VT_##n, chvt, {.ui = (n)} }
CHVT(1), CHVT(2), CHVT(3), CHVT(4), CHVT(5), CHVT(6),
CHVT(7), CHVT(8), CHVT(9), CHVT(10), CHVT(11), CHVT(12),
- { 0,XF86XK_AudioRaiseVolume, spawn,{.v = upvol } },
- { 0,XF86XK_AudioLowerVolume, spawn,{.v = downvol } },
- { 0,XF86XK_AudioMute,spawn,{.v = mute } },
};
static const Button buttons[] = {