# the workspace to be empty).
# TODO: skip it by default?
-use Test::More tests => 17;
-use Test::Deep;
+use i3test tests => 15;
use X11::XCB qw(:all);
-use Data::Dumper;
use Time::HiRes qw(sleep);
-use FindBin;
-use Digest::SHA1 qw(sha1_base64);
-use lib "$FindBin::Bin/lib";
-use i3test;
BEGIN {
- use_ok('IO::Socket::UNIX') or BAIL_OUT('Cannot load IO::Socket::UNIX');
use_ok('X11::XCB::Connection') or BAIL_OUT('Cannot load X11::XCB::Connection');
}
my $x = X11::XCB::Connection->new;
-my $sock = IO::Socket::UNIX->new(Peer => '/tmp/i3-ipc.sock');
-isa_ok($sock, 'IO::Socket::UNIX');
-
-# Switch to the nineth workspace
-$sock->write(i3test::format_ipc_command("9"));
-
-sleep 0.25;
+my $i3 = i3("/tmp/nestedcons");
+my $tmp = get_unused_workspace();
+$i3->command("workspace $tmp")->recv;
#####################################################################
# Create a floating window and see if resizing works
rect => [ 0, 0, 30, 30],
background_color => '#C0C0C0',
# replace the type with 'utility' as soon as the coercion works again in X11::XCB
- type => $x->atom(name => '_NET_WM_WINDOW_TYPE_UTILITY'),
+ window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_UTILITY'),
);
isa_ok($window, 'X11::XCB::Window');
test_resize;
# Test borderless
-$sock->write(i3test::format_ipc_command("bb"));
-sleep 0.25;
+$i3->command('border none')->recv;
test_resize;
# Test with 1-px-border
-$sock->write(i3test::format_ipc_command("bp"));
-sleep 0.25;
+$i3->command('border 1pixel')->recv;
test_resize;