Re: [dwm] Anyway to launch a program with specific tags?

From: Szabolcs Nagy <>
Date: Sun, 3 Jun 2007 10:05:36 +0200

> it was suggested that X resources could carry tag information..
> my only missing need is getting stuff launched with the right tags.. in a

a bit hackish solution but imho works:
add a setnextwindowtag flag and a nexttag

setnexttag(const char *arg){
    setnextwindowtag = True;
    nexttag = atoi(arg);

in tag.c modify settags()

else {
    if (setnextwindowtag) {
        setnextwindowtag = False;
        c->tags[nexttag] = True;
    } else {

now eg setnexttag("3") can be bind to Mod+x, so after you hit Mod+x
the next launched window will go on the 3rd tag.

it's a bit risky since other window can apear between Mod+x and the
launch, or sometimes one may want to tag more than one windows at once
(eg gimp), but this can be used as a simple workaround

Received on Sun Jun 03 2007 - 10:05:38 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:43:40 UTC