-static Rule rules[] = {
- /* class instance title tags mask isfloating */
- { "Gimp", NULL, NULL, 0, True },
- { "Firefox", NULL, NULL, 1 << 8, True },
+#define TBC(tag, wclass) { wclass, NULL, NULL, 1 << tag, False, False, -1 },
+#define TBT(tag, title) { NULL, NULL, title, 1 << tag, False, False, -1 },
+#define SHBC(tag, wclass) { wclass, NULL, NULL, 1 << tag, False, True, -1 },
+static const Rule rules[] = {
+ /* xprop(1):
+ * WM_CLASS(STRING) = instance, class
+ * WM_NAME(STRING) = title
+ */
+ // Tag By Class
+ TBC( 1, "Chromium")
+ TBC( 1, "Firefox")
+ TBC( 1, "Iceweasel")
+ TBC(10, "Pidgin")
+ // Screen Hog (By class) + tag
+ SHBC( 2, "Inkscape")
+ SHBC( 2, "org-openstreetmap-josm-Main") // Josm (both splash and main window)
+ SHBC( 5, "Gimp")
+ // Tag By Title (matches prefix)
+ // These rules are used to keep terminals in the right workspace (tag) accross dwm restarts
+ // Put something like this in your .zshrc:
+ // function preexec { echo -ne "\033]0;w$WORKSPACE_NUMBER: $1\a"; }
+ // function precmd { echo -ne "\033]0;w$WORKSPACE_NUMBER: $PWD\a"; }
+ TBT( 1, "w1: ")
+ TBT( 2, "w2: ")
+ TBT( 3, "w3: ")
+ TBT( 4, "w4: ")
+ TBT( 5, "w5: ")
+ TBT( 6, "w6: ")
+ TBT( 7, "w7: ")
+ TBT( 8, "w8: ")
+ TBT( 9, "w9: ")
+ TBT(10, "w10: ")
+ TBT(11, "w11: ")
+ TBT(12, "w12: ")