tweak keyboard layout switching

This commit is contained in:
Václav Uruba 2021-01-17 14:59:56 +01:00
parent 7cafbc6907
commit 9a2571d4df
Signed by: uruba
GPG Key ID: 0059B34D61727BB0

View File

@ -52,6 +52,7 @@ static const Layout layouts[] = {
/* key definitions */
#define MODKEY Mod4Mask
#define MODKEY_ALT Mod1Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
@ -70,6 +71,7 @@ static const char *backlightupcmd[] = { "light", "-A", "5", NULL };
static const char *backlightdowncmd[] = { "light", "-U", "5", NULL };
static const char *pavucontrolcmd[] = { "pavucontrol-qt", NULL };
static const char *slockcmd[] = { "slock", NULL };
static const char *switchkeyboardcmd[] = { "switch_keyboard_layout", NULL };
static Key keys[] = {
/* modifier key function argument */
@ -114,6 +116,8 @@ static Key keys[] = {
{ MODKEY, XK_v, spawn, {.v = pavucontrolcmd } },
/* slock */
{ MODKEY, XK_s, spawn, {.v = slockcmd } },
/* keyboard layout switch */
{ MODKEY_ALT, XK_Shift_L,spawn, {.v = switchkeyboardcmd } },
};
/* button definitions */