From 6a8f5f44e123c9ade7964e2051dd0d6a9858961c Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 20 Jul 2002 10:15:43 +0000 Subject: [PATCH] added sendTo action --- util/epist/actions.hh | 2 ++ util/epist/epist.cc | 16 ++++++++++++++++ util/epist/screen.cc | 4 ++++ 3 files changed, 22 insertions(+) diff --git a/util/epist/actions.hh b/util/epist/actions.hh index 22b11370..f95f007b 100644 --- a/util/epist/actions.hh +++ b/util/epist/actions.hh @@ -46,6 +46,8 @@ public: moveWindowLeft, moveWindowRight, + sendTo, //done + nextWindow, //done for now prevWindow, //done for now nextWindowOnAllWorkspaces, //done diff --git a/util/epist/epist.cc b/util/epist/epist.cc index bb33b308..4d557ab5 100644 --- a/util/epist/epist.cc +++ b/util/epist/epist.cc @@ -124,6 +124,22 @@ epist::epist(char **argv, char *dpy_name, char *rc_file) XKeysymToKeycode(getXDisplay(), XStringToKeysym("O")), Mod1Mask | ControlMask)); + _actions.push_back(Action(Action::sendTo, + XKeysymToKeycode(getXDisplay(), + XStringToKeysym("1")), + Mod1Mask | ControlMask, 0)); + _actions.push_back(Action(Action::sendTo, + XKeysymToKeycode(getXDisplay(), + XStringToKeysym("2")), + Mod1Mask | ControlMask, 1)); + _actions.push_back(Action(Action::sendTo, + XKeysymToKeycode(getXDisplay(), + XStringToKeysym("3")), + Mod1Mask | ControlMask, 2)); + _actions.push_back(Action(Action::sendTo, + XKeysymToKeycode(getXDisplay(), + XStringToKeysym("4")), + Mod1Mask | ControlMask, 3)); activateGrabs(); } diff --git a/util/epist/screen.cc b/util/epist/screen.cc index ec73aa82..8597e595 100644 --- a/util/epist/screen.cc +++ b/util/epist/screen.cc @@ -221,6 +221,10 @@ void screen::handleKeypress(const XEvent &e) { window->lower(); return; + case Action::sendTo: + window->sendTo(it->number()); + return; + case Action::toggleomnipresent: if (window->desktop() == 0xffffffff) window->sendTo(_active_desktop); -- 2.39.2