added :Focus key command
markt markt
2 files changed,
10 insertions(+),
3 deletions(-)
M
ChangeLog
→
ChangeLog
@@ -1,6 +1,9 @@
(Format: Year/Month/Day) Changes for 1.0.1: *07/11/16: + * Added new key command :Focus [<pattern>] that focuses a window (e.g., using + OnWindow or specified using a window pattern) (Mark, thanks Tomas Janousek) + FbCommandFactory.cc * Using ToggleDecor from Deco=TAB should hide tabs (thanks Tomas Janousek) Window.cc *07/11/12:
M
src/FbCommandFactory.cc
→
src/FbCommandFactory.cc
@@ -65,9 +65,10 @@
FbCommandFactory::FbCommandFactory() { // setup commands that we can handle const char* commands[] = { - "addworkspace", + "activate", + "addworkspace", "arrangewindows", - "attach", + "attach", "bindkey", "clientmenu", "close",@@ -81,6 +82,7 @@ "exec",
"execcommand", "execute", "exit", + "focus", "focusup", "focusdown", "focusleft",@@ -124,7 +126,7 @@ "raiselayer",
"reconfig", "reconfigure", "reloadstyle", - "removelastworkspace", + "removelastworkspace", "resizeto", "resize", "resizehorizontal",@@ -419,6 +421,8 @@ else if (command == "lower")
return new WindowListCmd(FbTk::RefCount<WindowHelperCmd>(new CurrentWindowCmd(&FluxboxWindow::lower)), arguments); else if (command == "lowerlayer") return new WindowListCmd(FbTk::RefCount<WindowHelperCmd>(new CurrentWindowCmd(&FluxboxWindow::lowerLayer)), arguments); + else if (command == "activate" || command == "focus") + return new WindowListCmd(FbTk::RefCount<WindowHelperCmd>(new CurrentWindowCmd((void (FluxboxWindow::*)())&FluxboxWindow::focus)), arguments); else if (command == "close") return new WindowListCmd(FbTk::RefCount<WindowHelperCmd>(new CurrentWindowCmd(&FluxboxWindow::close)), arguments); else if (command == "closeallwindows")