From 56b069739b34c9827f8e356b4205afce1b6ac730 Mon Sep 17 00:00:00 2001 From: jon Date: Sat, 7 Jan 2023 20:35:01 -0600 Subject: [PATCH] Fixed resizehints and added keybindings for the volume knob on gmmk pro keyboard --- config.h | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/config.h b/config.h index 12a872c..2d30960 100644 --- a/config.h +++ b/config.h @@ -5,6 +5,8 @@ static const unsigned int gappx = 6; /* gap pixel between windows */ // three column patch include #include "tcl.c" +// to use x keysymbols (eg xev button produces XF86AudioraiseVolume = XF86XK_AudioRaisevolume) +#include /* appearance */ 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 }, // $ xprop WM_CLASS #working below! { "Org.gnome.Nautilus", NULL, NULL, 0, 1, -1 }, + { "anki", NULL, NULL, 0, 1, -1 }, // { "Firefox", NULL, NULL, 1 << 8, 0, -1 }, }; /* layout(s) */ 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 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[] = { /* symbol arrange function */ @@ -95,8 +98,9 @@ static const char *lockcmd[] = { "slock", NULL }; static const char *prtscrcmd[] = { "flameshot", "gui", NULL}; static const char *vol_up[] = { "volume_up.sh", NULL}; static const char *vol_down[] = { "volume_down.sh", NULL}; -static const char *mpc_play[] = { "mpc_play", NULL}; -static const char *mpc_pause[] = { "mpc_pause", NULL}; +static const char *playerctl_play_pause[] = { "playerctl_play_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 *jmenu[] = {"jmenu", NULL}; @@ -143,13 +147,24 @@ static Key keys[] = { TAGKEYS( XK_8, 7) TAGKEYS( XK_9, 8) //{ MODKEY|ShiftMask, XK_q, quit, {0} }, - { MODKEY|ControlMask, XK_q, quit, {0} }, - { 0, XK_Print, spawn, {.v = prtscrcmd } }, - { MODKEY, XK_F9, spawn, {.v = vol_down } }, - { MODKEY, XK_F10, spawn, {.v = vol_up } }, - { MODKEY, XK_F11, spawn, {.v = mpc_play } }, - { MODKEY, XK_F12, spawn, {.v = mpc_pause } }, - { MODKEY|ControlMask, XK_l, spawn, {.v = lockcmd } }, + // modified to alternative kill window + { MODKEY|ShiftMask, XK_q, killclient, {0} }, + { MODKEY|ControlMask, XK_q, quit, {0} }, + { 0, XK_Print, spawn, {.v = prtscrcmd } }, + { MODKEY, XK_F8, spawn, {.v = playerctl_play_pause } }, + { MODKEY, XK_F9, spawn, {.v = playerctl_previous } }, + { 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 */