From 362963fa2b597a9694f88caddc28a972cfe9df44 Mon Sep 17 00:00:00 2001 From: Dragon-Chicken <70321204+Dragon-Chicken@users.noreply.github.com> Date: Mon, 27 Oct 2025 19:39:48 +0530 Subject: fixed tabs converted spaces into tabs --- patches/single-window-gaps-dragonchicken.patch | 73 +++++++++++++------------- 1 file changed, 36 insertions(+), 37 deletions(-) (limited to 'patches/single-window-gaps-dragonchicken.patch') diff --git a/patches/single-window-gaps-dragonchicken.patch b/patches/single-window-gaps-dragonchicken.patch index b27b99f..546c41e 100644 --- a/patches/single-window-gaps-dragonchicken.patch +++ b/patches/single-window-gaps-dragonchicken.patch @@ -10,15 +10,15 @@ Both options default 'gaps'. --- diff --git a/src/defs.h b/src/defs.h -index 9ebfecb..6da1303 100644 +index 9ebfecb..3175487 100644 --- a/src/defs.h +++ b/src/defs.h @@ -82,6 +82,8 @@ typedef struct Client { typedef struct { int modkey; int gaps; -+ int single_horizontal_gap; -+ int single_vertical_gap; ++ int single_horizontal_gap; ++ int single_vertical_gap; int border_width; long border_foc_col; long border_ufoc_col; @@ -40,7 +40,7 @@ index 0c626f0..3de1857 100644 cfg->border_width = atoi(rest); } diff --git a/src/sxwm.c b/src/sxwm.c -index e10e940..8457b24 100644 +index e10e940..0aa6fb6 100644 --- a/src/sxwm.c +++ b/src/sxwm.c @@ -1553,6 +1553,8 @@ void init_defaults(void) @@ -52,49 +52,48 @@ index e10e940..8457b24 100644 user_config.border_width = 1; user_config.border_foc_col = parse_col("#c0cbff"); user_config.border_ufoc_col = parse_col("#555555"); -@@ -2672,6 +2674,46 @@ void tile(void) +@@ -2672,6 +2674,45 @@ void tile(void) return; } -+ /* gaps when only a single window is tiled */ -+ if (total == 1 && !monocle) { ++ /* gaps when only a single window is tiled */ ++ if (total == 1 && !monocle) { + for (Client *c = head; c; c = c->next) { + -+ /* skip if not a tiled window */ -+ if (!c->mapped || c->fullscreen || c->floating) { -+ continue; -+ } ++ /* skip if not a tiled window */ ++ if (!c->mapped || c->fullscreen || c->floating) { ++ continue; ++ } + -+ int border_width = user_config.border_width; ++ int border_width = user_config.border_width; + -+ int single_horizontal_gap = user_config.single_horizontal_gap; -+ int single_vertical_gap = user_config.single_vertical_gap; ++ int single_horizontal_gap = user_config.single_horizontal_gap; ++ int single_vertical_gap = user_config.single_vertical_gap; + -+ int mon = c->mon; -+ int x = mons[mon].x + mons[mon].reserve_left + single_horizontal_gap; -+ int y = mons[mon].y + mons[mon].reserve_top + single_vertical_gap; -+ int w = mons[mon].w - mons[mon].reserve_left - mons[mon].reserve_right - 2 * single_horizontal_gap; -+ int h = mons[mon].h - mons[mon].reserve_top - mons[mon].reserve_bottom - 2 * single_vertical_gap; ++ int mon = c->mon; ++ int x = mons[mon].x + mons[mon].reserve_left + single_horizontal_gap; ++ int y = mons[mon].y + mons[mon].reserve_top + single_vertical_gap; ++ int w = mons[mon].w - mons[mon].reserve_left - mons[mon].reserve_right - 2 * single_horizontal_gap; ++ int h = mons[mon].h - mons[mon].reserve_top - mons[mon].reserve_bottom - 2 * single_vertical_gap; + -+ XWindowChanges wc = { -+ .x = x, -+ .y = y, -+ .width = MAX(1, w - 2 * border_width), -+ .height = MAX(1, h - 2 * border_width), -+ .border_width = border_width -+ }; -+ XConfigureWindow(dpy, c->win, -+ CWX | CWY | CWWidth | CWHeight | CWBorderWidth, &wc); ++ XWindowChanges wc = { ++ .x = x, ++ .y = y, ++ .width = MAX(1, w - 2 * border_width), ++ .height = MAX(1, h - 2 * border_width), ++ .border_width = border_width ++ }; ++ XConfigureWindow(dpy, c->win, ++ CWX | CWY | CWWidth | CWHeight | CWBorderWidth, &wc); + -+ c->x = wc.x; -+ c->y = wc.y; -+ c->w = wc.width; -+ c->h = wc.height; -+ } -+ -+ update_borders(); -+ return; -+ } ++ c->x = wc.x; ++ c->y = wc.y; ++ c->w = wc.width; ++ c->h = wc.height; ++ } ++ update_borders(); ++ return; ++ } + if (monocle) { for (Client *c = head; c; c = c->next) { -- cgit v1.2.3