#!/usr/bin/perlThis can easily be changed to suit your own needs. You could have one called move right, left etc if you have more than two x-screens. The "640 512" and "920 600" are the x y cords of the middle of my screen. See the man page for xdotool for more info.
use strict;
use warnings;
my $display = $ENV{'DISPLAY'};
#print "my dispaly is $display\n";
if (!(defined $display)){
exit 1;
}
elsif ($display eq ":0.1") {
system("xdotool mousemove --screen 0 640 512");
#print("Switching to xscreen 0\n");
}
else {
system("xdotool mousemove --screen 1 920 600");
#print("Switching to xscreen 1\n");
}
exit 0;
It's a real quick and dirty script so. If you make any improvements to it, please let me know!
No comments:
Post a Comment