Skip to content

Commit

Permalink
stickymonitor: Automatically full-screen OBS projector windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosuav committed May 4, 2018
1 parent 26c0d69 commit b47b4a2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions stickymonitor.pike
Expand Up @@ -46,6 +46,12 @@ void poll()
stickied[id] = 0;
Process.create_process(({"wmctrl", "-ir", (string)id, "-b", "remove,sticky"}))->wait();
}
//If we spot an OBS projector, full-screen it. (Once fullscreened, it should be in (0,0), so don't re-fs it.)
if (title == "Windowed Projector (Preview)" && (x || y))
{
Process.create_process(({"wmctrl", "-ir", (string)id, "-e", "0,0,0,-1,-1"}))->wait();
Process.create_process(({"wmctrl", "-ir", (string)id, "-b", "add,fullscreen"}))->wait();
}
}
stickied &= (multiset)info[*][0]; //Prune the list of any windows that have closed.
}
Expand Down

0 comments on commit b47b4a2

Please sign in to comment.