[wiki] [sites] Add focusurgent patch || Jan Christoph Ebersbach

From: <git_AT_suckless.org>
Date: Wed, 31 Aug 2016 23:07:31 +0200

commit d75527b9fb4dbea1b72edad3189e6283fd0bac3e
Author: Jan Christoph Ebersbach <jceb_AT_e-jc.de>
Date: Wed Aug 31 23:07:14 2016 +0200

    Add focusurgent patch

diff --git a/dwm.suckless.org/patches/dwm-focusurgent-20160831-56a31dc.diff b/dwm.suckless.org/patches/dwm-focusurgent-20160831-56a31dc.diff
new file mode 100644
index 0000000..9bd92e5
--- /dev/null
+++ b/dwm.suckless.org/patches/dwm-focusurgent-20160831-56a31dc.diff
_AT_@ -0,0 +1,45 @@
+Author: Jan Christoph Ebersbach <jceb_AT_e-jc.de>
+URL: http://dwm.suckless.org/patches/focusurgent
+focusurgent selects the next window having the urgent flag regardless of the tag
+it is on. The urgent flag can be artificially set with the following xdotool
+command on any window: xdotool selectwindow -- set_window --urgency 1
+
+Index: clean/dwm/config.def.h
+===================================================================
+--- clean.orig/dwm/config.def.h
++++ clean/dwm/config.def.h
+_AT_@ -59,6 +59,7 @@ static char dmenumon[2] = "0"; /* compon
+ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
+ static const char *termcmd[] = { "st", NULL };
+
++#include "focusurgent.c"
+ static Key keys[] = {
+ /* modifier key function argument */
+ { MODKEY, XK_p, spawn, {.v = dmenucmd } },
+_AT_@ -94,6 +95,7 @@ static Key keys[] = {
+ TAGKEYS( XK_8, 7)
+ TAGKEYS( XK_9, 8)
+ { MODKEY|ShiftMask, XK_q, quit, {0} },
++ { MODKEY, XK_u, focusurgent, {0} },
+ };
+
+ /* button definitions */
+Index: clean/dwm/focusurgent.c
+===================================================================
+--- /dev/null
++++ clean/dwm/focusurgent.c
+_AT_@ -0,0 +1,14 @@
++static void
++focusurgent(const Arg *arg) {
++ Client *c;
++ int i;
++ for(c=selmon->clients; c && !c->isurgent; c=c->next);
++ if(c && c->isurgent) {
++ for(i=0; i < LENGTH(tags) && !((1 << i) & c->tags); i++);
++ if(i < LENGTH(tags)) {
++ const Arg a = {.ui = 1 << i};
++ view(&a);
++ focus(c);
++ }
++ }
++}
diff --git a/dwm.suckless.org/patches/focusurgent.md b/dwm.suckless.org/patches/focusurgent.md
new file mode 100644
index 0000000..ae90e6f
--- /dev/null
+++ b/dwm.suckless.org/patches/focusurgent.md
_AT_@ -0,0 +1,15 @@
+# focusurgent
+
+## Description
+
+ * Selects the next window having the urgent flag regardless of the tag it is on
+ * The urgent flag can be artificially set with the following xdotool command on
+ any window: `xdotool selectwindow -- set_window --urgency 1`
+
+## Download
+
+ * [dwm-focusurgent-20160831-56a31dc.diff](dwm-focusurgent-20160831-56a31dc.diff)
+
+## Author
+
+ * Jan Christoph Ebersbach <jceb_AT_e-jc.de>
Received on Wed Aug 31 2016 - 23:07:31 CEST

This archive was generated by hypermail 2.3.0 : Wed Aug 31 2016 - 23:12:15 CEST