Sample script fixes and tweaks
This commit is contained in:
parent
93e62a25f5
commit
3cb75416a9
|
@ -58,19 +58,22 @@ open IPCPIPE,"| eesh";
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach (@fallspeed) {
|
foreach (@fallspeed) {
|
||||||
$originalbally = $bally;
|
$originalbally = $bally;
|
||||||
$fallspeed = $fallspeed[i];
|
$fallspeed = $fallspeed[$i];
|
||||||
|
# print "loop $i x,y $ballx,$bally fall $fallspeed\n";
|
||||||
while ($bally < ($height - $ballh)) {
|
while ($bally < ($height - $ballh)) {
|
||||||
if (($bally + $fallspeed + $ballh) < $height) {
|
if (($bally + $fallspeed + $ballh) < $height) {
|
||||||
$bally += $fallspeed;
|
$bally += $fallspeed;
|
||||||
} else {
|
} else {
|
||||||
$bally = $height - $ballh;
|
$bally = $height - $ballh;
|
||||||
}
|
}
|
||||||
|
# print "win_op $ball move $ballx $bally\n";
|
||||||
print IPCPIPE "win_op $ball move $ballx $bally\n";
|
print IPCPIPE "win_op $ball move $ballx $bally\n";
|
||||||
system("usleep 20000");
|
system("sleep .020");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($fallspeed[i+1]) {
|
# print "reverse\n";
|
||||||
$fallspeed = $fallspeed[i+1];
|
if ($fallspeed[$i + 1]) {
|
||||||
|
$fallspeed = $fallspeed[$i + 1];
|
||||||
} else {
|
} else {
|
||||||
$fallspeed = 1;
|
$fallspeed = 1;
|
||||||
}
|
}
|
||||||
|
@ -82,8 +85,9 @@ foreach (@fallspeed) {
|
||||||
} else {
|
} else {
|
||||||
$bally = $originalbally + int($originalbally * (1/$#fallspeed));
|
$bally = $originalbally + int($originalbally * (1/$#fallspeed));
|
||||||
}
|
}
|
||||||
|
# print "win_op $ball move $ballx $bally\n";
|
||||||
print IPCPIPE "win_op $ball move $ballx $bally\n";
|
print IPCPIPE "win_op $ball move $ballx $bally\n";
|
||||||
system("usleep 20000");
|
system("sleep .020");
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,16 +26,10 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# Open dialog 1
|
# Open dialog 1
|
||||||
eesh -e "dialog_ok Move this window"
|
eesh -e "dialog_ok [Dlg1] Move this window"
|
||||||
usleep 100000
|
|
||||||
eesh -e "wop Message title Dlg1"
|
|
||||||
usleep 100000
|
|
||||||
|
|
||||||
# Open dialog 2
|
# Open dialog 2
|
||||||
eesh -e "dialog_ok Watch me follow the above window"
|
eesh -e "dialog_ok [Dlg2] Watch me follow the above window"
|
||||||
usleep 100000
|
|
||||||
eesh -e "wop Message title Dlg2"
|
|
||||||
usleep 100000
|
|
||||||
|
|
||||||
# In one endless loop, get window position of the first window, then move the
|
# In one endless loop, get window position of the first window, then move the
|
||||||
# second one accordingly...
|
# second one accordingly...
|
||||||
|
|
|
@ -34,9 +34,9 @@
|
||||||
# the window.
|
# the window.
|
||||||
|
|
||||||
if ($ARGV[0] eq "on") {
|
if ($ARGV[0] eq "on") {
|
||||||
$shade = 1;
|
$shade = "on";
|
||||||
} else {
|
} else {
|
||||||
$shade = 0;
|
$shade = "off";
|
||||||
}
|
}
|
||||||
|
|
||||||
# here we'll retreive the current desk we're on
|
# here we'll retreive the current desk we're on
|
||||||
|
@ -78,16 +78,13 @@ foreach (@winlist) {
|
||||||
$area = $3;
|
$area = $3;
|
||||||
$name = $4;
|
$name = $4;
|
||||||
|
|
||||||
# Skip pagers, iconboxes, systrays, and epplets
|
# Skip pagers, iconboxes, systrays, and epplets
|
||||||
next if ($name =~ /^Pager-|Iconbox|Systray|E-/);
|
next if ($name =~ /^Pager-|Iconbox|Systray|E-/);
|
||||||
# next unless (($desk == -1) and ($desk eq $current_desk));
|
# next unless (($desk == -1) and ($desk eq $current_desk));
|
||||||
next unless ($desk eq $current_desk);
|
next unless ($desk eq $current_desk);
|
||||||
next unless ($area eq $current_area);
|
next unless ($area eq $current_area);
|
||||||
if ($shade) {
|
# print "win_op $window shade $shade\n";
|
||||||
print IPCPIPE "win_op $window shade on\n";
|
print IPCPIPE "win_op $window shade $shade\n";
|
||||||
} else {
|
|
||||||
print IPCPIPE "win_op $window shade off\n";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue