/* tagging */
static const char *tags[] = { "`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "[", "]" };
+// the ENV var WORKSPACE_NUMBER (passed to terminal) will use these names instead:
static const char *workspace_numbers_str[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12" };
#define TBC(tag, wclass) { wclass, NULL, NULL, 1 << tag, False, False, -1 },
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 accross dwm restarts
+ // 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"; }
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
//static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
-char WORKSPACE_NUMBER[] = "WORKSPACE_NUMBER=00";
+char WORKSPACE_NUMBER[] = "WORKSPACE_NUMBER=00"; // if you change the _length_ of this string, update spawn() in dwm.c. This is the ENV var passed to your terminal. The value is pulled from workspace_numbers_str based on the active tag.
static const char *termcmd[] = { "env", (const char *)(&(WORKSPACE_NUMBER[0])), "st", NULL };
static Key keys[] = {