aboutsummaryrefslogtreecommitdiff
path: root/src/ClientPattern.hh
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2010-09-11 15:09:07 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2010-09-11 15:09:07 (GMT)
commitfaa4c978885ceacfb75b0088e8c5a362a41794f6 (patch)
tree600e09fafca10e702150abac9e852f8aa6ef38c3 /src/ClientPattern.hh
parent4e2c7e2167a0e0efbfc73c1b226eaafa808736ee (diff)
downloadfluxbox-faa4c978885ceacfb75b0088e8c5a362a41794f6.zip
fluxbox-faa4c978885ceacfb75b0088e8c5a362a41794f6.tar.bz2
added 'SetXProp' action and (@PROP=foo) clientpattern
these two allow 'tagging' of arbitrary windows with 'tags' (or 'labels'). such 'tagged' windows can then be used in ':NextWindow (@PROP=foo)' commands to quickly cycle through a subset of available windows. since the 'tags' are applied as real xproperties to a window they survive a restart of fluxbox or even another windowmanager. the user can also set the tags by using xprop(1). the next step regarding the UI should be to visualize the tags of a window.
Diffstat (limited to 'src/ClientPattern.hh')
-rw-r--r--src/ClientPattern.hh7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ClientPattern.hh b/src/ClientPattern.hh
index 6aa2e11..315edb1 100644
--- a/src/ClientPattern.hh
+++ b/src/ClientPattern.hh
@@ -54,7 +54,8 @@ public:
54 enum WinProperty { 54 enum WinProperty {
55 TITLE = 0, CLASS, NAME, ROLE, TRANSIENT, 55 TITLE = 0, CLASS, NAME, ROLE, TRANSIENT,
56 MAXIMIZED, MINIMIZED, SHADED, STUCK, FOCUSHIDDEN, ICONHIDDEN, 56 MAXIMIZED, MINIMIZED, SHADED, STUCK, FOCUSHIDDEN, ICONHIDDEN,
57 WORKSPACE, WORKSPACENAME, HEAD, LAYER, URGENT, SCREEN 57 WORKSPACE, WORKSPACENAME, HEAD, LAYER, URGENT, SCREEN,
58 XPROP
58 }; 59 };
59 60
60 /// Does this client match this pattern? 61 /// Does this client match this pattern?
@@ -70,9 +71,11 @@ public:
70 * Add an expression to match against 71 * Add an expression to match against
71 * @param str is a regular expression 72 * @param str is a regular expression
72 * @param prop is the member function that we wish to match against 73 * @param prop is the member function that we wish to match against
74 * @param negate is if the term should be negated
75 * @param xprop is the name of the prop if prop is XPROP
73 * @return false if the regexp wasn't valid 76 * @return false if the regexp wasn't valid
74 */ 77 */
75 bool addTerm(const FbTk::FbString &str, WinProperty prop, bool negate = false); 78 bool addTerm(const FbTk::FbString &str, WinProperty prop, bool negate = false, const FbTk::FbString& xprop = FbTk::FbString());
76 79
77 void addMatch() { ++m_nummatches; } 80 void addMatch() { ++m_nummatches; }
78 void removeMatch() { --m_nummatches; } 81 void removeMatch() { --m_nummatches; }