summary refs log tree commit diff stats
path: root/compiler/hlo.nim
Commit message (Expand)AuthorAgeFilesLines
* Fix spellings (#12277) [backport]Federico Ceratto2019-09-271-1/+1
* more destructor based changes (#10885)Andreas Rumpf2019-03-231-2/+2
* remove more global variables in the Nim compilerAndreas Rumpf2018-05-271-3/+3
* options.nim: no global variables anymoreAndreas Rumpf2018-05-131-4/+4
* more modules compile againAndreas Rumpf2018-05-121-6/+6
* more modules compile againAndreas Rumpf2018-05-121-1/+1
* allow setting template/macro recursive evaluation limits (#7652)jcosborn2018-04-191-1/+1
* deprecated unary '<'Andreas Rumpf2017-10-291-2/+2
* fixes #5430Araq2017-02-261-1/+1
* fixes #4227Andreas Rumpf2016-05-271-1/+1
* compiler: Trim .nim files trailing whitespaceAdam Strzelecki2015-09-041-2/+2
* Nimrod renamed to NimAraq2014-08-281-1/+1
* fixes #798Araq2014-04-061-1/+2
* 'nil' as a statement is deprecated, use an empty 'discard' insteadAraq2014-01-191-1/+1
* case consistency: next stepsAraq2013-12-291-1/+1
* case consistency part 4Araq2013-12-271-2/+2
* should fix newly introduced bugs wrt TR macrosAraq2013-09-181-3/+7
* improvements for TR macrosAraq2013-09-171-7/+14
* term rewriting improvementsAraq2012-09-081-0/+91
ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
From e9c46c8624e3de1fba021c30bbc42707ef51353c Mon Sep 17 00:00:00 2001
From: Acid Bong <acid-bong@cock.lt>
Date: Wed, 19 Oct 2022 13:23:34 +0300
Subject: [PATCH] patch: focusurgent

---
 config.def.h  |  3 +++
 focusurgent.c | 14 ++++++++++++++
 2 files changed, 17 insertions(+)
 create mode 100644 focusurgent.c

diff --git a/config.def.h b/config.def.h
index b8f0908..1de3c06 100644
--- a/config.def.h
+++ b/config.def.h
@@ -59,6 +59,7 @@ static const char *termcmd[]  = { "st", NULL };
 
 #include <X11/XF86keysym.h>
 #include "movestack.c"
+#include "focusurgent.c"
 static const Key keys[] = {
 	/* modifier                     key        function        argument */
 	{ MODKEY,                       XK_space,      spawn,          {.v = dmenucmd } },
@@ -124,6 +125,8 @@ static const Key keys[] = {
 	{ MODKEY|ShiftMask,		XK_k,		movestack,	{.i = -1 } },
 	{ MODKEY|ShiftMask,		XK_Down,	movestack,	{.i = +1 } }, /* arrow keys */
 	{ MODKEY|ShiftMask,		XK_Up,		movestack,	{.i = -1 } },
+		/* focusurgent patch */
+	{ MODKEY,			XK_a,		focusurgent,	{0} },
 };
 
 /* button definitions */
diff --git a/focusurgent.c b/focusurgent.c
new file mode 100644
index 0000000..bc6eee6
--- /dev/null
+++ b/focusurgent.c
@@ -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) {
+		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);
+		}
+	}
+}
-- 
2.38.0