2 # vim:ts=4:sw=4:expandtab
3 # checks if i3 starts up on workspace '1' or the first configured named workspace
5 use i3test i3_autostart => 0;
7 ##############################################################
8 # 1: i3 should start with workspace '1'
9 ##############################################################
13 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
16 my $pid = launch_with_config($config);
18 my @names = @{get_workspace_names()};
19 is_deeply(\@names, [ '1' ], 'i3 starts on workspace 1 without any configuration');
21 exit_gracefully($pid);
23 ##############################################################
24 # 2: with named workspaces, i3 should start on the first named one
25 ##############################################################
29 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
31 bindsym Mod1+1 workspace foobar
34 $pid = launch_with_config($config);
36 @names = @{get_workspace_names()};
37 is_deeply(\@names, [ 'foobar' ], 'i3 starts on named workspace foobar');
39 exit_gracefully($pid);
41 ##############################################################
42 # 3: the same test as 2, but with a quoted workspace name
43 ##############################################################
47 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
49 bindsym Mod1+1 workspace "foobar"
52 $pid = launch_with_config($config);
54 @names = @{get_workspace_names()};
55 is_deeply(\@names, [ 'foobar' ], 'i3 starts on named workspace foobar');
57 exit_gracefully($pid);