all repos — openbox @ 843f9726ab6fd99fe3a2f285e6c85bd2880a275f

openbox fork - make it a bit more like ryudo

add execute command. add string to action class.
Dana Jansens danakj@orodu.net
commit

843f9726ab6fd99fe3a2f285e6c85bd2880a275f

parent

f32096dcd2c5a4e44763def56c290ce37aa548ba

4 files changed, 16 insertions(+), 4 deletions(-)

jump to
M util/epist/actions.ccutil/epist/actions.cc

@@ -23,6 +23,13 @@

#include "actions.hh" Action::Action(enum ActionType type, KeyCode keycode, unsigned int modifierMask, - int num): _type(type), _keycode(keycode), - _modifierMask(modifierMask), _numberParam(num) + int num) + : _type(type), _keycode(keycode), + _modifierMask(modifierMask), _numberParam(num) +{ } + +Action::Action(enum ActionType type, KeyCode keycode, unsigned int modifierMask, + const std::string &str) + : _type(type), _keycode(keycode), + _modifierMask(modifierMask), _stringParam(str) { }
M util/epist/actions.hhutil/epist/actions.hh

@@ -28,6 +28,7 @@ #include <X11/Xlib.h>

} #include <list> +#include <string> class Action { public:

@@ -81,14 +82,18 @@ const KeyCode _keycode;

const unsigned int _modifierMask; const int _numberParam; + const std::string _stringParam; public: inline enum ActionType type() const { return _type;} inline const KeyCode keycode() const { return _keycode; } inline const unsigned int modifierMask() const { return _modifierMask; } inline const int number() const { return _numberParam; } + inline const std::string &string() const { return _stringParam; } Action(enum ActionType type, KeyCode keycode, unsigned int modifierMask, int number = 0); + Action(enum ActionType type, KeyCode keycode, unsigned int modifierMask, + const std::string &str); }; typedef std::list<Action> ActionList;
M util/epist/epist.ccutil/epist/epist.cc

@@ -159,7 +159,7 @@ Mod1Mask | ControlMask | ShiftMask, 3));

_actions.push_back(Action(Action::execute, XKeysymToKeycode(getXDisplay(), XStringToKeysym("F6")), - Mod1Mask)); + Mod1Mask, "aterm")); activateGrabs(); }
M util/epist/screen.ccutil/epist/screen.cc

@@ -202,7 +202,7 @@ changeWorkspace(it->number());

return; case Action::execute: - execCommand("aterm"); + execCommand(it->string()); return; }