X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=util%2Fepist%2Fepist.cc;h=a97b1f775e6b57672cf74ee92f740bc199748cd8;hb=a0cf45a0ef5f7e2cbf0833f4d8655131912400cc;hp=7f8746342101387909dd4b98ad8a55705b795464;hpb=5b91573e0c01a7ee6e504451c2ef3143709d06a2;p=chaz%2Fopenbox diff --git a/util/epist/epist.cc b/util/epist/epist.cc index 7f874634..a97b1f77 100644 --- a/util/epist/epist.cc +++ b/util/epist/epist.cc @@ -58,7 +58,7 @@ using std::string; epist::epist(char **argv, char *dpy_name, char *rc_file) : BaseDisplay(argv[0], dpy_name) { - + _argv = argv; if (rc_file) @@ -202,6 +202,11 @@ epist::epist(char **argv, char *dpy_name, char *rc_file) XKeysymToKeycode(getXDisplay(), XStringToKeysym("4")), Mod1Mask | ControlMask | ShiftMask, 3)); + _actions.push_back(Action(Action::execute, + XKeysymToKeycode(getXDisplay(), + XStringToKeysym("Escape")), + Mod1Mask | ControlMask, + "sleep 1 && xset dpms force off")); _actions.push_back(Action(Action::execute, XKeysymToKeycode(getXDisplay(), XStringToKeysym("space")), @@ -222,8 +227,7 @@ void epist::activateGrabs() { ActionList::const_iterator ait, end = _actions.end(); for(ait = _actions.begin(); ait != end; ++ait) { - XGrabKey(getXDisplay(), ait->keycode(), ait->modifierMask(), - (*scrit)->rootWindow(), False, GrabModeAsync, GrabModeAsync); + (*scrit)->grabKey(ait->keycode(), ait->modifierMask()); } } }