Skip to content

Instantly share code, notes, and snippets.

@ropery
Created October 30, 2011 05:45
Show Gist options
  • Save ropery/1325562 to your computer and use it in GitHub Desktop.
Save ropery/1325562 to your computer and use it in GitHub Desktop.
void focusurgent(const Arg *arg);
void
focusurgent(const Arg *arg) {
Client *c;
Monitor *m;
for(m = mons; m; m = m->next) {
for(c = m->clients; c; c = c->next) {
if(c->isurgent) {
selmon = m;
if(!ISVISIBLE(c)) {
selmon->seltags ^= 1;
selmon->tagset[selmon->seltags] = c->tags;
}
focus(c);
arrange(selmon);
return;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment