Hi there,

I applied the togglefloat patch to mainstream dwm and bound it
to $MODKEY-Shift-space - I consider this feature useful in
several cases when one only wants to make the selected client
floating and not the rest.

Also, I changed the Key structure as follows:

Old:

typedef struct {
        unsigned long mod;
        KeySym keysym;
        void (*func)(Arg *arg);
        Arg arg;
} Key;


New:

typedef struct {
        unsigned long mod;
        KeySym keysym;
        void (*func[NFUNCS])(Arg *arg);
                   ^^^^^^^^
        Arg arg;
} Key;


This results that config.h now needs the additional NFUNCS macro
which defines the number of functions in the array of a key
definition (default is 1). Assumed you

#define NFUNCS 2

you can now declare shortcuts like:

static Key key[] = { \
                /* modifier                                     key             
        functions                               arguments */ \
                { ControlMask|ShiftMask,        XK_1,           { tag, view },  
                {.i = 0 } }, \
                { MODKEY,                                       XK_m,           
{ togglefloat, zoom },  { 0 } }, \
...
};

This avoids such weird patches to implement tagandview or
maxtiled stuff and other things - with 3 additional LOC only.

Regards,
-- 
 Anselm R. Garbe >< http://suckless.org/~arg/ >< GPG key: 0D73F361

Reply via email to