This file is indexed.

/usr/lib/python3/dist-packages/checkbox/contrib/gdk.py is in python3-checkbox 0.17.6-0ubuntu6.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Python-XRandR provides a high level API for the XRandR extension of the
# X.org server. XRandR allows to configure resolution, refresh rate, rotation
# of the screen and multiple outputs of graphics cards.
#
# This module allows to get information for gtk.gdk.Screen objects
#
# In many aspects it follows the design of the xrand tool written by
# Keith Packard.
#
# Copyright 2007 © Sebastian Heinlein <sebastian.heinlein@web.de>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

from gi.repository import Gdk
from checkbox.contrib import xrandr

#FIXME: Perhaps using gdk_x11_screen_get_xscreen would be more elegant

def get_default_screen_config():
    dpy = Gdk.Display.get_default()
    screen = Gdk.Display.get_default_screen(dpy)
    return get_screen_config(screen)

def get_screen_config(screen):
    """Returns the XRandR screen config instance for the given gtk.gdk.Screen"""
    dpy = screen.get_display()
    dpy_url = dpy.get_name()
    count = screen.get_number()
    return xrandr.get_screen_of_display(dpy_url, count)

# vim:ts=4:sw=4:et