diff -ur fluxbox-0.9.8-vanilla/src/CurrentWindowCmd.cc fluxbox-0.9.8/src/CurrentWindowCmd.cc --- fluxbox-0.9.8-vanilla/src/CurrentWindowCmd.cc Sun Oct 26 13:36:55 2003 +++ fluxbox-0.9.8/src/CurrentWindowCmd.cc Mon Jan 26 00:23:10 2004 @@ -96,3 +96,10 @@ void ResizeToCmd::real_execute() { fbwindow().resize(m_step_size_x, m_step_size_y); } + +setTabCmd::setTabCmd(const int tab) : + t_tab(tab) { } + +void setTabCmd::real_execute() { + fbwindow().setTab(t_tab); +} diff -ur fluxbox-0.9.8-vanilla/src/CurrentWindowCmd.hh fluxbox-0.9.8/src/CurrentWindowCmd.hh --- fluxbox-0.9.8-vanilla/src/CurrentWindowCmd.hh Sun Oct 26 00:11:22 2003 +++ fluxbox-0.9.8/src/CurrentWindowCmd.hh Mon Jan 26 00:23:11 2004 @@ -117,4 +117,16 @@ const int m_step_size_x; const int m_step_size_y; }; + +// settab cmd +class setTabCmd: public WindowHelperCmd{ +public: + explicit setTabCmd(int tab); +protected: + void real_execute(); + +private: + + const int t_tab; +}; #endif // CURRENTWINDOWCMD_HH diff -ur fluxbox-0.9.8-vanilla/src/FbCommandFactory.cc fluxbox-0.9.8/src/FbCommandFactory.cc --- fluxbox-0.9.8-vanilla/src/FbCommandFactory.cc Sat Dec 20 18:42:04 2003 +++ fluxbox-0.9.8/src/FbCommandFactory.cc Mon Jan 26 00:23:11 2004 @@ -121,6 +121,7 @@ "toggledecor", "workspace", "workspacemenu", + "tab", "" }; @@ -262,6 +263,11 @@ if (!arguments.empty()) num = atoi(arguments.c_str()); return new JumpToWorkspaceCmd(num-1); + } else if (command == "tab") { + int num = 1; + if (!arguments.empty()) + num = atoi(arguments.c_str()); + return new setTabCmd(num); } else if (command == "nextwindow") return new NextWindowCmd(atoi(arguments.c_str())); else if (command == "prevwindow") diff -ur fluxbox-0.9.8-vanilla/src/Window.cc fluxbox-0.9.8/src/Window.cc --- fluxbox-0.9.8-vanilla/src/Window.cc Wed Dec 31 11:09:28 2003 +++ fluxbox-0.9.8/src/Window.cc Mon Jan 26 00:23:47 2004 @@ -3452,3 +3452,15 @@ menu().reconfigure(); // update graphics } + +void FluxboxWindow::setTab(unsigned int num) +{ + if ((unsigned int)numClients() <= num) + return; + WinClient *client; + ClientList::iterator it = m_clientlist.begin(); + do { + client = *(it++); + } while(num--); + setCurrentClient(*client, true); +} diff -ur fluxbox-0.9.8-vanilla/src/Window.hh fluxbox-0.9.8/src/Window.hh --- fluxbox-0.9.8-vanilla/src/Window.hh Tue Dec 30 21:56:40 2003 +++ fluxbox-0.9.8/src/Window.hh Mon Jan 26 00:23:24 2004 @@ -364,6 +364,9 @@ }; bool oplock; ///< Used to help stop transient loops occurring by locking a window during certain operations + + void setTab(unsigned int num); + private: static const int PropBlackboxAttributesElements = 8;