From 520b4393a552077f2f5306c499d7c294f5e38f7b Mon Sep 17 00:00:00 2001 From: Jim Ramsay Date: Tue, 10 Mar 2009 08:39:09 -0400 Subject: '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). --- doc/asciidoc/fluxbox-keys.txt | 10 +++++++--- doc/fluxbox-keys.5.in | 16 ++++++++++++---- src/CurrentWindowCmd.cc | 2 +- 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 pixels specified in 'd'. If the number is negative, it moves in the opposite direction. -*TakeToWorkspace* 'workspace' / *SendToWorkspace* 'workspace':: +*TakeToWorkspace* 'workspace':: Sends you along with the current window to the selected workspace. - SendToWorkspace just sends the window. The first workspace is number - *1*, not 0. + The first workspace is number *1*, not 0. + +*SendToWorkspace* 'workspace':: + SendToWorkspace just sends the window to the specified workspace. + As in TakeToWorkspace, the first workspace is number *1*, but in addition + you may use the number *0* to mean "The currently active workspace". *TakeToNextWorkspace* ['offset'] / *TakeToPrevWorkspace* ['offset']:: 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 @@ .\" Title: fluxbox-keys .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.74.0 -.\" Date: 03/14/2009 +.\" Date: 04/24/2009 .\" Manual: Fluxbox Manual .\" Source: fluxbox-keys.txt 1.1.2 .\" Language: English .\" -.TH "FLUXBOX\-KEYS" "5" "03/14/2009" "fluxbox\-keys\&.txt 1\&.1\&.2" "Fluxbox Manual" +.TH "FLUXBOX\-KEYS" "5" "04/24/2009" "fluxbox\-keys\&.txt 1\&.1\&.2" "Fluxbox Manual" .\" ----------------------------------------------------------------- .\" * (re)Define some macros .\" ----------------------------------------------------------------- @@ -559,12 +559,20 @@ Moves the window relative to its current position by the number of pixels specif \fId\fR\&. If the number is negative, it moves in the opposite direction\&. .RE .PP -\fBTakeToWorkspace\fR \fIworkspace\fR / \fBSendToWorkspace\fR \fIworkspace\fR +\fBTakeToWorkspace\fR \fIworkspace\fR .RS 4 -Sends you along with the current window to the selected workspace\&. SendToWorkspace just sends the window\&. The first workspace is number +Sends you along with the current window to the selected workspace\&. The first workspace is number \fB1\fR, not 0\&. .RE .PP +\fBSendToWorkspace\fR \fIworkspace\fR +.RS 4 +SendToWorkspace just sends the window to the specified workspace\&. As in TakeToWorkspace, the first workspace is number +\fB1\fR, but in addition you may use the number +\fB0\fR +to mean "The currently active workspace"\&. +.RE +.PP \fBTakeToNextWorkspace\fR [\fIoffset\fR] / \fBTakeToPrevWorkspace\fR [\fIoffset\fR] .RS 4 Sends 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() { int num = m_workspace_num; int total = fbwindow().screen().numberOfWorkspaces(); if (num < 0) num += total + 1; - if (num < 1) num = 1; + if (num < 1) num = fbwindow().screen().currentWorkspaceID() + 1; if (num > total) num = total; fbwindow().screen().sendToWorkspace(num-1, &fbwindow(), m_take); } -- cgit v0.11.2