aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-08-20 10:22:51 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-08-20 10:22:51 (GMT)
commit74df0fcda9d9a60e32d4bcc240564854e49731fe (patch)
tree60d279fd180d78e637325b57f5eede83b98abe40
parent2df0e67ca506448996a83b47a3eb77360712f4cc (diff)
downloadfluxbox_paul-74df0fcda9d9a60e32d4bcc240564854e49731fe.zip
fluxbox_paul-74df0fcda9d9a60e32d4bcc240564854e49731fe.tar.bz2
add SetDecor key command
-rw-r--r--ChangeLog3
-rw-r--r--doc/asciidoc/fluxbox-keys.txt17
-rw-r--r--doc/fluxbox-keys.535
-rw-r--r--src/CurrentWindowCmd.cc9
-rw-r--r--src/CurrentWindowCmd.hh9
5 files changed, 51 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index e7ce292..be9f9db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
1 (Format: Year/Month/Day) 1 (Format: Year/Month/Day)
2Changes for 1.1 2Changes for 1.1
3*08/08/20:
4 * Added SetDecor key command (Mark)
5 CurrentWindowCmd.cc/hh
3*08/08/19: 6*08/08/19:
4 * Add new [transient] tag to apps file to match transient windows (Mark) 7 * Add new [transient] tag to apps file to match transient windows (Mark)
5 ClientPattern.cc/hh Remember.cc 8 ClientPattern.cc/hh Remember.cc
diff --git a/doc/asciidoc/fluxbox-keys.txt b/doc/asciidoc/fluxbox-keys.txt
index 771621d..b3b458a 100644
--- a/doc/asciidoc/fluxbox-keys.txt
+++ b/doc/asciidoc/fluxbox-keys.txt
@@ -166,11 +166,6 @@ Window Commands
166These commands ordinarily affect only the currently focused window. The 166These commands ordinarily affect only the currently focused window. The
167*OnWindow* modifier and *ForEach* command may affect the window that is used. 167*OnWindow* modifier and *ForEach* command may affect the window that is used.
168 168
169*Activate* ['pattern'] | *Focus* ['pattern']::
170 Set the focus to the window matching the argument. If 'pattern' is
171 omitted, this may be used with the *OnWindow* modifier to set the
172 focus. See *CLIENT PATTERNS* for more about the 'pattern' arguments.
173
174*Minimize* | *MinimizeWindow* | *Iconify*:: 169*Minimize* | *MinimizeWindow* | *Iconify*::
175 Minimize the current window, equivalent to the window button. 170 Minimize the current window, equivalent to the window button.
176 171
@@ -211,6 +206,11 @@ These commands ordinarily affect only the currently focused window. The
211 Toggle the *sticky* state of the current window, equivalent to the 206 Toggle the *sticky* state of the current window, equivalent to the
212 window button. A *sticky* window is visible on all workspaces. 207 window button. A *sticky* window is visible on all workspaces.
213 208
209*SetDecor* 'decor'::
210 Sets which window decorations will be shown. 'decor' has the same format
211 as the `[Deco]' parameter in the apps file. See man fluxbox section
212 APPLICATION SETTINGS for more info.
213
214*ToggleDecor*:: 214*ToggleDecor*::
215 Toggles the presence of the window decorations (title bar, window 215 Toggles the presence of the window decorations (title bar, window
216 buttons, and resize bar). 216 buttons, and resize bar).
@@ -310,7 +310,7 @@ called).
310 Jumps to the given workspace 'number'. The first workspace is *1*. 310 Jumps to the given workspace 'number'. The first workspace is *1*.
311 311
312*NextWindow* [{'options'}] ['pattern'] / *PrevWindow* [{'options'}] ['pattern']:: 312*NextWindow* [{'options'}] ['pattern'] / *PrevWindow* [{'options'}] ['pattern']::
313Focuses and activates the next / previous window in the focus list. 313Focuses the next / previous window in the focus list.
314+ 314+
315'options' is one or more of the following, space delimited:;; 315'options' is one or more of the following, space delimited:;;
316+ 316+
@@ -344,6 +344,11 @@ doing so.
344 list. The 'options' and 'pattern' arguments have the same meaning as 344 list. The 'options' and 'pattern' arguments have the same meaning as
345 *NextWindow* above. 345 *NextWindow* above.
346 346
347*Activate* ['pattern'] | *Focus* ['pattern']::
348 With 'pattern', this is an alias for *GoToWindow* 1 'pattern'. Without,
349 this behaves like a window command, so that OnWindow events can change
350 the focused window.
351
347*Attach* 'pattern':: 352*Attach* 'pattern'::
348 Combines all windows that match the 'pattern' into a single tab group. 353 Combines all windows that match the 'pattern' into a single tab group.
349 See *CLIENT PATTERNS* for more about the 'pattern' arguments. 354 See *CLIENT PATTERNS* for more about the 'pattern' arguments.
diff --git a/doc/fluxbox-keys.5 b/doc/fluxbox-keys.5
index e3e3ade..6509712 100644
--- a/doc/fluxbox-keys.5
+++ b/doc/fluxbox-keys.5
@@ -1,11 +1,11 @@
1.\" Title: fluxbox-keys 1.\" Title: fluxbox-keys
2.\" Author: 2.\" Author:
3.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/> 3.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
4.\" Date: 08/18/2008 4.\" Date: 08/20/2008
5.\" Manual: 5.\" Manual:
6.\" Source: 6.\" Source:
7.\" 7.\"
8.TH "FLUXBOX\-KEYS" "5" "08/18/2008" "" "" 8.TH "FLUXBOX\-KEYS" "5" "08/20/2008" "" ""
9.\" disable hyphenation 9.\" disable hyphenation
10.nh 10.nh
11.\" disable justification (adjust text to left margin only) 11.\" disable justification (adjust text to left margin only)
@@ -167,19 +167,6 @@ Start dragging to add this window to another\'s tabgroup\.
167.SS "Window Commands" 167.SS "Window Commands"
168These commands ordinarily affect only the currently focused window\. The \fBOnWindow\fR modifier and \fBForEach\fR command may affect the window that is used\. 168These commands ordinarily affect only the currently focused window\. The \fBOnWindow\fR modifier and \fBForEach\fR command may affect the window that is used\.
169.PP 169.PP
170\fBActivate\fR [\fIpattern\fR] | \fBFocus\fR [\fIpattern\fR]
171.RS 4
172Set the focus to the window matching the argument\. If
173\fIpattern\fR
174is omitted, this may be used with the
175\fBOnWindow\fR
176modifier to set the focus\. See
177\fBCLIENT PATTERNS\fR
178for more about the
179\fIpattern\fR
180arguments\.
181.RE
182.PP
183\fBMinimize\fR | \fBMinimizeWindow\fR | \fBIconify\fR 170\fBMinimize\fR | \fBMinimizeWindow\fR | \fBIconify\fR
184.RS 4 171.RS 4
185Minimize the current window, equivalent to the window button\. 172Minimize the current window, equivalent to the window button\.
@@ -261,6 +248,13 @@ state of the current window, equivalent to the window button\. A
261window is visible on all workspaces\. 248window is visible on all workspaces\.
262.RE 249.RE
263.PP 250.PP
251\fBSetDecor\fR \fIdecor\fR
252.RS 4
253Sets which window decorations will be shown\.
254\fIdecor\fR
255has the same format as the `[Deco]\' parameter in the apps file\. See man fluxbox section APPLICATION SETTINGS for more info\.
256.RE
257.PP
264\fBToggleDecor\fR 258\fBToggleDecor\fR
265.RS 4 259.RS 4
266Toggles the presence of the window decorations (title bar, window buttons, and resize bar)\. 260Toggles the presence of the window decorations (title bar, window buttons, and resize bar)\.
@@ -411,7 +405,7 @@ Jumps to the given workspace
411.PP 405.PP
412\fBNextWindow\fR [{\fIoptions\fR}] [\fIpattern\fR] / \fBPrevWindow\fR [{\fIoptions\fR}] [\fIpattern\fR] 406\fBNextWindow\fR [{\fIoptions\fR}] [\fIpattern\fR] / \fBPrevWindow\fR [{\fIoptions\fR}] [\fIpattern\fR]
413.RS 4 407.RS 4
414Focuses and activates the next / previous window in the focus list\. 408Focuses the next / previous window in the focus list\.
415.PP 409.PP
416\fIoptions\fR is one or more of the following, space delimited: 410\fIoptions\fR is one or more of the following, space delimited:
417.RS 4 411.RS 4
@@ -456,6 +450,15 @@ arguments have the same meaning as
456above\. 450above\.
457.RE 451.RE
458.PP 452.PP
453\fBActivate\fR [\fIpattern\fR] | \fBFocus\fR [\fIpattern\fR]
454.RS 4
455With
456\fIpattern\fR, this is an alias for
457\fBGoToWindow\fR
4581
459\fIpattern\fR\. Without, this behaves like a window command, so that OnWindow events can change the focused window\.
460.RE
461.PP
459\fBAttach\fR \fIpattern\fR 462\fBAttach\fR \fIpattern\fR
460.RS 4 463.RS 4
461Combines all windows that match the 464Combines all windows that match the
diff --git a/src/CurrentWindowCmd.cc b/src/CurrentWindowCmd.cc
index bfccbdc..6918db9 100644
--- a/src/CurrentWindowCmd.cc
+++ b/src/CurrentWindowCmd.cc
@@ -509,6 +509,15 @@ void SetTitleCmd::real_execute() {
509 fbwindow().winClient().setTitle(title); 509 fbwindow().winClient().setTitle(title);
510} 510}
511 511
512REGISTER_COMMAND_WITH_ARGS(setdecor, SetDecorCmd, void);
513
514SetDecorCmd::SetDecorCmd(const std::string &args):
515 m_mask(FbWinFrame::getDecoMaskFromString(args)) { }
516
517void SetDecorCmd::real_execute() {
518 fbwindow().setDecorationMask(m_mask);
519}
520
512FbTk::Command<void> *SetAlphaCmd::parse(const string &command, const string &args, 521FbTk::Command<void> *SetAlphaCmd::parse(const string &command, const string &args,
513 bool trusted) { 522 bool trusted) {
514 typedef std::vector<string> StringTokens; 523 typedef std::vector<string> StringTokens;
diff --git a/src/CurrentWindowCmd.hh b/src/CurrentWindowCmd.hh
index 8371204..9b7d181 100644
--- a/src/CurrentWindowCmd.hh
+++ b/src/CurrentWindowCmd.hh
@@ -247,6 +247,15 @@ private:
247 std::string title; 247 std::string title;
248}; 248};
249 249
250class SetDecorCmd: public WindowHelperCmd {
251public:
252 explicit SetDecorCmd(const std::string &args);
253protected:
254 void real_execute();
255private:
256 unsigned int m_mask;
257};
258
250class SetAlphaCmd: public WindowHelperCmd { 259class SetAlphaCmd: public WindowHelperCmd {
251public: 260public:
252 SetAlphaCmd(int focus, bool rel, int unfocus, bool unrel); 261 SetAlphaCmd(int focus, bool rel, int unfocus, bool unrel);