Skip to content

Instantly share code, notes, and snippets.

@apetrone
Created May 10, 2018 04:01
Show Gist options
  • Save apetrone/5ccaa7e425ba07429c35dbbb59271e4c to your computer and use it in GitHub Desktop.
Save apetrone/5ccaa7e425ba07429c35dbbb59271e4c to your computer and use it in GitHub Desktop.
KeySym sym = XKeycodeToKeysym(display, event.xkey.keycode, event.xkey.state & ShiftMask ? 1 : 0);
XGrabKey(dpy, XKeysymToKeycode(dpy, XK_F1), Mod1Mask, DefaultRootWindow(dpy), True, GrabModeAsync, GrabModeAsync);
XGrabKey(dpy, XKeysymToKeycode(dpy, XK_F2), Mod1Mask, DefaultRootWindow(dpy), True, GrabModeAsync, GrabModeAsync);
// XK_Tab
// XK_Escape
// move this window back to its original size at 0, 0.
if (ev.type == KeyPress && ev.xkey.keysym == XK_Tab)
{
XMoveResizeWindow(dpy, start.subwindow, 0, 0, attr.width, attr.height);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment