Fix HP Probook Fn keys
This commit is contained in:
41
config.def.h
41
config.def.h
@ -121,8 +121,33 @@ 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 */
|
||||
static const char *termcmd[] = { "alacritty", NULL };
|
||||
static const char *menucmd[] = { "wmenu-run", "-f", "JetBrainsMono Nerd Font 16", "-l", "10", NULL };
|
||||
static const char *termcmd[] = {
|
||||
"alacritty", NULL
|
||||
};
|
||||
|
||||
static const char *menucmd[] = {
|
||||
"wmenu-run", "-f", "JetBrainsMono Nerd Font 14", "-l", "10", NULL
|
||||
};
|
||||
|
||||
static const char *volupcmd[] = {
|
||||
"wpctl", "set-volume", "@DEFAULT_AUDIO_SINK@", "5%+", NULL
|
||||
};
|
||||
|
||||
static const char *voldowncmd[] = {
|
||||
"wpctl", "set-volume", "@DEFAULT_AUDIO_SINK@", "5%-", NULL
|
||||
};
|
||||
|
||||
static const char *mutecmd[] = {
|
||||
"wpctl", "set-mute", "@DEFAULT_AUDIO_SINK@", "toggle", NULL
|
||||
};
|
||||
|
||||
static const char *brightupcmd[] = {
|
||||
"brightnessctl", "set", "+5%", NULL
|
||||
};
|
||||
|
||||
static const char *brightdowncmd[] = {
|
||||
"brightnessctl", "set", "5%-", NULL
|
||||
};
|
||||
|
||||
static const Key keys[] = {
|
||||
/* Note that Shift changes certain key codes: 2 -> at, etc. */
|
||||
@ -135,15 +160,15 @@ static const Key keys[] = {
|
||||
{ MODKEY, XKB_KEY_p, incnmaster, {.i = -1} },
|
||||
{ MODKEY, XKB_KEY_h, setmfact, {.f = -0.05f} },
|
||||
{ MODKEY, XKB_KEY_l, setmfact, {.f = +0.05f} },
|
||||
{ MODKEY, XKB_KEY_z, zoom, {0} },
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, zoom, {0} },
|
||||
{ MODKEY, XKB_KEY_Tab, view, {0} },
|
||||
{ MODKEY, XKB_KEY_q, killclient, {0} },
|
||||
{ MODKEY, XKB_KEY_t, setlayout, {.v = &layouts[0]} },
|
||||
{ MODKEY, XKB_KEY_f, setlayout, {.v = &layouts[1]} },
|
||||
{ MODKEY, XKB_KEY_e, setlayout, {.v = &layouts[1]} },
|
||||
{ MODKEY, XKB_KEY_m, setlayout, {.v = &layouts[2]} },
|
||||
{ MODKEY, XKB_KEY_space, setlayout, {0} },
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_space, togglefloating, {0} },
|
||||
{ MODKEY, XKB_KEY_e, togglefullscreen, {0} },
|
||||
{ MODKEY, XKB_KEY_f, togglefullscreen, {0} },
|
||||
{ MODKEY, XKB_KEY_0, view, {.ui = ~0} },
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_parenright, tag, {.ui = ~0} },
|
||||
{ MODKEY, XKB_KEY_comma, focusmon, {.i = WLR_DIRECTION_LEFT} },
|
||||
@ -169,6 +194,12 @@ 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, XKB_KEY_XF86MonBrightnessDown, spawn, {.v = brightdowncmd} },
|
||||
{ 0, XKB_KEY_XF86MonBrightnessUp, spawn, {.v = brightupcmd} },
|
||||
{ 0, XKB_KEY_XF86AudioMute, spawn, {.v = mutecmd} },
|
||||
{ 0, XKB_KEY_XF86AudioLowerVolume, spawn, {.v = voldowncmd} },
|
||||
{ 0, XKB_KEY_XF86AudioRaiseVolume, spawn, {.v = volupcmd} },
|
||||
};
|
||||
|
||||
static const Button buttons[] = {
|
||||
|
||||
53
hp_probook_fnkeys.patch
Normal file
53
hp_probook_fnkeys.patch
Normal file
@ -0,0 +1,53 @@
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index be1e28b..702f3d0 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -121,8 +121,33 @@ 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 */
|
||||
-static const char *termcmd[] = { "alacritty", NULL };
|
||||
-static const char *menucmd[] = { "wmenu-run", "-f", "JetBrainsMono Nerd Font 16", "-l", "10", NULL };
|
||||
+static const char *termcmd[] = {
|
||||
+ "alacritty", NULL
|
||||
+};
|
||||
+
|
||||
+static const char *menucmd[] = {
|
||||
+ "wmenu-run", "-f", "JetBrainsMono Nerd Font 14", "-l", "10", NULL
|
||||
+};
|
||||
+
|
||||
+static const char *volupcmd[] = {
|
||||
+ "wpctl", "set-volume", "@DEFAULT_AUDIO_SINK@", "5%+", NULL
|
||||
+};
|
||||
+
|
||||
+static const char *voldowncmd[] = {
|
||||
+ "wpctl", "set-volume", "@DEFAULT_AUDIO_SINK@", "5%-", NULL
|
||||
+};
|
||||
+
|
||||
+static const char *mutecmd[] = {
|
||||
+ "wpctl", "set-mute", "@DEFAULT_AUDIO_SINK@", "toggle", NULL
|
||||
+};
|
||||
+
|
||||
+static const char *brightupcmd[] = {
|
||||
+ "brightnessctl", "set", "+5%", NULL
|
||||
+};
|
||||
+
|
||||
+static const char *brightdowncmd[] = {
|
||||
+ "brightnessctl", "set", "5%-", NULL
|
||||
+};
|
||||
|
||||
static const Key keys[] = {
|
||||
/* Note that Shift changes certain key codes: 2 -> at, etc. */
|
||||
@@ -169,6 +194,12 @@ 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, XKB_KEY_XF86MonBrightnessDown, spawn, {.v = brightdowncmd} },
|
||||
+ { 0, XKB_KEY_XF86MonBrightnessUp, spawn, {.v = brightupcmd} },
|
||||
+ { 0, XKB_KEY_XF86AudioMute, spawn, {.v = mutecmd} },
|
||||
+ { 0, XKB_KEY_XF86AudioLowerVolume, spawn, {.v = voldowncmd} },
|
||||
+ { 0, XKB_KEY_XF86AudioRaiseVolume, spawn, {.v = volupcmd} },
|
||||
};
|
||||
|
||||
static const Button buttons[] = {
|
||||
Reference in New Issue
Block a user