all repos — ryudo @ 2da43562b5a8debe6f3e17390c451ddc8cf1a2a5

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

Merge branch 'master' of https://gitlab.com/nilix/ryudo
Iris Lightshard nilix@nilfm.cc
commit

2da43562b5a8debe6f3e17390c451ddc8cf1a2a5

parent

1bd8d82bfef1004459bd15b78d92e2dd0f190f38

4 files changed, 34 insertions(+), 6 deletions(-)

jump to
M config.hconfig.h

@@ -10,7 +10,7 @@ #define MBORDERCOL 0x000000

#define MENUFGCOL 0x797979 #define MENUBGCOL 0x000000 #define SMENUFGCOL 0x000000 -#define SMENUBGCOL 0x797979 +#define SMENUBGCOL 0x1f9b92 #define SHORTCUTMOD Mod4Mask #define MODBITS (1<<6)
M event.cevent.c

@@ -5,6 +5,7 @@ */

#include <stdio.h> #include <stdlib.h> +#include <time.h> #include <X11/X.h> #include <X11/Xos.h> #include <X11/Xlib.h>

@@ -287,6 +288,7 @@ c->parent = c->screen->root;

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

@@ -39,6 +39,7 @@ int i;

int tabcode = XKeysymToKeycode(dpy, XK_Tab); int dcode = XKeysymToKeycode(dpy, DESTROY_KEY); int icode = XKeysymToKeycode(dpy, ICON_KEY); + int ucode = XKeysymToKeycode(dpy, UNHIDE_KEY); int mcode = XKeysymToKeycode(dpy, MAX_KEY); int vcode = XKeysymToKeycode(dpy, MOVE_KEY); int rcode = XKeysymToKeycode(dpy, RESIZE_KEY);

@@ -59,6 +60,7 @@ for(i=0; i<num_screens; i++){

XGrabKey(dpy, tabcode, Mod1Mask, screens[i].root, 0, GrabModeSync, GrabModeAsync); XGrabKey(dpy, dcode, SHORTCUTMOD, screens[i].root, 0, GrabModeSync, GrabModeAsync); XGrabKey(dpy, icode, SHORTCUTMOD, screens[i].root, 0, GrabModeSync, GrabModeAsync); + XGrabKey(dpy, ucode, SHORTCUTMOD, screens[i].root, 0, GrabModeSync, GrabModeAsync); XGrabKey(dpy, rcode, SHORTCUTMOD, screens[i].root, 0, GrabModeSync, GrabModeAsync); XGrabKey(dpy, vcode, SHORTCUTMOD, screens[i].root, 0, GrabModeSync, GrabModeAsync); XGrabKey(dpy, mcode, SHORTCUTMOD, screens[i].root, 0, GrabModeSync, GrabModeAsync);

@@ -90,6 +92,7 @@ */

int tabcode = XKeysymToKeycode(dpy, XK_Tab); int dcode = XKeysymToKeycode(dpy, DESTROY_KEY); int icode = XKeysymToKeycode(dpy, ICON_KEY); + int ucode = XKeysymToKeycode(dpy, UNHIDE_KEY); int mcode = XKeysymToKeycode(dpy, MAX_KEY); int vcode = XKeysymToKeycode(dpy, MOVE_KEY); int rcode = XKeysymToKeycode(dpy, RESIZE_KEY);

@@ -115,8 +118,10 @@ if(e->keycode == tabcode && (e->state&Mod1Mask) == (1<<3))

alttab(e->state&ShiftMask); if(e->keycode == dcode && (e->state&SHORTCUTMOD) == (MODBITS)) delete(current, 0); - if(e->keycode == icode && (e->state&SHORTCUTMOD) == (MODBITS)) + if (e->keycode == icode && (e->state&SHORTCUTMOD) == (MODBITS)) hide(current); + if (e->keycode == ucode && (e->state&SHORTCUTMOD) == (MODBITS)) + unhide(0, 1); if (e->keycode == vcode && (e->state&SHORTCUTMOD) == (MODBITS)) move(current, Button3); if (e->keycode == rcode && (e->state&SHORTCUTMOD) == (MODBITS))

@@ -173,11 +178,18 @@ }

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

@@ -191,6 +203,8 @@

void quickreshape(Client *c, int x, int y, int dx, int dy) { + if (c == 0) + return; XMoveResizeWindow(dpy, c->parent, x,y, dx, dy); c->x = x + BORDER; c->y = y + BORDER;