From 0408750ef05093cb71a8bdfba0ea40fb6cc11ad4 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Fri, 16 Jul 2021 02:05:40 +0200 Subject: [PATCH] Refactor --- src/config.h | 3 +-- src/dwm.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/config.h b/src/config.h index cbe6e94..9585d2a 100644 --- a/src/config.h +++ b/src/config.h @@ -4,8 +4,7 @@ static const unsigned int borderpx = 4; /* border pixel of windows */ static const unsigned int snap = 16; /* snap pixel (32)*/ static const unsigned int gappx = 0; -static const unsigned int gappx2 = 40; -static const unsigned int gapmodes[] = { 0, 40, 80 }; +static const unsigned int gapmodes[] = { gappx, 40, 80 }; static const int showbar = 1; /* 0 means no bar */ static const int topbar = 0; /* 0 means bottom bar */ static const int usealtbar = 1; /* 1 means use non-dwm status bar */ diff --git a/src/dwm.c b/src/dwm.c index bb2f767..7278240 100644 --- a/src/dwm.c +++ b/src/dwm.c @@ -1844,10 +1844,10 @@ setgaps(const Arg *arg) void togglegaps(const Arg *arg) { - if (selmon->gappx == gappx2) + if (selmon->gappx == 0) selmon->gappx = gappx; else - selmon->gappx = gappx2; + selmon->gappx = 0; arrange(selmon); }