testcases: Implement open_empty_con which directly returns the ID
This commit is contained in:
parent
d066341261
commit
55f695436a
|
@ -10,7 +10,7 @@ use List::Util qw(first);
|
||||||
use v5.10;
|
use v5.10;
|
||||||
|
|
||||||
use Exporter ();
|
use Exporter ();
|
||||||
our @EXPORT = qw(get_workspace_names get_unused_workspace get_ws_content get_ws get_focused);
|
our @EXPORT = qw(get_workspace_names get_unused_workspace get_ws_content get_ws get_focused open_empty_con);
|
||||||
|
|
||||||
BEGIN {
|
BEGIN {
|
||||||
my $window_count = 0;
|
my $window_count = 0;
|
||||||
|
@ -53,6 +53,13 @@ sub open_standard_window {
|
||||||
return $window;
|
return $window;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub open_empty_con {
|
||||||
|
my ($i3) = @_;
|
||||||
|
|
||||||
|
my $reply = $i3->command('open')->recv;
|
||||||
|
return $reply->{id};
|
||||||
|
}
|
||||||
|
|
||||||
sub get_workspace_names {
|
sub get_workspace_names {
|
||||||
my $i3 = i3("/tmp/nestedcons");
|
my $i3 = i3("/tmp/nestedcons");
|
||||||
# TODO: use correct command as soon as AnyEvent::i3 is updated
|
# TODO: use correct command as soon as AnyEvent::i3 is updated
|
||||||
|
|
Loading…
Reference in New Issue