about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAnselm R.Garbe <arg@10ksloc.org>2006-08-16 15:00:14 +0200
committerAnselm R.Garbe <arg@10ksloc.org>2006-08-16 15:00:14 +0200
commit56130c36894edd0c730e5c8ee0ac07cad524d176 (patch)
tree506d57cbc57ff402e188793787d80f5ecc4320a8
parent14f7380308c4213aac7956c272dec0d23c2f42d3 (diff)
downloaddwm-56130c36894edd0c730e5c8ee0ac07cad524d176.tar.gz
added sample command to config.default.h to highlight how to query class:instance info with a one-liner of shell commands
-rw-r--r--config.default.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/config.default.h b/config.default.h
index 9d99794..527941c 100644
--- a/config.default.h
+++ b/config.default.h
@@ -48,6 +48,8 @@ static Key key[] = { \
 	{ MODKEY|ShiftMask,		XK_q,		quit,		{ 0 } }, \
 };
 
+/* Query class:instance for regex matching info with following command:
+ * ; xprop | grep WM_CLASS | sed 's/"//g;s/,//g' | awk '{ printf("%s:%s", $4, $3) }' */
 #define RULES \
 static Rule rule[] = { \
 	/* class:instance regex		tags regex	isfloat */ \
ht .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#!/usr/bin/python
"""Run all the tests inside the test/ directory as a test suite."""
if __name__ == '__main__':
	import unittest
	from test import *
	from sys import exit, argv

	try:
		verbosity = int(argv[1])
	except IndexError:
		verbosity = 2

	tests = []
	for key, val in vars().copy().items():
		if key.startswith('tc_'):
			tests.extend(v for k,v in vars(val).items() if type(v) == type)

	suite = unittest.TestSuite(map(unittest.makeSuite, tests))
	result = unittest.TextTestRunner(verbosity=verbosity).run(suite)
	if len(result.errors) + len(result.failures) > 0:
		exit(1)