backlight.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:backlight-indicator 作者: atareao 项目源码 文件源码
def __init__(self):
        self.bm = BacklightManagerForGNOME()
        self.desktop = os.getenv('DESKTOP_SESSION', 'gnome')
        properties = DBUS_PROPS[self.desktop]
        self.callback = None
        self.bus = dbus.SessionBus()
        bus = dbus.SessionBus()
        proxy = bus.get_object(properties['service'], properties['path'])
        self.properties_manager = dbus.Interface(
            proxy, 'org.freedesktop.DBus.Properties')
        self.dbus_interface = dbus.Interface(
            proxy, dbus_interface=properties['interface'])
        self.get_value = self.dbus_interface.get_dbus_method(
            properties['method-get'])
        self.set_value = self.dbus_interface.get_dbus_method(
            properties['method-set'])
        self.callback = None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号