File: ss_currentscreen.py

package info (click to toggle)
qtile 0.34.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,004 kB
  • sloc: python: 49,959; ansic: 4,371; xml: 324; sh: 260; makefile: 218
file content (19 lines) | stat: -rw-r--r-- 402 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import pytest

import libqtile.widget


@pytest.fixture
def widget():
    yield libqtile.widget.CurrentScreen


def ss_currentscreen(screenshot_manager):
    # First screenshot is active screen
    screenshot_manager.take_screenshot()

    # Change focus to second screen
    screenshot_manager.c.to_screen(1)

    # Widget now shows it's on an inactive screen
    screenshot_manager.take_screenshot()