def test_remove(self, qtile): a = qtile.test_window('a') b = qtile.test_window('b') assert tree(qtile) == ['a', 'b'] qtile.kill_window(a) assert tree(qtile) == ['b'] qtile.kill_window(b) assert tree(qtile) == []
def grid(qtile): qtile.test_window('a') qtile.test_window('b') qtile.c.layout.previous() qtile.c.layout.mode_vertical() qtile.test_window('c') qtile.c.layout.right() qtile.c.layout.mode_vertical() qtile.test_window('d')
def test_sizes(self, qtile): qtile.test_window('a') qtile.test_window('b') qtile.c.layout.mode_vertical() qtile.test_window('c') info = qtile.c.window.info() assert info['x'] == 400 assert info['y'] == 300 assert info['width'] == 400 - 2 assert info['height'] == 300 - 2 qtile.c.layout.grow_height(50) info = qtile.c.window.info() assert info['height'] == 300 - 2 + 50 qtile.c.layout.grow_width(50) info = qtile.c.window.info() assert info['width'] == 400 - 2 + 50 qtile.c.layout.reset_size() info = qtile.c.window.info() assert info['height'] == 300 - 2 qtile.c.layout.height(300) info = qtile.c.window.info() assert info['height'] == 300 - 2 qtile.c.layout.width(250) info = qtile.c.window.info() assert info['width'] == 250 - 2 qtile.c.layout.size(200) info = qtile.c.window.info() assert info['height'] == 200 - 2 qtile.c.layout.grow(10) info = qtile.c.window.info() assert info['height'] == 210 - 2
def test_split_directions(self, qtile): qtile.test_window('a') qtile.c.layout.mode_horizontal() qtile.test_window('b') qtile.c.layout.mode_vertical() qtile.test_window('c') assert tree(qtile) == ['a', ['b', 'c']]
def test_recent(self, qtile): qtile.test_window('a') qtile.test_window('b') qtile.test_window('c') assert_focused(qtile, 'c') qtile.c.layout.recent() assert_focused(qtile, 'b') qtile.c.layout.recent() assert_focused(qtile, 'c') qtile.c.layout.next() assert_focused(qtile, 'a') qtile.c.layout.recent() assert_focused(qtile, 'c')
def test_windows(self, qtile): qtile.test_window('a') qtile.test_window('b') qtile.test_window('c') assert_focused(qtile, 'c') assert tree(qtile) == ['a', 'b', 'c']
def test_info(self, qtile): qtile.test_window('a') qtile.test_window('b') assert qtile.c.layout.info()['tree'] == ['a', 'b']
def test_split_mode(self, qtile): qtile.test_window('a') qtile.test_window('b') qtile.c.layout.mode_horizontal_split() qtile.test_window('c') assert qtile.c.window.info()['width'] == 200 - 2 qtile.c.layout.mode_vertical() qtile.test_window('d') assert qtile.c.window.info()['height'] == 300 - 2 qtile.test_window('e') assert qtile.c.window.info()['height'] == 200 - 2 qtile.c.layout.mode_vertical_split() qtile.test_window('f') assert qtile.c.window.info()['height'] == 100 - 2