diff options
| author | BossCode45 <human.cyborg42@gmail.com> | 2022-08-23 17:26:44 +1200 |
|---|---|---|
| committer | BossCode45 <human.cyborg42@gmail.com> | 2022-08-23 17:26:44 +1200 |
| commit | 546f7d2518a86d43c9591e1e056cdf0f98c5f40a (patch) | |
| tree | 1133f842ab1ee83fe538daccf0b64fda5e309e57 | |
| parent | 40d9524fe17457a93ab71f710aafdfa929f721fe (diff) | |
| download | YATwm-546f7d2518a86d43c9591e1e056cdf0f98c5f40a.tar.gz YATwm-546f7d2518a86d43c9591e1e056cdf0f98c5f40a.zip | |
Rice gaps in config and fixed gap calculations
| -rw-r--r-- | config.h | 4 | ||||
| -rw-r--r-- | main.cpp | 12 |
2 files changed, 8 insertions, 8 deletions
@@ -6,8 +6,8 @@ std::string startup[] = {"picom -fD 3", "feh --bg-scale /usr/share/backgrounds/vapor_trails_blue.png"}; //Main config -int gaps = 3; -int outerGaps = 3; +int gaps = 10; +int outerGaps = 30; //Keys //The types and perhaps functions likely to be moved to seperate header file later @@ -225,7 +225,7 @@ void destroyNotify(XDestroyWindowEvent e) static int OnXError(Display* display, XErrorEvent* e) { - cout << "XError\n"; + cout << "XError " << e->type << ":\n"; return 0; } @@ -249,8 +249,8 @@ void tile(int frameID, int x, int y, int w, int h) i++; if(i==subFrameIDs.size()) { - wW = (dir==horizontal) ? w - wX : w; - wH = (dir==vertical) ? h - wY : h; + wW = (dir==horizontal) ? w - wX + outerGaps : w; + wH = (dir==vertical) ? h - wY + outerGaps : h; } if(!f.isClient) { @@ -259,10 +259,10 @@ void tile(int frameID, int x, int y, int w, int h) } wX += gaps; wY += gaps; - wW -= gaps*2; - wH -= gaps*2; + wW -= gaps * 2; + wH -= gaps * 2; Client c = clients.find(f.cID)->second; - //printf("Arranging client with frame ID %i, client ID %i:\n\tx: %i, y: %i, w: %i, h: %i\n", fID, c.ID, wX, wY, wW, wH); + printf("Arranging client with frame ID %i, client ID %i:\n\tx: %i, y: %i, w: %i, h: %i\n", fID, c.ID, wX, wY, wW, wH); XMoveWindow(dpy, c.w, wX, wY); XResizeWindow(dpy, c.w, |
