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