Guest User

Untitled

a guest
Feb 19th, 2015
488
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #!/usr/bin/perl
  2. use Data::Dumper;
  3.  
  4. my $a = `xwininfo -name 'FvwmButtons' | grep 'Absolute upper-left X' | awk '{print \$4}'`;
  5. $a =~ s/[\s\n\r]+//;
  6.  
  7.  
  8. my $resx = 0;
  9. my $resy = 0;
  10. my $dimensions = (grep (/dimensions/, `xdpyinfo`))[0];
  11. if ($dimensions =~ /.*:\s+(\w+)x(\w+)/) {
  12. $resx = $1;
  13. $resy = $2;
  14. }
  15. else {
  16. close (OUT);
  17. die "Could not parse xdpyinfo\n";
  18. }
  19.  
  20. #print Dumper($a, $resx);
  21.  
  22.  
  23.  
  24. if( $a eq $resx ) {
  25. print "All (FvwmButtons) AnimatedMove -0 -0"
  26. } else {
  27. print "All (FvwmButtons) AnimatedMove 100 0"
  28. }
Advertisement
Add Comment
Please, Sign In to add comment