all repos — ryudo @ 3a2f736ce58210e52bb223b4e5474c48c1e322e3

the floatiling window manager that flows; fork of rio from plan9port

config.h: document GAPSZ should be even; key.c: only use new center ratio; event.c: spawn new terminals with new ratio via kb
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEkFh6dA+k/6CXFXU4O3+8IhROY5gFAmA3N7UACgkQO3+8IhRO
Y5jN5g/+NwraOPlBU7qgMyJNE8YeTXFkn+hQN5VofdPjOmme/ZKFl6duvVhgRfi1
vn/4HfPu07kUkW0z395LNFJgPz+i1cdzIZPbZsZzSdIALOifCnqFmoEhGE29xBPe
i4msAT/E5N8pltWo9HQRW82dmgQhXFDSl0G+Vgz02ZAmhOoeTCzZ//q6rBazjnnz
E9Nfl+TveFoN9qEmcEyIrXTMs+PV6ILLTK0q25o4elxzwLyX1Gq478RxBB/E/KsM
fndPu6EbUbW1s1MSA4t/3rUIz4wddw/A6GTq26tmUUDZlz3L8kA00c4F/AkMGC/B
JAzZ4o68IN5xZnN1MZeIvlH8flAaBEl1zM+CYbzklZWfphBUcN8V6elHREicEMbl
wtAJ/fn8Pv3ErFnbFA/0kOhnjDq9aHAxyJPpRu6EA8XfMYoSm4s8G4o1LSqTlCQU
MAx0vBSdEImzWpA6WlwjVHnlsV0wfcfFsJvaj2UNcpGa7PK7wfKbrB9EPk7WDqsV
ih53ivPIYsKXcXoTwIo22CSmtHVQOyPk9xJACvaE4l88BviLkQ5ryR9G/dKBPnAo
aJdAJDVAUbiNRtUKzHgZArT8Uf8P7IT7xSYniN26vr7LZ0Wt2++FS0w/c0q3B7aQ
iR0fbYDk4nTUyEBatopfRjwxIkwE+w9x7c7J7/+qhksQBQrRk/w=
=cQQf
-----END PGP SIGNATURE-----
commit

3a2f736ce58210e52bb223b4e5474c48c1e322e3

parent

bc38a1ab32404a179c88e79663bfa14f51cce2ac

3 files changed, 28 insertions(+), 27 deletions(-)

jump to
M config.hconfig.h

@@ -5,6 +5,7 @@ #define BORDERCOL 0x000000

#define GHOSTCOL 0x797979 #define BORDER 4 +/* Should be even */ #define GAPSZ 4 #define MENUBORDER 0
M event.cevent.c

@@ -292,7 +292,7 @@ }

if (kbLaunch) { usleep(100000); - quickreshape(c, ra.width/5, ra.height/5, 3*ra.width/5, 3*ra.height/5); + quickreshape(c, ra.width/6, GAPSZ, 2*ra.width/3, ra.height - 2*GAPSZ); kbLaunch = 0; } }
M key.ckey.c

@@ -130,45 +130,45 @@

/* basic wm functionality */ if(e->keycode == tabcode && (e->state&Mod1Mask) == (1<<3)) alttab(e->state&ShiftMask); - if(e->keycode == dcode && (e->state&SHORTCUTMOD) == (MODBITS)) + else if(e->keycode == dcode && (e->state&SHORTCUTMOD) == (MODBITS)) delete(current, 0); - if (e->keycode == icode && (e->state&SHORTCUTMOD) == (MODBITS)) + else if (e->keycode == icode && (e->state&SHORTCUTMOD) == (MODBITS)) hide(current); - if (e->keycode == ucode && (e->state&SHORTCUTMOD) == (MODBITS)) + else if (e->keycode == ucode && (e->state&SHORTCUTMOD) == (MODBITS)) unhide(0, 1); - if (e->keycode == vcode && (e->state&SHORTCUTMOD) == (MODBITS)) + else if (e->keycode == vcode && (e->state&SHORTCUTMOD) == (MODBITS)) move(current, Button3); - if (e->keycode == rcode && (e->state&SHORTCUTMOD) == (MODBITS)) + else if (e->keycode == rcode && (e->state&SHORTCUTMOD) == (MODBITS)) reshape(current, Button3, sweep, 0); - if (e->keycode == mcode && (e->state&SHORTCUTMOD) == (MODBITS)) + else if (e->keycode == mcode && (e->state&SHORTCUTMOD) == (MODBITS)) quickreshape(current, -BORDER, -BORDER, ra.width + 2*BORDER, ra.height + 2*BORDER); - if (e->keycode == scode && (e->state&SHORTCUTMOD) == (MODBITS)) + else if (e->keycode == scode && (e->state&SHORTCUTMOD) == (MODBITS)) stick(current); /* half snap */ - if (e->keycode == hcode && (e->state&SHORTCUTMOD) == (MODBITS)) - 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 + GAPSZ, GAPSZ, ra.width/2 - 2*GAPSZ, ra.height - 2*GAPSZ); - if (e->keycode == jcode && (e->state&SHORTCUTMOD) == (MODBITS)) - 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, GAPSZ, GAPSZ, ra.width - 2*GAPSZ, ra.height/2 - 2*GAPSZ); + else if (e->keycode == hcode && (e->state&SHORTCUTMOD) == (MODBITS)) + quickreshape(current, GAPSZ, GAPSZ, ra.width/2 - 1.5*GAPSZ, ra.height - 2*GAPSZ); + else if (e->keycode == lcode && (e->state&SHORTCUTMOD) == (MODBITS)) + quickreshape(current, ra.width/2 + 0.5*GAPSZ, GAPSZ, ra.width/2 - 1.5*GAPSZ, ra.height - 2*GAPSZ); + else if (e->keycode == jcode && (e->state&SHORTCUTMOD) == (MODBITS)) + quickreshape(current, GAPSZ, ra.height/2 + 0.5*GAPSZ, ra.width - 2*GAPSZ, ra.height/2 - 1.5*GAPSZ); + else if (e->keycode == kcode && (e->state&SHORTCUTMOD) == (MODBITS)) + quickreshape(current, GAPSZ, GAPSZ, ra.width - 2*GAPSZ, ra.height/2 - 1.5*GAPSZ); /* quarter snap */ - if (e->keycode == qcode && (e->state&SHORTCUTMOD) == (MODBITS)) - quickreshape(current, GAPSZ, GAPSZ, ra.width/2 - 2*GAPSZ, ra.height/2 - 2*GAPSZ); - if (e->keycode == wcode && (e->state&SHORTCUTMOD) == (MODBITS)) - 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 + 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 + GAPSZ, GAPSZ, ra.width/2 - 2*GAPSZ, ra.height/2 - 2*GAPSZ); + else if (e->keycode == qcode && (e->state&SHORTCUTMOD) == (MODBITS)) + quickreshape(current, GAPSZ, GAPSZ, ra.width/2 - 1.5*GAPSZ, ra.height/2 - 1.5*GAPSZ); + else if (e->keycode == wcode && (e->state&SHORTCUTMOD) == (MODBITS)) + quickreshape(current, GAPSZ, ra.height/2 + 0.5*GAPSZ, ra.width/2 - 1.5*GAPSZ, ra.height/2 - 1.5*GAPSZ); + else if (e->keycode == ocode && (e->state&SHORTCUTMOD) == (MODBITS)) + quickreshape(current, ra.width/2 + 0.5*GAPSZ, ra.height/2 + 0.5*GAPSZ, ra.width/2 - 1.5*GAPSZ, ra.height/2 - 1.5*GAPSZ); + else if (e->keycode == pcode && (e->state&SHORTCUTMOD) == (MODBITS)) + quickreshape(current, ra.width/2 + 0.5*GAPSZ, GAPSZ, ra.width/2 - 1.5*GAPSZ, ra.height/2 - 1.5*GAPSZ); /* center snap */ - if (e->keycode == ccode && (e->state&SHORTCUTMOD) == (MODBITS)) - quickreshape(current, ra.width/5, ra.height/5, 3*ra.width/5, 3*ra.height/5); - + else if (e->keycode == ccode && (e->state&SHORTCUTMOD) == (MODBITS)) + quickreshape(current, ra.width/6, GAPSZ, 2*ra.width/3, ra.height - 2*GAPSZ); + #ifdef DEVEL /* manage autostuck windows */ if (e->keycode == tcode && (e->state&SHORTCUTMOD) == (MODBITS))