summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Ramsay <i.am@jimramsay.com>2009-03-10 12:39:09 (GMT)
committerJim Ramsay <i.am@jimramsay.com>2009-05-26 20:46:39 (GMT)
commit520b4393a552077f2f5306c499d7c294f5e38f7b (patch)
tree6f5c4e27c826064c2189d3dfef4c6e964fca277e
parent54b49c63a641fb742f014403c924ae8f81f73824 (diff)
downloadfluxbox_lack-520b4393a552077f2f5306c499d7c294f5e38f7b.zip
fluxbox_lack-520b4393a552077f2f5306c499d7c294f5e38f7b.tar.bz2
'SendToWorkspace 0' -> Send to current workspace
This accepts the special value of '0' to send windows to the currently active workspace, (much like 'wmctrl -R' does now).
-rw-r--r--doc/asciidoc/fluxbox-keys.txt10
-rw-r--r--doc/fluxbox-keys.5.in16
-rw-r--r--src/CurrentWindowCmd.cc2
3 files changed, 20 insertions, 8 deletions
diff --git a/doc/asciidoc/fluxbox-keys.txt b/doc/asciidoc/fluxbox-keys.txt
index 5c8a210..399fc6b 100644
--- a/doc/asciidoc/fluxbox-keys.txt
+++ b/doc/asciidoc/fluxbox-keys.txt
@@ -268,10 +268,14 @@ The default 'anchor' is the upper left corner, but this may be overridden with o
268 pixels specified in 'd'. If the number is negative, it moves in the 268 pixels specified in 'd'. If the number is negative, it moves in the
269 opposite direction. 269 opposite direction.
270 270
271*TakeToWorkspace* 'workspace' / *SendToWorkspace* 'workspace':: 271*TakeToWorkspace* 'workspace'::
272 Sends you along with the current window to the selected workspace. 272 Sends you along with the current window to the selected workspace.
273 SendToWorkspace just sends the window. The first workspace is number 273 The first workspace is number *1*, not 0.
274 *1*, not 0. 274
275*SendToWorkspace* 'workspace'::
276 SendToWorkspace just sends the window to the specified workspace.
277 As in TakeToWorkspace, the first workspace is number *1*, but in addition
278 you may use the number *0* to mean "The currently active workspace".
275 279
276*TakeToNextWorkspace* ['offset'] / *TakeToPrevWorkspace* ['offset']:: 280*TakeToNextWorkspace* ['offset'] / *TakeToPrevWorkspace* ['offset']::
277 Sends you along with the current window to the next or previous 281 Sends you along with the current window to the next or previous
diff --git a/doc/fluxbox-keys.5.in b/doc/fluxbox-keys.5.in
index 279c1f7..799a8d4 100644
--- a/doc/fluxbox-keys.5.in
+++ b/doc/fluxbox-keys.5.in
@@ -1,12 +1,12 @@
1.\" Title: fluxbox-keys 1.\" Title: fluxbox-keys
2.\" Author: [see the "AUTHORS" section] 2.\" Author: [see the "AUTHORS" section]
3.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/> 3.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/>
4.\" Date: 03/14/2009 4.\" Date: 04/24/2009
5.\" Manual: Fluxbox Manual 5.\" Manual: Fluxbox Manual
6.\" Source: fluxbox-keys.txt 1.1.2 6.\" Source: fluxbox-keys.txt 1.1.2
7.\" Language: English 7.\" Language: English
8.\" 8.\"
9.TH "FLUXBOX\-KEYS" "5" "03/14/2009" "fluxbox\-keys\&.txt 1\&.1\&.2" "Fluxbox Manual" 9.TH "FLUXBOX\-KEYS" "5" "04/24/2009" "fluxbox\-keys\&.txt 1\&.1\&.2" "Fluxbox Manual"
10.\" ----------------------------------------------------------------- 10.\" -----------------------------------------------------------------
11.\" * (re)Define some macros 11.\" * (re)Define some macros
12.\" ----------------------------------------------------------------- 12.\" -----------------------------------------------------------------
@@ -559,12 +559,20 @@ Moves the window relative to its current position by the number of pixels specif
559\fId\fR\&. If the number is negative, it moves in the opposite direction\&. 559\fId\fR\&. If the number is negative, it moves in the opposite direction\&.
560.RE 560.RE
561.PP 561.PP
562\fBTakeToWorkspace\fR \fIworkspace\fR / \fBSendToWorkspace\fR \fIworkspace\fR 562\fBTakeToWorkspace\fR \fIworkspace\fR
563.RS 4 563.RS 4
564Sends you along with the current window to the selected workspace\&. SendToWorkspace just sends the window\&. The first workspace is number 564Sends you along with the current window to the selected workspace\&. The first workspace is number
565\fB1\fR, not 0\&. 565\fB1\fR, not 0\&.
566.RE 566.RE
567.PP 567.PP
568\fBSendToWorkspace\fR \fIworkspace\fR
569.RS 4
570SendToWorkspace just sends the window to the specified workspace\&. As in TakeToWorkspace, the first workspace is number
571\fB1\fR, but in addition you may use the number
572\fB0\fR
573to mean "The currently active workspace"\&.
574.RE
575.PP
568\fBTakeToNextWorkspace\fR [\fIoffset\fR] / \fBTakeToPrevWorkspace\fR [\fIoffset\fR] 576\fBTakeToNextWorkspace\fR [\fIoffset\fR] / \fBTakeToPrevWorkspace\fR [\fIoffset\fR]
569.RS 4 577.RS 4
570Sends you along with the current window to the next or previous workspace\&. If you set 578Sends you along with the current window to the next or previous workspace\&. If you set
diff --git a/src/CurrentWindowCmd.cc b/src/CurrentWindowCmd.cc
index dfb5c19..0300c80 100644
--- a/src/CurrentWindowCmd.cc
+++ b/src/CurrentWindowCmd.cc
@@ -222,7 +222,7 @@ void SendToWorkspaceCmd::real_execute() {
222 int num = m_workspace_num; 222 int num = m_workspace_num;
223 int total = fbwindow().screen().numberOfWorkspaces(); 223 int total = fbwindow().screen().numberOfWorkspaces();
224 if (num < 0) num += total + 1; 224 if (num < 0) num += total + 1;
225 if (num < 1) num = 1; 225 if (num < 1) num = fbwindow().screen().currentWorkspaceID() + 1;
226 if (num > total) num = total; 226 if (num > total) num = total;
227 fbwindow().screen().sendToWorkspace(num-1, &fbwindow(), m_take); 227 fbwindow().screen().sendToWorkspace(num-1, &fbwindow(), m_take);
228} 228}