aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.h1
-rw-r--r--dwm.13
-rw-r--r--dwm.c9
3 files changed, 13 insertions, 0 deletions
diff --git a/config.h b/config.h
index 1df3b3b..8a1c285 100644
--- a/config.h
+++ b/config.h
@@ -67,6 +67,7 @@ static const Key keys[] = {
{ MODKEY, XK_d, spawn, {.v = dmenucmd } },
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} },
+ { MODKEY|ShiftMask, XK_b, toggleborder, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
diff --git a/dwm.1 b/dwm.1
index 3d310ac..bc5a7e5 100644
--- a/dwm.1
+++ b/dwm.1
@@ -80,6 +80,9 @@ Send focused window to next screen, if any.
.B Mod1\-b
Toggles bar on and off.
.TP
+.B Mod1\-Shift\-b
+Toggles borders on and off.
+.TP
.B Mod1\-t
Sets tiled layout.
.TP
diff --git a/dwm.c b/dwm.c
index 78462e9..bb287a6 100644
--- a/dwm.c
+++ b/dwm.c
@@ -211,6 +211,7 @@ static void tag(const Arg *arg);
static void tagmon(const Arg *arg);
static void tile(Monitor *m);
static void togglebar(const Arg *arg);
+static void toggleborder(const Arg *arg);
static void togglefloating(const Arg *arg);
static void togglefullscr(const Arg *arg);
static void toggletag(const Arg *arg);
@@ -1710,6 +1711,14 @@ togglebar(const Arg *arg)
}
void
+toggleborder(const Arg *arg)
+{
+ selmon->sel->bw = (selmon->sel->bw == borderpx ? 0 : borderpx);
+ arrange(selmon);
+}
+
+
+void
togglefloating(const Arg *arg)
{
if (!selmon->sel)