Re: [dwm] nmaster-4.7 updated

From: Rickard Gustafsson <rickard_AT_allyourbase.se>
Date: Sat, 1 Dec 2007 18:22:56 +0100

Something like swap has been posted before done by k-zed and Szabolcs
Nagy. It was done for DWM 4.1 I think.

void
pushup(const char *arg) {
        Client *c;
                                                                             
        if(!sel || lt->arrange == floating || sel->isfloating)
                return;
        if((c = prevtiled(sel->prev))) {
                /* attach before c */
                detach(sel);
                sel->next = c;
                sel->prev = c->prev;
                c->prev = sel;
                if(sel->prev)
                        sel->prev->next = sel;
        } else {
                /* move to the end */
                for(c = sel; c->next; c = c->next);
                detach(sel);
                sel->prev = c;
                c->next = sel;
        }
        focus(sel);
        lt->arrange();
}
                                                                                                                                               
void
pushdown(const char *arg) {
        Client *c;
                                                                                          
        if(!sel || lt->arrange == floating || sel->isfloating)
                return;
        if((c = nexttiled(sel->next))) {
                /* attach after c */
                detach(sel);
                sel->prev = c;
                sel->next = c->next;
                c->next = sel;
                if(sel->next)
                        sel->next->prev = sel;
        } else {
                /* move to the front */
                detach(sel);
                attach(sel);
        }
        focus(sel);
        lt->arrange();
}

On [Sat 01.12.2007 17:11], pancake wrote:
> Some users noticed me a bug that makes zoom() inusable when switching between floating and
> ntile or tilecols. I missed to type:
>
> domwfact = dozoom = True;
>
> I have also added a new optional variable in config.h called CPT to define the initial value
> for the cpt variable. I think that #define CPT 5 is probably the most useful value, but when
> using nmaster, the CPT should be 6 or 7,..so maybe i can mix cpt with nmaster, will be interesting
> to see if it's cleaner or not to use.
>
> I have also added some new functions enabled by EXPERIMENTAL. All of them are buggy and not
> currently working, but are tests im doing and want to receive feedback.
>
> #define EXPERIMENTAL True
>
> The new function available into EXPERIMENTAL is swap() which receives "+1" or "-1" as argument,
> and it just swaps two clients inside the clients list. This is a c&p from awesome. So it doesn't
> works with the dwm base, but now i have no time to implement it. So if anybody of us want to
> play with it. Send me the patch O:)
>
> I feel that the swap() function of awesome is really useful, and imho should be implemented
> into the dwm base. With swapnext() and swapprev(). Does anybody have tested this functionality?
>
> --pancake
>
Received on Sat Dec 01 2007 - 18:22:57 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:08:29 UTC