development
This commit is contained in:
parent
61df35ee17
commit
056f01658b
|
@ -1,2 +1,3 @@
|
|||
*.o
|
||||
mswitch
|
||||
mswitch.log
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import std.stdio;
|
||||
import modules.monitors;
|
||||
import core.thread;
|
||||
|
||||
/**
|
||||
* Switching occurs only if 2 monitors are connected to the computer!
|
||||
|
@ -16,12 +17,18 @@ int main(string[] args)
|
|||
|
||||
auto monitors = getMonitorsInfo();
|
||||
file.writeln(monitors);
|
||||
|
||||
while (true)
|
||||
{
|
||||
setPrimaryMonitor(monitors[1].name);
|
||||
file.writeln("-- Switch monitors --");
|
||||
swapMonitors(monitors[0].name, monitors[1].name, Relation.right_of);
|
||||
monitors = getMonitorsInfo();
|
||||
file.writeln(monitors);
|
||||
|
||||
Thread.sleep(dur!("seconds")(10));
|
||||
}
|
||||
|
||||
file.close();
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue