From 77f43591ce5fca89e646a4d1140bc95cbe082025 Mon Sep 17 00:00:00 2001 From: rathnor Date: Sun, 15 Jun 2003 11:38:35 +0000 Subject: new keys for cycling through groups - NextGroup/PrevGroup (they are an alias for NextWindow/PrevWindow 1 --- src/Keys.cc | 11 ++++++++++- src/Keys.hh | 3 ++- src/fluxbox.cc | 4 +++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/Keys.cc b/src/Keys.cc index 5913b2b..64ca79d 100644 --- a/src/Keys.cc +++ b/src/Keys.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -//$Id: Keys.cc,v 1.30 2003/06/10 12:18:26 fluxgen Exp $ +//$Id: Keys.cc,v 1.31 2003/06/15 11:38:35 rathnor Exp $ #include "Keys.hh" @@ -102,6 +102,8 @@ Keys::t_actionstr Keys::m_actionlist[] = { {"KillWindow", KILLWINDOW}, {"NextWindow", NEXTWINDOW}, {"PrevWindow", PREVWINDOW}, + {"NextGroup", NEXTGROUP}, + {"PrevGroup", PREVGROUP}, {"NextTab", NEXTTAB}, {"PrevTab", PREVTAB}, {"FirstTab", FIRSTTAB}, @@ -320,6 +322,13 @@ bool Keys::load(const char *filename) { else last_key->param = 0; break; + case NEXTGROUP: + case PREVGROUP: + if (argc + 1 < val.size()) + last_key->param = atoi( val[argc+1].c_str()) ^ 1; + else + last_key->param = 1; + break; case NEXTWINDOW: case PREVWINDOW: if (argc + 1 < val.size()) diff --git a/src/Keys.hh b/src/Keys.hh index b78f7e7..99bc48d 100644 --- a/src/Keys.hh +++ b/src/Keys.hh @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Keys.hh,v 1.24 2003/06/08 14:32:28 rathnor Exp $ +// $Id: Keys.hh,v 1.25 2003/06/15 11:38:35 rathnor Exp $ #ifndef KEYS_HH #define KEYS_HH @@ -50,6 +50,7 @@ public: NEXTWORKSPACE, PREVWORKSPACE, LEFTWORKSPACE, RIGHTWORKSPACE, KILLWINDOW, NEXTWINDOW, PREVWINDOW, + NEXTGROUP, PREVGROUP, NEXTTAB, PREVTAB, FIRSTTAB, LASTTAB, MOVETABPREV, MOVETABNEXT, ATTACHLAST, DETACHCLIENT, FOCUSUP, FOCUSDOWN, FOCUSLEFT, FOCUSRIGHT, diff --git a/src/fluxbox.cc b/src/fluxbox.cc index f84c513..02d27b0 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.cc,v 1.157 2003/06/12 14:32:08 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.158 2003/06/15 11:38:35 rathnor Exp $ #include "fluxbox.hh" @@ -1213,6 +1213,7 @@ void Fluxbox::handleKeyEvent(XKeyEvent &ke) { m_focused_window->clientWindow()); } break; + case Keys::NEXTGROUP: //activate next group (params set right in Keys) case Keys::NEXTWINDOW: { //activate next window unsigned int mods = Keys::cleanMods(ke.state); if (mousescreen == 0) @@ -1229,6 +1230,7 @@ void Fluxbox::handleKeyEvent(XKeyEvent &ke) { mousescreen->nextFocus(m_key->getParam()); break; } + case Keys::PREVGROUP: //activate prev group (params set right in Keys) case Keys::PREVWINDOW: {//activate prev window unsigned int mods = Keys::cleanMods(ke.state); if (mousescreen == 0) -- cgit v0.11.2