my $i3 = i3("/tmp/nestedcons");
-my $tree = $i3->get_workspaces->recv;
+my $tree = $i3->get_tree->recv;
my $tmp = File::Temp->new(UNLINK => 0, SUFFIX => '.asy');
$layout_sw->add_with_viewport($layout_container);
sub copy_tree {
- my $tree = $i3->get_workspaces->recv;
+ my $tree = $i3->get_tree->recv;
# convert the tree back to json so we only rebuild/redraw when the tree is changed
my $json = encode_json($tree);
}
# get the output of this workspace
-my $tree = $i3->get_workspaces->recv;
+my $tree = $i3->get_tree->recv;
my @outputs = @{$tree->{nodes}};
my $output = first { defined(first { $_->{name} eq $tmp } @{$_->{nodes}}) } @outputs;
# Request tree
####################
-my $tree = $i3->get_workspaces->recv;
+my $tree = $i3->get_tree->recv;
my $expected = {
fullscreen_mode => 0,
$i3->command('kill')->recv;
-my $tree = $i3->get_workspaces->recv;
+my $tree = $i3->get_tree->recv;
my @nodes = @{$tree->{nodes}};
ok(@nodes > 0, 'i3 still lives');
sleep 1;
$i3->command('mode toggle')->recv;
-my $tree = $i3->get_workspaces->recv;
+my $tree = $i3->get_tree->recv;
my @nodes = @{$tree->{nodes}};
ok(@nodes > 0, 'i3 still lives');
$i3->command("blargh!")->recv;
-my $tree = $i3->get_workspaces->recv;
+my $tree = $i3->get_tree->recv;
my @nodes = @{$tree->{nodes}};
ok(@nodes > 0, 'i3 still lives');
sub get_workspace_names {
my $i3 = i3("/tmp/nestedcons");
# TODO: use correct command as soon as AnyEvent::i3 is updated
- my $tree = $i3->get_workspaces->recv;
+ my $tree = $i3->get_tree->recv;
my @workspaces = map { @{$_->{nodes}} } @{$tree->{nodes}};
[ map { $_->{name} } @workspaces ]
}
sub get_ws {
my ($name) = @_;
my $i3 = i3("/tmp/nestedcons");
- my $tree = $i3->get_workspaces->recv;
+ my $tree = $i3->get_tree->recv;
my @ws = map { @{$_->{nodes}} } @{$tree->{nodes}};
# as there can only be one workspace with this name, we can safely
sub get_focused {
my ($ws) = @_;
my $i3 = i3("/tmp/nestedcons");
- my $tree = $i3->get_workspaces->recv;
+ my $tree = $i3->get_tree->recv;
my @ws = map { @{$_->{nodes}} } @{$tree->{nodes}};
my @cons = grep { $_->{name} eq $ws } @ws;