2 # vim:ts=4:sw=4:expandtab
3 # !NO_I3_INSTANCE! will prevent complete-run.pl from starting i3
5 # checks if i3 starts up on workspace '1' or the first configured named workspace
8 use X11::XCB::Connection;
11 my $x = X11::XCB::Connection->new;
13 ##############################################################
14 # 1: i3 should start with workspace '1'
15 ##############################################################
19 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
22 my $pid = launch_with_config($config);
24 my @names = @{get_workspace_names()};
25 cmp_deeply(\@names, [ '1' ], 'i3 starts on workspace 1 without any configuration');
27 exit_gracefully($pid);
29 ##############################################################
30 # 2: with named workspaces, i3 should start on the first named one
31 ##############################################################
35 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
37 bindsym Mod1+1 workspace foobar
40 $pid = launch_with_config($config);
42 my @names = @{get_workspace_names()};
43 cmp_deeply(\@names, [ 'foobar' ], 'i3 starts on named workspace foobar');
45 exit_gracefully($pid);
47 ##############################################################
48 # 3: the same test as 2, but with a quoted workspace name
49 ##############################################################
53 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
55 bindsym Mod1+1 workspace "foobar"
58 $pid = launch_with_config($config);
60 my @names = @{get_workspace_names()};
61 cmp_deeply(\@names, [ 'foobar' ], 'i3 starts on named workspace foobar');
63 exit_gracefully($pid);