From 546f7d2518a86d43c9591e1e056cdf0f98c5f40a Mon Sep 17 00:00:00 2001 From: BossCode45 Date: Tue, 23 Aug 2022 17:26:44 +1200 Subject: Rice gaps in config and fixed gap calculations --- config.h | 4 ++-- main.cpp | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config.h b/config.h index 55128bb..f7cd70e 100644 --- a/config.h +++ b/config.h @@ -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 diff --git a/main.cpp b/main.cpp index 1a2f0ec..4633f5d 100644 --- a/main.cpp +++ b/main.cpp @@ -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, -- cgit v1.2.3