forked from RepoMirrors/dwl
Add brightness and volume control and fix missing key for player control
This commit is contained in:
parent
e4a2a5250c
commit
65b77000a6
20
config.def.h
20
config.def.h
@ -117,6 +117,8 @@ static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TA
|
||||
#define SHWRAP(cmd) { "/bin/sh", "-c", cmd, NULL }
|
||||
#define TERMWRAP(cmd) { "foot", cmd, NULL }
|
||||
#define PLAYERCTL(cmd) { "playerctl", cmd, NULL }
|
||||
#define WIREPLUMBERCTL(...) { "wpctl", __VA_ARGS__, NULL }
|
||||
#define BRIGHTNESSCTL(cmd) { "brightnessctl", cmd, NULL }
|
||||
#define LOCKER "swaylock"
|
||||
|
||||
/* commands */
|
||||
@ -159,10 +161,20 @@ static const Key keys[] = {
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_V, spawn, {.v = audiomixercmd} },
|
||||
{ MODKEY, XKB_KEY_y, spawn, {.v = passmancmd} },
|
||||
|
||||
/* mpv controls */
|
||||
{ 0, XKB_KEY_XF86AudioPlay, spawn, {.v = PLAYERCTL("play-pause")} },
|
||||
{ 0, XKB_KEY_XF86AudioPrev, spawn, {.v = PLAYERCTL("previous")} },
|
||||
{ 0, XKB_KEY_XF86AudioPlay, spawn, {.v = PLAYERCTL("next")} },
|
||||
/* media player */
|
||||
{ 0, XKB_KEY_XF86AudioPlay, spawn, {.v = PLAYERCTL("play-pause")} },
|
||||
{ 0, XKB_KEY_XF86AudioPrev, spawn, {.v = PLAYERCTL("previous")} },
|
||||
{ 0, XKB_KEY_XF86AudioNext, spawn, {.v = PLAYERCTL("next")} },
|
||||
|
||||
/* sound server */
|
||||
{ 0, XKB_KEY_XF86AudioMute, spawn, {.v = WIREPLUMBERCTL("set-mute", "@DEFAULT_AUDIO_SINK@", "toggle")} },
|
||||
{ 0, XKB_KEY_XF86AudioMicMute, spawn, {.v = WIREPLUMBERCTL("set-mute", "@DEFAULT_AUDIO_SOURCE@", "toggle")} },
|
||||
{ 0, XKB_KEY_XF86AudioRaiseVolume, spawn, {.v = WIREPLUMBERCTL("set-volume", "@DEFAULT_AUDIO_SINK@", "5%+")} },
|
||||
{ 0, XKB_KEY_XF86AudioLowerVolume, spawn, {.v = WIREPLUMBERCTL("set-volume", "@DEFAULT_AUDIO_SINK@", "5%-")} },
|
||||
|
||||
/* misc */
|
||||
{ 0, XKB_KEY_XF86MonBrightnessUp, spawn, {.v = BRIGHTNESSCTL("set", "5%+")} },
|
||||
{ 0, XKB_KEY_XF86MonBrightnessDown,spawn, {.v = BRIGHTNESSCTL("set", "5%-")} },
|
||||
|
||||
/* window management */
|
||||
{ MODKEY, XKB_KEY_b, togglebar, {0} },
|
||||
|
Loading…
Reference in New Issue
Block a user