my $i3 = i3(get_socket_path());
$i3->connect->recv;
-my $cv = AE::cv;
-my $timer = AE::timer 0.5, 0, sub { $cv->send(0); };
+my $cv = AnyEvent->condvar;
+my $timer = AnyEvent->timer(after => 0.5, interval => 0, cb => sub { $cv->send(0); });
my $last_config = $i3->get_config()->recv;
chomp($last_config->{config});
$i3->connect->recv;
my $cv = AnyEvent->condvar;
-my $timer = AE::timer 0.5, 0, sub { $cv->send(0); };
+my $timer = AnyEvent->timer(after => 0.5, interval => 0, cb => sub { $cv->send(0); });
$i3->subscribe({
shutdown => sub {
$i3->connect->recv;
$cv = AnyEvent->condvar;
-$timer = AE::timer 0.5, 0, sub { $cv->send(0); };
+$timer = AnyEvent->timer(after => 0.5, interval => 0, cb => sub { $cv->send(0); });
$i3->subscribe({
shutdown => sub {
my $ws = fresh_workspace;
my $cv = AnyEvent->condvar;
-my $timer = AnyEvent->timer(1, 0, sub { $cv->send(0) });
+my $timer = AnyEvent->timer(after => 1, interval => 0, cb => sub { $cv->send(0) });
$i3->subscribe({
window => sub {
my ($event) = @_;