open_floating_window
get_dock_clients
cmd
+ cmp_float
sync_with_i3
does_i3_live
exit_gracefully
if (exists($args{output})) {
my $i3 = i3(get_socket_path());
my $tree = $i3->get_tree->recv;
- my $output = first { $_->{name} eq "xinerama-$args{output}" }
+ my $output = first { $_->{name} eq "fake-$args{output}" }
@{$tree->{nodes}};
die "BUG: Could not find output $args{output}" unless defined($output);
# Get the focused workspace on that output and switch to it.
return $i3_pid;
}
+# compares two floats and return true if they differ less
+# then 1e-6
+sub cmp_float {
+ my ($a, $b) = @_;
+
+ return abs($a - $b) < 1e-6;
+}
+
package i3test::X11;
use parent 'X11::XCB::Connection';