use i3test;
use List::Util qw(first);
+my ($con, $first, $second);
+
sub get_marks {
return i3(get_socket_path())->get_marks->recv;
}
# check that only the latter is marked
##############################################################
-my $first = open_window;
-my $second = open_window;
+$first = open_window;
+$second = open_window;
cmd 'mark important';
cmd 'focus left';
# 5: mark a con, toggle the mark, check that the mark is gone
##############################################################
-my $con = open_window;
+$con = open_window;
cmd 'mark important';
cmd 'mark --toggle important';
ok(!get_mark_for_window_on_workspace($tmp, $con), 'container no longer has the mark');
# 6: toggle a mark on an unmarked con, check it is marked
##############################################################
-my $con = open_window;
+$con = open_window;
cmd 'mark --toggle important';
is(get_mark_for_window_on_workspace($tmp, $con), 'important', 'container now has the mark');
# with the new mark
##############################################################
-my $con = open_window;
+$con = open_window;
cmd 'mark boring';
cmd 'mark --toggle important';
is(get_mark_for_window_on_workspace($tmp, $con), 'important', 'container has the most recent mark');
# check only the latter has the mark
##############################################################
-my $first = open_window;
-my $second = open_window;
+$first = open_window;
+$second = open_window;
cmd 'mark important';
cmd 'focus left';
# it fails
##############################################################
-my $first = open_window(wm_class => 'iamnotunique');
-my $second = open_window(wm_class => 'iamnotunique');
+$first = open_window(wm_class => 'iamnotunique');
+$second = open_window(wm_class => 'iamnotunique');
my $result = cmd "[instance=iamnotunique] mark important";