Optionally change i3bar color on focused output, implements #2020

This commit is contained in:
David Simon
2015-10-26 16:55:01 -04:00
parent 2451551f63
commit dc05d905c1
13 changed files with 99 additions and 12 deletions

View File

@ -302,3 +302,17 @@ i3_output *get_output_by_name(char *name) {
return walk;
}
/*
* Returns true if the output has the currently focused workspace
*
*/
bool output_has_focus(i3_output *output) {
i3_ws *ws_walk;
TAILQ_FOREACH(ws_walk, output->workspaces, tailq) {
if (ws_walk->focused) {
return true;
}
}
return false;
}