archy-dwm/src/keys/keys.h

32 lines
787 B
C
Raw Normal View History

2022-10-31 11:32:01 +00:00
#ifndef KEYS_H
#define KEYS_H
2022-10-31 05:53:51 +00:00
#include <X11/X.h>
2022-10-31 11:32:01 +00:00
#include "../dwm.h"
typedef struct {
unsigned int mod;
KeySym chain;
KeySym keysym;
void (*func)(const Arg *);
const Arg arg;
} Key;
/* key definitions */
2023-03-01 09:46:36 +00:00
#define MODKEY LockMask // The modifier key is: Caps Lock :P
2022-10-31 11:32:01 +00:00
#define TAGKEYS(CHAIN, KEY, TAG) \
{ MODKEY, CHAIN, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, CHAIN, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, CHAIN, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, CHAIN, KEY, toggletag, {.ui = 1 << TAG} },
2022-10-31 05:53:51 +00:00
2022-10-31 11:32:01 +00:00
// Include all the key bindings
#ifndef KEYS_C
#include "keys.c"
2022-10-31 11:32:01 +00:00
#endif
2022-10-31 05:53:51 +00:00
#endif // keys_H