dwm-notitle-20210715-138b405.diff - sites - public wiki contents of suckless.org
 (HTM) git clone git://git.suckless.org/sites
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
       dwm-notitle-20210715-138b405.diff (2931B)
       ---
            1 From a3a7e94f59553689656871a65ea9ce90169a7c91 Mon Sep 17 00:00:00 2001
            2 From: birdalicous <jack.bird@durham.ac.uk>
            3 Date: Thu, 15 Jul 2021 12:28:29 +0100
            4 Subject: [PATCH] notitle patch applied#
            5 
            6 ---
            7  config.def.h |  1 -
            8  dwm.c        | 20 ++++----------------
            9  2 files changed, 4 insertions(+), 17 deletions(-)
           10 
           11 diff --git a/config.def.h b/config.def.h
           12 index a2ac963..eac20b4 100644
           13 --- a/config.def.h
           14 +++ b/config.def.h
           15 @@ -103,7 +103,6 @@ static Button buttons[] = {
           16          /* click                event mask      button          function        argument */
           17          { ClkLtSymbol,          0,              Button1,        setlayout,      {0} },
           18          { ClkLtSymbol,          0,              Button3,        setlayout,      {.v = &layouts[2]} },
           19 -        { ClkWinTitle,          0,              Button2,        zoom,           {0} },
           20          { ClkStatusText,        0,              Button2,        spawn,          {.v = termcmd } },
           21          { ClkClientWin,         MODKEY,         Button1,        movemouse,      {0} },
           22          { ClkClientWin,         MODKEY,         Button2,        togglefloating, {0} },
           23 diff --git a/dwm.c b/dwm.c
           24 index 5e4d494..6cd9fb7 100644
           25 --- a/dwm.c
           26 +++ b/dwm.c
           27 @@ -64,8 +64,8 @@ enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
           28         NetWMFullscreen, NetActiveWindow, NetWMWindowType,
           29         NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
           30  enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms */
           31 -enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
           32 -       ClkClientWin, ClkRootWin, ClkLast }; /* clicks */
           33 +enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkClientWin,
           34 +       ClkRootWin, ClkLast }; /* clicks */
           35  
           36  typedef union {
           37          int i;
           38 @@ -440,10 +440,8 @@ buttonpress(XEvent *e)
           39                          arg.ui = 1 << i;
           40                  } else if (ev->x < x + blw)
           41                          click = ClkLtSymbol;
           42 -                else if (ev->x > selmon->ww - (int)TEXTW(stext))
           43 -                        click = ClkStatusText;
           44                  else
           45 -                        click = ClkWinTitle;
           46 +                        click = ClkStatusText;
           47          } else if ((c = wintoclient(ev->window))) {
           48                  focus(c);
           49                  restack(selmon);
           50 @@ -730,15 +728,8 @@ drawbar(Monitor *m)
           51          x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0);
           52  
           53          if ((w = m->ww - tw - x) > bh) {
           54 -                if (m->sel) {
           55 -                        drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
           56 -                        drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
           57 -                        if (m->sel->isfloating)
           58 -                                drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0);
           59 -                } else {
           60                          drw_setscheme(drw, scheme[SchemeNorm]);
           61                          drw_rect(drw, x, 0, w, bh, 1, 1);
           62 -                }
           63          }
           64          drw_map(drw, m->barwin, 0, 0, m->ww, bh);
           65  }
           66 @@ -1236,11 +1227,8 @@ propertynotify(XEvent *e)
           67                          drawbars();
           68                          break;
           69                  }
           70 -                if (ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName]) {
           71 +                if (ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName])
           72                          updatetitle(c);
           73 -                        if (c == c->mon->sel)
           74 -                                drawbar(c->mon);
           75 -                }
           76                  if (ev->atom == netatom[NetWMWindowType])
           77                          updatewindowtype(c);
           78          }
           79 -- 
           80 2.32.0
           81