all repos — ryudo @ 662e30eb40322474e8ab0639ae034c75ed5f398d

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

Merge branch 'revert' into 'master'

truncate long window labels, maximized windows have no visible border, fix makefile

See merge request nilix/ryudo!1
Derek Stevens drkste@zoho.com
commit

662e30eb40322474e8ab0639ae034c75ed5f398d

parent

67a83975168ed5c3242b81e05c713f97ebd9be92

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

jump to
M key.ckey.c

@@ -106,11 +106,8 @@ int ccode = XKeysymToKeycode(dpy, SNAPCENTER_KEY);

int rightcode = XKeysymToKeycode(dpy, NEXTVIRT_KEY); int leftcode = XKeysymToKeycode(dpy, PREVVIRT_KEY); - static int scrw = 0; - static int scrh = 0; - - scrw = current->screen->width; - scrh = current->screen->height; + static XWindowAttributes ra; + XGetWindowAttributes(dpy, DefaultRootWindow(dpy), &ra); /* basic wm functionality */

@@ -123,7 +120,7 @@ move(current, Button3);

if (e->keycode == rcode && (e->state&SHORTCUTMOD) == (MODBITS)) reshape(current, Button3, sweep, 0); if (e->keycode == mcode && (e->state&SHORTCUTMOD) == (MODBITS)) - quickreshape(current, -BORDER, -BORDER, scrw+BORDER, scrh+BORDER); + quickreshape(current, -BORDER, -BORDER, ra.width + 2*BORDER, ra.height + 2*BORDER); /* half snap */ if (e->keycode == hcode && (e->state&SHORTCUTMOD) == (MODBITS))

@@ -173,12 +170,12 @@ }

} /* switch virts */ - if (e->keycode == rightcode && (e->state&SHORTCUTMOD) == (MODBITS)) - if (numvirtuals > 1 && virt < numvirtuals - 1) - switch_to(virt + 1); - if (e->keycode == leftcode && (e->state&SHORTCUTMOD) == (MODBITS)) - if (numvirtuals >1 && virt > 0) - switch_to(virt - 1); + if (e->keycode == rightcode && (e->state&SHORTCUTMOD) == (MODBITS)) + if (numvirtuals > 1 && virt < numvirtuals - 1) + switch_to(virt + 1); + if (e->keycode == leftcode && (e->state&SHORTCUTMOD) == (MODBITS)) + if (numvirtuals >1 && virt > 0) + switch_to(virt - 1); XAllowEvents(dpy, SyncKeyboard, e->time); }
M manage.cmanage.c

@@ -341,7 +341,8 @@

void setlabel(Client *c) { - char *label, *p, *lc, i; + char *label, *p, *lc; + int i; if(c->iconname != 0) label = c->iconname;

@@ -355,13 +356,13 @@ else

label = "no label"; if((p = index(label, ':')) != 0) *p = '\0'; - for (lc = label, i = 0; lc++, i++; *lc != 0){ - if (i >= 24) - { - label[22] = '~'; - label[23] = '\0'; - } - } + for (i = 0, lc = label; *lc != '\0'; lc++, i++){ + if (i >= 23){ + label[22] = '~'; + label[23] = '\0'; + } + } + c->label = label; }
M mkriorules.shmkriorules.sh

@@ -1,8 +1,1 @@

-if [ "x$WSYSTYPE" != xx11 ]; then - echo 'default:V: all' - echo - echo 'all install clean nuke:' - echo ' # WSYSTYPE is not x11, and ryudo is only for x11' - exit 0 -fi cat $PLAN9/src/mkmany