diff --git a/config.def.h b/config.def.h index e592d6d..5f5cbb9 100644 --- a/config.def.h +++ b/config.def.h @@ -1,5 +1,9 @@ /* See LICENSE file for copyright and license details. */ +/* Helper macros for spawning commands */ +#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } +#define CMD(...) { .v = (const char*[]){ __VA_ARGS__, NULL } } + /* appearance */ static const unsigned int borderpx = 1; /* border pixel of windows */ static const unsigned int snap = 32; /* snap pixel */ @@ -214,9 +218,6 @@ static const Layout layouts[] = { { MOD, XK_a, ACTION##stack, {.i = 2 } }, \ { MOD, XK_z, ACTION##stack, {.i = -1 } }, -/* helper for spawning shell commands in the pre dwm-5.0 fashion */ -#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } - /* commands */ static const char *dmenucmd[] = { "dmenu_run", diff --git a/dwm.c b/dwm.c index db80c8e..82f4fc7 100644 --- a/dwm.c +++ b/dwm.c @@ -2164,7 +2164,11 @@ togglefloating(const Arg *arg) if (c->isfullscreen) /* no support for fullscreen windows */ return; c->isfloating = !c->isfloating || c->isfixed; - if (c->isfloating) + if (c->scratchkey != 0 && c->isfloating) + XSetWindowBorder(dpy, c->win, scheme[SchemeScratchSel][ColFloat].pixel); + else if (c->scratchkey != 0) + XSetWindowBorder(dpy, c->win, scheme[SchemeScratchSel][ColBorder].pixel); + else if (c->isfloating) XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColFloat].pixel); else XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColBorder].pixel); @@ -2360,7 +2364,7 @@ updatebarpos(Monitor *m) } void -updateclientlist() +updateclientlist(void) { Client *c; Monitor *m; diff --git a/patch/bar_ltsymbol.c b/patch/bar_ltsymbol.c index 1fbd1b8..1004378 100644 --- a/patch/bar_ltsymbol.c +++ b/patch/bar_ltsymbol.c @@ -15,4 +15,3 @@ click_ltsymbol(Bar *bar, Arg *arg, BarArg *a) { return ClkLtSymbol; } - diff --git a/patch/bar_ltsymbol.h b/patch/bar_ltsymbol.h index 4de5720..4188584 100644 --- a/patch/bar_ltsymbol.h +++ b/patch/bar_ltsymbol.h @@ -1,4 +1,3 @@ static int width_ltsymbol(Bar *bar, BarArg *a); static int draw_ltsymbol(Bar *bar, BarArg *a); static int click_ltsymbol(Bar *bar, Arg *arg, BarArg *a); -