def __init__(self, **config): Volume.__init__(self, **config) self.add_defaults(PulseVolume.defaults) self.connected = None self._subscribed = False self.default_sink_name = None self.default_sink = None self.handle = ffi.new_handle(self) self.client_name = ffi.new('char[]', b'Qtile-pulse') self.connect()
def __init__(self, **config): _Volume.__init__(self, **config) self.add_defaults(_Volume.defaults) self.volume = None if self.theme_path: self.length_type = bar.STATIC self.length = 0 self.surfaces = {} self.current_icon = 'volume_off' self.icons = dict([(x, '{0}.png'.format(x)) for x in ( 'volume_down', 'volume_up', 'volume_off', 'volume_mute', )])