dwmstatus: add bindings for kbd layout switching
This commit is contained in:
parent
8c81d7ec82
commit
3fa11cbbfa
12
dwmstatus.c
12
dwmstatus.c
@ -2710,6 +2710,12 @@ on_brightness (struct app_context *ctx, int arg)
|
|||||||
free (value);
|
free (value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
on_lock_group (struct app_context *ctx, int arg)
|
||||||
|
{
|
||||||
|
XkbLockGroup (ctx->dpy, XkbUseCoreKbd, arg);
|
||||||
|
}
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
unsigned mod;
|
unsigned mod;
|
||||||
@ -2731,6 +2737,12 @@ g_keys[] =
|
|||||||
{ Mod4Mask | Mod5Mask, XK_Left, on_mpd_backward, 0 },
|
{ Mod4Mask | Mod5Mask, XK_Left, on_mpd_backward, 0 },
|
||||||
{ Mod4Mask | Mod5Mask, XK_Right, on_mpd_forward, 0 },
|
{ Mod4Mask | Mod5Mask, XK_Right, on_mpd_forward, 0 },
|
||||||
|
|
||||||
|
// Keyboard groups
|
||||||
|
{ Mod4Mask, XK_F9, on_lock_group, 0 },
|
||||||
|
{ Mod4Mask, XK_F10, on_lock_group, 1 },
|
||||||
|
{ Mod4Mask, XK_F11, on_lock_group, 2 },
|
||||||
|
{ Mod4Mask, XK_F12, on_lock_group, 3 },
|
||||||
|
|
||||||
// Brightness
|
// Brightness
|
||||||
{ Mod4Mask, XK_Home, on_brightness, 10 },
|
{ Mod4Mask, XK_Home, on_brightness, 10 },
|
||||||
{ Mod4Mask, XK_End, on_brightness, -10 },
|
{ Mod4Mask, XK_End, on_brightness, -10 },
|
||||||
|
Loading…
Reference in New Issue
Block a user