Hi, all the best for 2018 !
XTerm already has it but this duty IMO belongs to the WM.
To test, add "pop yes" to ~/.cwmrc and restart cwm.

Index: calmwm.h
===================================================================
RCS file: /cvs/xenocara/app/cwm/calmwm.h,v
retrieving revision 1.351
diff -u -p -r1.351 calmwm.h
--- calmwm.h    29 Dec 2017 20:03:46 -0000      1.351
+++ calmwm.h    1 Jan 2018 12:30:09 -0000
@@ -284,6 +284,7 @@ struct conf {
        struct wm_q              wmq;
        int                      ngroups;
        int                      stickygroups;
+       int                      poponbell;
        int                      nameqlen;
        int                      bwidth;
        int                      mamount;
Index: client.c
===================================================================
RCS file: /cvs/xenocara/app/cwm/client.c,v
retrieving revision 1.244
diff -u -p -r1.244 client.c
--- client.c    29 Dec 2017 18:50:43 -0000      1.244
+++ client.c    1 Jan 2018 12:30:09 -0000
@@ -554,6 +554,8 @@ client_urgency(struct client_ctx *cc)
 {
        if (!(cc->flags & CLIENT_ACTIVE))
                cc->flags |= CLIENT_URGENCY;
+       if (Conf.poponbell)
+               client_show(cc);
 }
 
 void
Index: conf.c
===================================================================
RCS file: /cvs/xenocara/app/cwm/conf.c,v
retrieving revision 1.237
diff -u -p -r1.237 conf.c
--- conf.c      29 Dec 2017 20:03:46 -0000      1.237
+++ conf.c      1 Jan 2018 12:30:09 -0000
@@ -288,6 +288,7 @@ conf_init(struct conf *c)
        unsigned int    i;
 
        c->stickygroups = 0;
+       c->poponbell = 0;
        c->bwidth = 1;
        c->mamount = 1;
        c->snapdist = 0;
Index: cwmrc.5
===================================================================
RCS file: /cvs/xenocara/app/cwm/cwmrc.5,v
retrieving revision 1.70
diff -u -p -r1.70 cwmrc.5
--- cwmrc.5     29 Dec 2017 20:03:46 -0000      1.70
+++ cwmrc.5     1 Jan 2018 12:30:09 -0000
@@ -217,6 +217,10 @@ Set a default size for the keyboard move
 in pixels.
 The default is 1.
 .Pp
+.It Ic pop Ic yes Ns \&| Ns Ic no
+Toggle poponbell.
+When enabled, the window in which a bell rings is shown even if it was hidden.
+.Pp
 .It Ic snapdist Ar pixels
 Minimum distance to snap-to adjacent edge, in pixels.
 The default is 0.
Index: parse.y
===================================================================
RCS file: /cvs/xenocara/app/cwm/parse.y,v
retrieving revision 1.69
diff -u -p -r1.69 parse.y
--- parse.y     29 Dec 2017 20:03:46 -0000      1.69
+++ parse.y     1 Jan 2018 12:30:09 -0000
@@ -69,7 +69,7 @@ typedef struct {
 %}
 
 %token BINDKEY UNBINDKEY BINDMOUSE UNBINDMOUSE
-%token FONTNAME STICKY GAP
+%token FONTNAME POP STICKY GAP
 %token AUTOGROUP COMMAND IGNORE WM
 %token YES NO BORDERWIDTH MOVEAMOUNT
 %token COLOR SNAPDIST
@@ -112,6 +112,9 @@ main                : FONTNAME STRING               {
                        free(conf->font);
                        conf->font = $2;
                }
+               | POP yesno {
+                       conf->poponbell = $2;
+               }
                | STICKY yesno {
                        conf->stickygroups = $2;
                }
@@ -320,6 +323,7 @@ lookup(char *s)
                { "menufg",             MENUFG},
                { "moveamount",         MOVEAMOUNT},
                { "no",                 NO},
+               { "pop",                POP},
                { "selfont",            FONTSELCOLOR},
                { "snapdist",           SNAPDIST},
                { "sticky",             STICKY},

--
Regards,
Julien

Reply via email to