sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

dwm-hideborder-20210219-03a3f72.diff (1653B)


      1 From 03a3f7222416c3be997f393e5246e5f0560a5df3 Mon Sep 17 00:00:00 2001
      2 From: Georgios Oxinos <georgios.oxinos.extern@elinvar.de>
      3 Date: Fri, 19 Feb 2021 00:53:04 +0100
      4 Subject: [PATCH] [PATCH] [dwm][hideborder] patch that allows hiding border of
      5  active client
      6 
      7 ---
      8  config.def.h | 1 +
      9  dwm.c        | 7 +++++++
     10  2 files changed, 8 insertions(+)
     11 
     12 diff --git a/config.def.h b/config.def.h
     13 index 1c0b587..6086523 100644
     14 --- a/config.def.h
     15 +++ b/config.def.h
     16 @@ -64,6 +64,7 @@ static Key keys[] = {
     17  	{ MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
     18  	{ MODKEY|ShiftMask,             XK_Return, spawn,          {.v = termcmd } },
     19  	{ MODKEY,                       XK_b,      togglebar,      {0} },
     20 +	{ MODKEY|ShiftMask,             XK_b,      hideborder,     {0} },
     21  	{ MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
     22  	{ MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
     23  	{ MODKEY,                       XK_i,      incnmaster,     {.i = +1 } },
     24 diff --git a/dwm.c b/dwm.c
     25 index 664c527..a5b5342 100644
     26 --- a/dwm.c
     27 +++ b/dwm.c
     28 @@ -169,6 +169,7 @@ static void focus(Client *c);
     29  static void focusin(XEvent *e);
     30  static void focusmon(const Arg *arg);
     31  static void focusstack(const Arg *arg);
     32 +static void hideborder(const Arg *arg);
     33  static Atom getatomprop(Client *c, Atom prop);
     34  static int getrootptr(int *x, int *y);
     35  static long getstate(Window w);
     36 @@ -856,6 +857,12 @@ focusstack(const Arg *arg)
     37  	}
     38  }
     39  
     40 +void
     41 +hideborder(const Arg *arg)
     42 +{
     43 +	XSetWindowBorder(dpy, selmon->sel->win, scheme[SchemeSel][ColBg].pixel);
     44 +}
     45 +
     46  Atom
     47  getatomprop(Client *c, Atom prop)
     48  {
     49 -- 
     50 2.27.0
     51