Re: [dwm] stacked cpt patch updated!

From: pancake <pancake_AT_youterm.com>
Date: Mon, 26 Nov 2007 01:36:15 +0100

I have updated the patch again fixing the 1 pixel gap and the height calculation
of slave area clients. Now it looks pretty perfect. The setcpth function has been
set cleaner by limitting the maximum and minimum sizes for the bottom stack area.

I have also updated the documentation with some ascii stuff:

 http://news.nopcode.org/nmaster-4.7.c

TITLE
-----
 descrp: ntile/tilecols layouts with clientspertag for dwm-4.7
 author: pancake <youterm.com>
 update: 2007-11-26

CONFIGURATION
-------------
 You should modify your config.h to include "nmaster.c" AFTER setting
 the NMASTER, NCOLS, NROWS, BORDERPX, and RESIZEHINTS macro definitions
 and BEFORE the layouts definition.

 A sample configuration with ntile will be:

   #define NMASTER 1
   #define NCOLS 1
   #define NROWS 1
   #define CPTH 32
   #include "nmaster-4.7.c"
   
   Layout layouts[] = {
        { "-|=" , ntile },
        // ...
   };

   // keys
    { MODKEY|ShiftMask , XK_j , setnmaster , "+1" } , \
    { MODKEY|ShiftMask , XK_k , setnmaster , "-1" } , \
    { MODKEY , XK_q , clientspertag ,"^1" } , \
    { MODKEY , XK_w , clientspertag , "2" } , \
    { MODKEY , XK_e , clientspertag , "3" } , \
    { MODKEY , XK_n , setcpth , "+32" } , \
    { MODKEY|ShiftMask , XK_n , setcpth , "-32" } , \

 clientspertag:

  both of them features the new cpt patch (clients per tag) which enables
  to define the maximum number of clients you want to focus, the rest are
  stacked at the bottom of the screen. This area has CPTH height and this
  value can be changed on the fly using the setcpth function.

  +------+----+
  | | | Valid values are:
  | |----| -1 - show all clients
  | | | 0 - show all clients in the bottom stack area
  +---+--^+---+ >0 - show N clients
  +---+---+---+

    #define CPTH 32 // num of pixels of the height of the stacked cpt area
 
    { MODKEY , XK_q , clientspertag ,"^1" } , \
    { MODKEY , XK_w , clientspertag , "2" } , \
    { MODKEY , XK_e , clientspertag , "3" } , \
    { MODKEY , XK_r , clientspertag , "4" } , \
    { MODKEY , XK_t , clientspertag , "5" } , \
 
    { MODKEY , XK_n , setcpth , "+32" } , \
    { MODKEY|ShiftMask , XK_n , setcpth , "-32" } , \

 This source adds two new layouts:

 ntile:

  +-----+--+
  |_____|--|
  | |--|
  +-----+--+

    #define NMASTER 1

    { "-|=" , ntile } , \

    { MODKEY|ShiftMask , XK_j , setnmaster , "+1" } , \
    { MODKEY|ShiftMask , XK_k , setnmaster , "-1" } , \

 tilecols:

  +--+--+--+
  |__| |__|
  | | | |
  +--+--+--+

    #define NCOLS 2
    #define NROWS 1

    { "E|]" , tilecols } , \

    { MODKEY|ShiftMask , XK_j , setnrows , "+1" } , \
    { MODKEY|ShiftMask , XK_k , setnrows , "-1" } , \
    { MODKEY|ShiftMask , XK_h , setncols , "+1" } , \
    { MODKEY|ShiftMask , XK_l , setncols , "-1" } , \

  --pancake
Received on Mon Nov 26 2007 - 01:36:11 UTC

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