all repos — fluxbox @ 74df0fcda9d9a60e32d4bcc240564854e49731fe

custom fork of the fluxbox windowmanager

add SetDecor key command
Mark Tiefenbruck mark@fluxbox.org
commit

74df0fcda9d9a60e32d4bcc240564854e49731fe

parent

2df0e67ca506448996a83b47a3eb77360712f4cc

M ChangeLogChangeLog

@@ -1,5 +1,8 @@

(Format: Year/Month/Day) Changes for 1.1 +*08/08/20: + * Added SetDecor key command (Mark) + CurrentWindowCmd.cc/hh *08/08/19: * Add new [transient] tag to apps file to match transient windows (Mark) ClientPattern.cc/hh Remember.cc
M doc/asciidoc/fluxbox-keys.txtdoc/asciidoc/fluxbox-keys.txt

@@ -166,11 +166,6 @@ ~~~~~~~~~~~~~~~

These commands ordinarily affect only the currently focused window. The *OnWindow* modifier and *ForEach* command may affect the window that is used. -*Activate* ['pattern'] | *Focus* ['pattern']:: - Set the focus to the window matching the argument. If 'pattern' is - omitted, this may be used with the *OnWindow* modifier to set the - focus. See *CLIENT PATTERNS* for more about the 'pattern' arguments. - *Minimize* | *MinimizeWindow* | *Iconify*:: Minimize the current window, equivalent to the window button.

@@ -210,6 +205,11 @@

*Stick* | *StickWindow*:: Toggle the *sticky* state of the current window, equivalent to the window button. A *sticky* window is visible on all workspaces. + +*SetDecor* 'decor':: + Sets which window decorations will be shown. 'decor' has the same format + as the `[Deco]' parameter in the apps file. See man fluxbox section + APPLICATION SETTINGS for more info. *ToggleDecor*:: Toggles the presence of the window decorations (title bar, window

@@ -310,7 +310,7 @@ *Workspace* 'number'::

Jumps to the given workspace 'number'. The first workspace is *1*. *NextWindow* [{'options'}] ['pattern'] / *PrevWindow* [{'options'}] ['pattern']:: -Focuses and activates the next / previous window in the focus list. +Focuses the next / previous window in the focus list. + 'options' is one or more of the following, space delimited:;; +

@@ -343,6 +343,11 @@ *GotoWindow* 'number' [{'options'}] ['pattern']::

Focuses and activates the window at position 'number' in the focus list. The 'options' and 'pattern' arguments have the same meaning as *NextWindow* above. + +*Activate* ['pattern'] | *Focus* ['pattern']:: + With 'pattern', this is an alias for *GoToWindow* 1 'pattern'. Without, + this behaves like a window command, so that OnWindow events can change + the focused window. *Attach* 'pattern':: Combines all windows that match the 'pattern' into a single tab group.
M doc/fluxbox-keys.5doc/fluxbox-keys.5

@@ -1,11 +1,11 @@

.\" Title: fluxbox-keys .\" Author: .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/> -.\" Date: 08/18/2008 +.\" Date: 08/20/2008 .\" Manual: .\" Source: .\" -.TH "FLUXBOX\-KEYS" "5" "08/18/2008" "" "" +.TH "FLUXBOX\-KEYS" "5" "08/20/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only)

@@ -167,19 +167,6 @@ .RE

.SS "Window Commands" These commands ordinarily affect only the currently focused window\. The \fBOnWindow\fR modifier and \fBForEach\fR command may affect the window that is used\. .PP -\fBActivate\fR [\fIpattern\fR] | \fBFocus\fR [\fIpattern\fR] -.RS 4 -Set the focus to the window matching the argument\. If -\fIpattern\fR -is omitted, this may be used with the -\fBOnWindow\fR -modifier to set the focus\. See -\fBCLIENT PATTERNS\fR -for more about the -\fIpattern\fR -arguments\. -.RE -.PP \fBMinimize\fR | \fBMinimizeWindow\fR | \fBIconify\fR .RS 4 Minimize the current window, equivalent to the window button\.

@@ -261,6 +248,13 @@ \fBsticky\fR

window is visible on all workspaces\. .RE .PP +\fBSetDecor\fR \fIdecor\fR +.RS 4 +Sets which window decorations will be shown\. +\fIdecor\fR +has the same format as the `[Deco]\' parameter in the apps file\. See man fluxbox section APPLICATION SETTINGS for more info\. +.RE +.PP \fBToggleDecor\fR .RS 4 Toggles the presence of the window decorations (title bar, window buttons, and resize bar)\.

@@ -411,7 +405,7 @@ .RE

.PP \fBNextWindow\fR [{\fIoptions\fR}] [\fIpattern\fR] / \fBPrevWindow\fR [{\fIoptions\fR}] [\fIpattern\fR] .RS 4 -Focuses and activates the next / previous window in the focus list\. +Focuses the next / previous window in the focus list\. .PP \fIoptions\fR is one or more of the following, space delimited: .RS 4

@@ -454,6 +448,15 @@ \fIpattern\fR

arguments have the same meaning as \fBNextWindow\fR above\. +.RE +.PP +\fBActivate\fR [\fIpattern\fR] | \fBFocus\fR [\fIpattern\fR] +.RS 4 +With +\fIpattern\fR, this is an alias for +\fBGoToWindow\fR +1 +\fIpattern\fR\. Without, this behaves like a window command, so that OnWindow events can change the focused window\. .RE .PP \fBAttach\fR \fIpattern\fR
M src/CurrentWindowCmd.ccsrc/CurrentWindowCmd.cc

@@ -509,6 +509,15 @@ void SetTitleCmd::real_execute() {

fbwindow().winClient().setTitle(title); } +REGISTER_COMMAND_WITH_ARGS(setdecor, SetDecorCmd, void); + +SetDecorCmd::SetDecorCmd(const std::string &args): + m_mask(FbWinFrame::getDecoMaskFromString(args)) { } + +void SetDecorCmd::real_execute() { + fbwindow().setDecorationMask(m_mask); +} + FbTk::Command<void> *SetAlphaCmd::parse(const string &command, const string &args, bool trusted) { typedef std::vector<string> StringTokens;
M src/CurrentWindowCmd.hhsrc/CurrentWindowCmd.hh

@@ -247,6 +247,15 @@ private:

std::string title; }; +class SetDecorCmd: public WindowHelperCmd { +public: + explicit SetDecorCmd(const std::string &args); +protected: + void real_execute(); +private: + unsigned int m_mask; +}; + class SetAlphaCmd: public WindowHelperCmd { public: SetAlphaCmd(int focus, bool rel, int unfocus, bool unrel);