Fixed resizehints and added keybindings for the volume knob on gmmk pro keyboard

This commit is contained in:
jon
2023-01-07 20:35:01 -06:00
parent 699c7bd99c
commit 56b069739b

View File

@@ -5,6 +5,8 @@ static const unsigned int gappx = 6; /* gap pixel between windows */
// three column patch include // three column patch include
#include "tcl.c" #include "tcl.c"
// to use x keysymbols (eg xev button produces XF86AudioraiseVolume = XF86XK_AudioRaisevolume)
#include <X11/XF86keysym.h>
/* appearance */ /* appearance */
static const unsigned int borderpx = 1; /* border pixel of windows */ static const unsigned int borderpx = 1; /* border pixel of windows */
@@ -59,13 +61,14 @@ static const Rule rules[] = {
{ "org.gnome.Nautilus", NULL, NULL, 0, 1, -1 }, { "org.gnome.Nautilus", NULL, NULL, 0, 1, -1 },
// $ xprop WM_CLASS #working below! // $ xprop WM_CLASS #working below!
{ "Org.gnome.Nautilus", NULL, NULL, 0, 1, -1 }, { "Org.gnome.Nautilus", NULL, NULL, 0, 1, -1 },
{ "anki", NULL, NULL, 0, 1, -1 },
// { "Firefox", NULL, NULL, 1 << 8, 0, -1 }, // { "Firefox", NULL, NULL, 1 << 8, 0, -1 },
}; };
/* layout(s) */ /* layout(s) */
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
static const int nmaster = 1; /* number of clients in master area */ static const int nmaster = 1; /* number of clients in master area */
static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */ static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */
static const Layout layouts[] = { static const Layout layouts[] = {
/* symbol arrange function */ /* symbol arrange function */
@@ -95,8 +98,9 @@ static const char *lockcmd[] = { "slock", NULL };
static const char *prtscrcmd[] = { "flameshot", "gui", NULL}; static const char *prtscrcmd[] = { "flameshot", "gui", NULL};
static const char *vol_up[] = { "volume_up.sh", NULL}; static const char *vol_up[] = { "volume_up.sh", NULL};
static const char *vol_down[] = { "volume_down.sh", NULL}; static const char *vol_down[] = { "volume_down.sh", NULL};
static const char *mpc_play[] = { "mpc_play", NULL}; static const char *playerctl_play_pause[] = { "playerctl_play_pause", NULL};
static const char *mpc_pause[] = { "mpc_pause", NULL}; static const char *playerctl_previous[] = { "playerctl_previous", NULL};
static const char *playerctl_next[] = { "playerctl_next", NULL};
static const char *calccmd[] = { "speedcrunch", NULL}; static const char *calccmd[] = { "speedcrunch", NULL};
static const char *jmenu[] = {"jmenu", NULL}; static const char *jmenu[] = {"jmenu", NULL};
@@ -143,13 +147,24 @@ static Key keys[] = {
TAGKEYS( XK_8, 7) TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8) TAGKEYS( XK_9, 8)
//{ MODKEY|ShiftMask, XK_q, quit, {0} }, //{ MODKEY|ShiftMask, XK_q, quit, {0} },
{ MODKEY|ControlMask, XK_q, quit, {0} }, // modified to alternative kill window
{ 0, XK_Print, spawn, {.v = prtscrcmd } }, { MODKEY|ShiftMask, XK_q, killclient, {0} },
{ MODKEY, XK_F9, spawn, {.v = vol_down } }, { MODKEY|ControlMask, XK_q, quit, {0} },
{ MODKEY, XK_F10, spawn, {.v = vol_up } }, { 0, XK_Print, spawn, {.v = prtscrcmd } },
{ MODKEY, XK_F11, spawn, {.v = mpc_play } }, { MODKEY, XK_F8, spawn, {.v = playerctl_play_pause } },
{ MODKEY, XK_F12, spawn, {.v = mpc_pause } }, { MODKEY, XK_F9, spawn, {.v = playerctl_previous } },
{ MODKEY|ControlMask, XK_l, spawn, {.v = lockcmd } }, { MODKEY, XK_F10, spawn, {.v = playerctl_next } },
{ MODKEY, XK_F11, spawn, {.v = vol_down } },
{ MODKEY, XK_F12, spawn, {.v = vol_up } },
// trying to get volume knob working - trying symbols from XF86keysym.h and the keysym printed from xev
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = vol_up } },
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = vol_down } },
{ 0, XF86XK_AudioMute, spawn, {.v = playerctl_play_pause } },
//{ MODKEY, 0x1008ff13, spawn, {.v = vol_up} },
//{ 0, 0x1008ff12, spawn, {.v = playerctl_play_pause } },
//{ MODKEY, 0x1008ff11, spawn, {.v = vol_down } },
// end volume knob
{ MODKEY|ControlMask, XK_l, spawn, {.v = lockcmd } },
}; };
/* button definitions */ /* button definitions */