Add shortcuts Volume
This commit is contained in:
parent
5ee385461b
commit
da13a67b78
11
config.def.h
11
config.def.h
|
@ -1,5 +1,7 @@
|
|||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
#include <X11/XF86keysym.h>
|
||||
|
||||
/* appearance */
|
||||
|
||||
static const unsigned int borderpx = 4;
|
||||
|
@ -68,8 +70,14 @@ static const Layout layouts[] = {
|
|||
|
||||
/* commands */
|
||||
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
|
||||
|
||||
static const char *screenshot[] = { "scrsht", NULL };
|
||||
static const char *screenshotarea[] = { "scrsht", "-s", NULL };
|
||||
|
||||
static const char *volup[] = { "pactl", "set-sink-volume", "0", "+5%", NULL };
|
||||
static const char *voldown[] = { "pactl", "set-sink-volume", "0", "-5%", NULL };
|
||||
static const char *volmute[] = { "pactl", "set-sink-mute", "0", "toggle", NULL };
|
||||
|
||||
static const char *dmenucmd[] = { "dmenu_run", "-g", "10", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
|
||||
static const char *termcmd[] = { "st", NULL };
|
||||
|
||||
|
@ -77,6 +85,9 @@ static Key keys[] = {
|
|||
/* modifier key function argument */
|
||||
{ 0, XK_Print, spawn, {.v = screenshot } },
|
||||
{ ShiftMask, XK_Print, spawn, {.v = screenshotarea } },
|
||||
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = volup } },
|
||||
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = voldown } },
|
||||
{ 0, XF86XK_AudioMute, spawn, {.v = volmute } },
|
||||
{ SUPERKEY, XK_p, spawn, {.v = dmenucmd } },
|
||||
{ SUPERKEY, XK_Return, spawn, {.v = termcmd } },
|
||||
{ SUPERKEY, XK_b, togglebar, {0} },
|
||||
|
|
11
config.h
11
config.h
|
@ -1,5 +1,7 @@
|
|||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
#include <X11/XF86keysym.h>
|
||||
|
||||
/* appearance */
|
||||
|
||||
static const unsigned int borderpx = 4;
|
||||
|
@ -68,8 +70,14 @@ static const Layout layouts[] = {
|
|||
|
||||
/* commands */
|
||||
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
|
||||
|
||||
static const char *screenshot[] = { "scrsht", NULL };
|
||||
static const char *screenshotarea[] = { "scrsht", "-s", NULL };
|
||||
|
||||
static const char *volup[] = { "pactl", "set-sink-volume", "0", "+5%", NULL };
|
||||
static const char *voldown[] = { "pactl", "set-sink-volume", "0", "-5%", NULL };
|
||||
static const char *volmute[] = { "pactl", "set-sink-mute", "0", "toggle", NULL };
|
||||
|
||||
static const char *dmenucmd[] = { "dmenu_run", "-g", "10", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
|
||||
static const char *termcmd[] = { "st", NULL };
|
||||
|
||||
|
@ -77,6 +85,9 @@ static Key keys[] = {
|
|||
/* modifier key function argument */
|
||||
{ 0, XK_Print, spawn, {.v = screenshot } },
|
||||
{ ShiftMask, XK_Print, spawn, {.v = screenshotarea } },
|
||||
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = volup } },
|
||||
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = voldown } },
|
||||
{ 0, XF86XK_AudioMute, spawn, {.v = volmute } },
|
||||
{ SUPERKEY, XK_p, spawn, {.v = dmenucmd } },
|
||||
{ SUPERKEY, XK_Return, spawn, {.v = termcmd } },
|
||||
{ SUPERKEY, XK_b, togglebar, {0} },
|
||||
|
|
Loading…
Reference in New Issue