Use pactl for volume control and change backlight steps

This commit is contained in:
Alexander Weidinger
2019-01-20 23:39:58 +01:00
parent 200250ac14
commit 1ef5c0a03c
2 changed files with 7 additions and 6 deletions

View File

@@ -52,11 +52,12 @@ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont,
static const char *termcmd[] = { "st", NULL };
static const char *lockcmd[] = { "physlock", "-m", NULL };
static const char *scrot[] = { "scrot", "/home/alex/Pictures/Screenshots/%Y-%m-%d-%H%M%S_$wx$h.png", NULL };
static const char *brightnessup[] = { "xbacklight", "+1", NULL };
static const char *brightnessdown[] = { "xbacklight", "-1", NULL };
static const char *voldown[] = { "amixer", "sset", "'Master'", "3%-", "-q", NULL };
static const char *volup[] = { "amixer", "sset", "'Master'", "3%+", "-q", NULL };
static const char *togglemute[] = { "amixer", "sset", "'Master'", "toggle", "-q", NULL };
static const char *brightnessup[] = { "xbacklight", "+5", NULL };
static const char *brightnessdown[] = { "xbacklight", "-5", NULL };
/* https://askubuntu.com/questions/97936/terminal-command-to-set-audio-volume/1086235#1086235 */
static const char *voldown[] = { "pactl", "set-sink-volume", "@DEFAULT_SINK@", "-5%", NULL };
static const char *volup[] = { "pactl", "set-sink-volume", "@DEFAULT_SINK@", "+5%", NULL };
static const char *togglemute[] = { "pactl", "set-sink-mute", "@DEFAULT_SINK@", "toggle", NULL };
static Key keys[] = {
/* modifier key function argument */