diff --git a/README.md b/README.md index b9567cc..c79595f 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ cerberus * Bare minimum EWMH to support panels and [simpleswitcher](https://github.com/seanpringle/simpleswitcher) * A few keyboard controls for moving, focusing, cycling, closing. * Transient windows and dialogs are centered on parent, not tiled. +* Splash screens and notification popups are displayed as requested, not tiled. * config.h for customization of borders and keys. ### The Layout diff --git a/cerberus.c b/cerberus.c index bad7f5a..2ff979b 100644 --- a/cerberus.c +++ b/cerberus.c @@ -296,28 +296,28 @@ void spot_xywh(int spot, int *x, int *y, int *w, int *h) { spot = MAX(SPOT1, MIN(SPOT3, spot)); - int width_3rd = screen_w/3; - int height_3rd = screen_h/3; + int width_spot1 = (double)screen_w / 100 * SPOT1_WIDTH_PCT; + int height_spot2 = (double)screen_h / 100 * SPOT2_HEIGHT_PCT; // default, left 2/3 of screen - *x = screen_x, *y = screen_y, *w = screen_w - width_3rd, *h = screen_h; + *x = screen_x, *y = screen_y, *w = width_spot1, *h = screen_h; switch (spot) { // right top 2/9 of screen case SPOT2: - *x = screen_x + screen_w - width_3rd; + *x = screen_x + width_spot1; *y = screen_y; - *w = width_3rd; - *h = screen_h - height_3rd; + *w = screen_w - width_spot1; + *h = height_spot2; break; // right bottom 1/9 of screen case SPOT3: - *x = screen_x + screen_w - width_3rd; - *y = screen_y + screen_h - height_3rd; - *w = width_3rd; - *h = height_3rd; + *x = screen_x + width_spot1; + *y = screen_y + height_spot2; + *w = screen_w - width_spot1; + *h = screen_h - height_spot2; break; } } diff --git a/config.h b/config.h index c3a66d6..a02e24e 100644 --- a/config.h +++ b/config.h @@ -4,6 +4,9 @@ #define BORDER_FOCUS "Royal Blue" #define SPOT_START SPOT1 +#define SPOT1_WIDTH_PCT 67 +#define SPOT2_HEIGHT_PCT 67 + binding keys[] = { { .mod = Mod4Mask, .key = XK_1, .act = ACTION_FOCUS_SPOT1 }, { .mod = Mod4Mask, .key = XK_2, .act = ACTION_FOCUS_SPOT2 },