gappx -> default_gaps, opengap -> optional_gaps

This commit is contained in:
2024-06-03 22:20:13 +01:00
parent ab70e0c0f8
commit db5605a181
2 changed files with 24 additions and 24 deletions

View File

@@ -8,8 +8,8 @@
/* appearance */
static const unsigned int borderpx = 0; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const unsigned int opengap = 20; /* optional gaps between windows */
static const unsigned int gappx = 0; /* default gaps between windows */
static const unsigned int optional_gaps = 20; /* optional gaps between windows */
static const unsigned int default_gaps = 0; /* default gaps between windows */
static const int showbar = true; /* 0 means no bar */
static const int topbar = 0; /* 0 means bottom bar */
static const char *fonts[] = { "Noto Sans Mono:size=13" };
@@ -172,10 +172,10 @@ togglegaps(const Arg *arg)
if (!selmon)
return;
int *gap_size = &selmon->pertag->gaps[selmon->pertag->curtag];
if (*gap_size == gappx)
selmon->pertag->gaps[selmon->pertag->curtag] = opengap;
if (*gap_size == default_gaps)
selmon->pertag->gaps[selmon->pertag->curtag] = optional_gaps;
else
selmon->pertag->gaps[selmon->pertag->curtag] = gappx;
selmon->pertag->gaps[selmon->pertag->curtag] = default_gaps;
arrange(selmon);
}

4
dwm.c
View File

@@ -294,7 +294,7 @@ struct Pertag {
unsigned int sellts[TAG_SIZE + 1]; /* selected layouts */
const Layout *ltidxs[TAG_SIZE + 1][2]; /* matrix of tags and layouts indexes */
int showbars[TAG_SIZE + 1]; /* display bar for the current tag */
int gaps[TAG_SIZE + 1]; /* size of gaps for the current tag*/
int gaps[TAG_SIZE + 1]; /* current size of gaps */
};
#include "config.h"
@@ -733,7 +733,7 @@ createmon(void)
m->pertag->sellts[i] = m->sellt;
m->pertag->showbars[i] = m->showbar;
m->pertag->gaps[i] = gappx;
m->pertag->gaps[i] = default_gaps;
}
return m;