config.h, key.c: add gaps for psuedotiling
This commit is contained in:
parent
d06638a1eb
commit
bc38a1ab32
2 changed files with 10 additions and 8 deletions
2
config.h
2
config.h
|
@ -5,6 +5,8 @@
|
|||
#define GHOSTCOL 0x797979
|
||||
#define BORDER 4
|
||||
|
||||
#define GAPSZ 4
|
||||
|
||||
#define MENUBORDER 0
|
||||
#define MBORDERCOL 0x000000
|
||||
#define MENUFGCOL 0x797979
|
||||
|
|
16
key.c
16
key.c
|
@ -147,23 +147,23 @@ keypress(XKeyEvent *e)
|
|||
|
||||
/* half snap */
|
||||
if (e->keycode == hcode && (e->state&SHORTCUTMOD) == (MODBITS))
|
||||
quickreshape(current, 0, 0, ra.width/2, ra.height);
|
||||
quickreshape(current, GAPSZ, GAPSZ, ra.width/2 - 2*GAPSZ, ra.height - 2*GAPSZ);
|
||||
if (e->keycode == lcode && (e->state&SHORTCUTMOD) == (MODBITS))
|
||||
quickreshape(current, ra.width/2, 0, ra.width/2, ra.height);
|
||||
quickreshape(current, ra.width/2 + GAPSZ, GAPSZ, ra.width/2 - 2*GAPSZ, ra.height - 2*GAPSZ);
|
||||
if (e->keycode == jcode && (e->state&SHORTCUTMOD) == (MODBITS))
|
||||
quickreshape(current, 0, ra.height/2, ra.width, ra.height/2);
|
||||
quickreshape(current, GAPSZ, ra.height/2 + GAPSZ, ra.width - 2*GAPSZ, ra.height/2 - 2*GAPSZ);
|
||||
if (e->keycode == kcode && (e->state&SHORTCUTMOD) == (MODBITS))
|
||||
quickreshape(current, 0, 0, ra.width, ra.height/2);
|
||||
quickreshape(current, GAPSZ, GAPSZ, ra.width - 2*GAPSZ, ra.height/2 - 2*GAPSZ);
|
||||
|
||||
/* quarter snap */
|
||||
if (e->keycode == qcode && (e->state&SHORTCUTMOD) == (MODBITS))
|
||||
quickreshape(current, 0, 0, ra.width/2, ra.height/2);
|
||||
quickreshape(current, GAPSZ, GAPSZ, ra.width/2 - 2*GAPSZ, ra.height/2 - 2*GAPSZ);
|
||||
if (e->keycode == wcode && (e->state&SHORTCUTMOD) == (MODBITS))
|
||||
quickreshape(current, 0, ra.height/2, ra.width/2, ra.height/2);
|
||||
quickreshape(current, GAPSZ, ra.height/2 + GAPSZ, ra.width/2 - 2*GAPSZ, ra.height/2 - 2*GAPSZ);
|
||||
if (e->keycode == ocode && (e->state&SHORTCUTMOD) == (MODBITS))
|
||||
quickreshape(current, ra.width/2, ra.height/2, ra.width/2, ra.height/2);
|
||||
quickreshape(current, ra.width/2 + GAPSZ, ra.height/2 + GAPSZ, ra.width/2 - 2*GAPSZ, ra.height/2 - 2*GAPSZ);
|
||||
if (e->keycode == pcode && (e->state&SHORTCUTMOD) == (MODBITS))
|
||||
quickreshape(current, ra.width/2, 0, ra.width/2, ra.height/2);
|
||||
quickreshape(current, ra.width/2 + GAPSZ, GAPSZ, ra.width/2 - 2*GAPSZ, ra.height/2 - 2*GAPSZ);
|
||||
|
||||
/* center snap */
|
||||
if (e->keycode == ccode && (e->state&SHORTCUTMOD) == (MODBITS))
|
||||
|
|
Loading…
Reference in a new issue