Beispiel #1
0
    def __init__(self, cpu='temp3', case='temp2', ram='MemTotal'):
        """
        Initialise an instance of the IdleBarPlugin.
        @param cpu: name of the cpu sensor
        @param case: name of the case (chip set) sensor
        @param ram: name of the memory to be monitored
        """
        IdleBarPlugin.__init__(self)
        self.hotstack = 0
        self.case = None

        if isinstance(cpu, basestring):
            self.cpu = self.sensor(cpu, '@', self.hotstack)
        else:
            self.cpu = self.sensor(cpu[0], cpu[1], self.hotstack)

        if case:
            if isinstance(case, basestring):
                self.case = self.sensor(case, '@', self.hotstack)
            else:
                self.case = self.sensor(case[0], case[1], self.hotstack)


        self.ram = ram
        self.retwidth = 0
	def __init__(self, drives, norm, warm):

		"""
		init idlebar hddtemp plugin
		"""

		global THREAD

		IdleBarPlugin.__init__(self)

		self.drives = drives
		self.norm = int(norm)
		self.warm = int(warm)

		# initialize icons
		self.img = {}
		self.img ['cool'] = os.path.join(config.ICON_DIR, 'misc/hddtemp-cool.png')
		self.img ['norm'] = os.path.join(config.ICON_DIR, 'misc/hddtemp-norm.png')
		self.img ['warm'] = os.path.join(config.ICON_DIR, 'misc/hddtemp-warm.png')

		# initialize temperature
		self.temp = -1

		if THREAD == None:
			# only want one thread
			THREAD = Hddtemp_Thread()
			THREAD.setDaemon(1)
			THREAD.start()
Beispiel #3
0
 def __init__(self,Mem=1,Cpu=1,Prec=1):
     IdleBarPlugin.__init__(self)
     self.drawCpu = Cpu
     self.drawMem = Mem
     self.precision = Prec
     self.time = 0
     self.lastused = 0
     self.lastuptime = 0
Beispiel #4
0
 def __init__(self, Mem=1, Cpu=1, Prec=1):
     IdleBarPlugin.__init__(self)
     self.drawCpu = Cpu
     self.drawMem = Mem
     self.precision = Prec
     self.time = 0
     self.lastused = 0
     self.lastuptime = 0
Beispiel #5
0
 def __init__(self, mailbox):
     IdleBarPlugin.__init__(self)
     self.plugin_name = 'idlebar.mail'
     self.NO_MAILIMAGE = os.path.join(config.ICON_DIR,
                                      'status/newmail_dimmed.png')
     self.MAILIMAGE = os.path.join(config.ICON_DIR,
                                   'status/newmail_active.png')
     self.MAILBOX = mailbox
Beispiel #6
0
 def __init__(self):
     IdleBarPlugin.__init__(self)
     self.plugin_name = 'idlebar.remindicon'
     self.time = 0
     self.images = {}
     self.images['alert']   = os.path.join(config.ICON_DIR, 'misc/reminder_on.png')
     self.images['nothing'] = os.path.join(config.ICON_DIR, 'misc/reminder_off.png')
     self.status = self.images['nothing']
     self.cmd = config.REMINDICON_CMD
Beispiel #7
0
 def __init__(self):
     IdleBarPlugin.__init__(self)
     self.NO_MAILIMAGE = os.path.join(config.ICON_DIR, 'status/newmail_dimmed.png')
     self.MAILIMAGE = os.path.join(config.ICON_DIR, 'status/newmail_active_small.png')
     self.FREQUENCY = 20 # seconds between checks
     self.unread = 0
     self.bg_thread = threading.Thread(target=self._bg_function, name='MultiMail Thread')
     self.bg_thread.setDaemon(1)
     self.bg_thread.start() # Run self._bg_function() in a separate thread
Beispiel #8
0
    def __init__(self):
        """ Initialise the transcode idlebar plug-in """
        _debug_('transcode.PluginInterface.__init__()', 2)
        IdleBarPlugin.__init__(self)
        self.plugin_name = 'idlebar.transcode'

        self.background = os.path.join(config.ICON_DIR,
                                       'status/enc_background.png')
        self.leftclamp = os.path.join(config.ICON_DIR,
                                      'status/enc_leftclamp.png')
        self.rightclamp = os.path.join(config.ICON_DIR,
                                       'status/enc_rightclamp.png')
        self.notrunning = os.path.join(config.ICON_DIR,
                                       'status/enc_notrunning.png')
        self.nojobs = os.path.join(config.ICON_DIR, 'status/enc_nojobs.png')
        self.audio = os.path.join(config.ICON_DIR, 'status/enc_audio.png')
        self.video = os.path.join(config.ICON_DIR, 'status/enc_video.png')
        self.video1 = os.path.join(config.ICON_DIR, 'status/enc_video1.png')
        self.video2 = os.path.join(config.ICON_DIR, 'status/enc_video2.png')
        self.video3 = os.path.join(config.ICON_DIR, 'status/enc_video3.png')
        self.multiplex = os.path.join(config.ICON_DIR,
                                      'status/enc_multiplex.png')

        self.cacheimg = {}
        self.background_w, self.background_h = (0, 0)
        self.leftclamp_w, self.leftclamp_h = (0, 0)
        self.rightclamp_w, self.rightclamp_h = (0, 0)
        self.remaining_min = re.compile('[0-9]*')
        self.remaining = ''
        self.progress = 0
        self.progress_x = None
        self.leftclamp_x = 0
        self.rightclamp_x = 0

        self.poll_interval = 82  # 82*1/120th seconds (~1sec)
        self.draw_interval = self.poll_interval
        self.last_interval = self.poll_interval
        self.lastdraw = 0
        self.lastpoll = 0
        self.drawtime = 0
        server_string = 'http://%s:%s/' % (config.ENCODINGSERVER_IP,
                                           config.ENCODINGSERVER_PORT)
        self.server = xmlrpclib.Server(server_string, allow_none=1)

        self.skin = skin.get_singleton()
        self.calculate = True
        self.jobs = ''
        self.mode = 'Not Running'
        self.state = 'noserver'
        self.laststate = None
        self.percent = 0.0
        self.running = False
        self.font = self.skin.get_font('small0')
        if self.font == skin.get_font('default'):
            self.font = skin.get_font('info value')
        _debug_('transcode.PluginInterface.__init__() done.')
Beispiel #9
0
    def __init__(self):
        IdleBarPlugin.__init__(self)
        self.plugin_name = 'idlebar.volume'

        self.barimg   = os.path.join(config.ICON_DIR, 'status/volume_bar.png')
        self.outimg   = os.path.join(config.ICON_DIR, 'status/volume_out.png')
        self.muteimg  = os.path.join(config.ICON_DIR, 'status/volume_mute.png')
        self.cacheimg = {}
        self.muted    = False
        self.volume   = -1
Beispiel #10
0
 def __init__(self):
     IdleBarPlugin.__init__(self)
     self.plugin_name='idlebar.progactive'
     self.time = 0
     self.progname = config.PROGACTIVE_PROGRAM
     icondir = os.path.join(config.ICON_DIR, 'status')
     self.images = {}
     self.images['cross'] = os.path.join(icondir, 'cross.png')
     self.images['check'] = os.path.join(icondir, 'check.png')
     self.image = self.images['cross']
Beispiel #11
0
 def __init__(self):
     IdleBarPlugin.__init__(self)
     self.plugin_name = 'idlebar.progactive'
     self.time = 0
     self.progname = config.PROGACTIVE_PROGRAM
     icondir = os.path.join(config.ICON_DIR, 'status')
     self.images = {}
     self.images['cross'] = os.path.join(icondir, 'cross.png')
     self.images['check'] = os.path.join(icondir, 'check.png')
     self.image = self.images['cross']
Beispiel #12
0
    def __init__(self):
        IdleBarPlugin.__init__(self)
        self.plugin_name = 'idlebar.volume'

        self.barimg = os.path.join(config.ICON_DIR, 'status/volume_bar.png')
        self.outimg = os.path.join(config.ICON_DIR, 'status/volume_out.png')
        self.muteimg = os.path.join(config.ICON_DIR, 'status/volume_mute.png')
        self.cacheimg = {}
        self.muted = False
        self.volume = -1
Beispiel #13
0
 def __init__(self):
     IdleBarPlugin.__init__(self)
     self.plugin_name = 'idlebar.remindicon'
     self.time = 0
     self.images = {}
     self.images['alert'] = os.path.join(config.ICON_DIR,
                                         'misc/reminder_on.png')
     self.images['nothing'] = os.path.join(config.ICON_DIR,
                                           'misc/reminder_off.png')
     self.status = self.images['nothing']
     self.cmd = config.REMINDICON_CMD
Beispiel #14
0
    def __init__(self):
        """ Initialise the transcode idlebar plug-in """
        logger.log(9, 'transcode.PluginInterface.__init__()')
        IdleBarPlugin.__init__(self)
        self.plugin_name = 'idlebar.transcode'

        self.background = os.path.join(config.ICON_DIR,
                                       'status/enc_background.png')
        self.leftclamp = os.path.join(config.ICON_DIR,
                                      'status/enc_leftclamp.png')
        self.rightclamp = os.path.join(config.ICON_DIR,
                                       'status/enc_rightclamp.png')
        self.notrunning = os.path.join(config.ICON_DIR,
                                       'status/enc_notrunning.png')
        self.nojobs = os.path.join(config.ICON_DIR, 'status/enc_nojobs.png')
        self.audio = os.path.join(config.ICON_DIR, 'status/enc_audio.png')
        self.video = os.path.join(config.ICON_DIR, 'status/enc_video.png')
        self.video1 = os.path.join(config.ICON_DIR, 'status/enc_video1.png')
        self.video2 = os.path.join(config.ICON_DIR, 'status/enc_video2.png')
        self.video3 = os.path.join(config.ICON_DIR, 'status/enc_video3.png')
        self.multiplex = os.path.join(config.ICON_DIR,
                                      'status/enc_multiplex.png')

        self.cacheimg = {}
        self.background_w, self.background_h = (0, 0)
        self.leftclamp_w, self.leftclamp_h = (0, 0)
        self.rightclamp_w, self.rightclamp_h = (0, 0)
        self.remaining_min = re.compile('[0-9]*')
        self.remaining = ''
        self.progress = 0
        self.progress_x = None
        self.leftclamp_x = 0
        self.rightclamp_x = 0

        self.poll_interval = 1  # 1 sec should be same as most frequent
        self.draw_interval = 5.0  # 5 secs
        self.last_interval = self.poll_interval
        self.lastdraw = 0
        self.lastpoll = 0
        self.drawtime = 0
        self.server = EncodingClientActions()

        self.skin = skin.get_singleton()
        self.calculate = True
        self.jobs = ''
        self.mode = 'Not Running'
        self.state = 'noserver'
        self.laststate = None
        self.percent = 0.0
        self.running = False
        self.font = self.skin.get_font(config.OSD_IDLEBAR_FONT)
        self.timer = kaa.Timer(self._timerhandler)
        self.timer.start(self.poll_interval)
        logger.debug('transcode.PluginInterface.__init__() done.')
Beispiel #15
0
 def __init__(self, zone='CYYZ', units='C'):
     IdleBarPlugin.__init__(self)
     self.plugin_name = 'idlebar.weather'
     self.TEMPUNITS = units
     self.METARCODE = zone
     self.WEATHERCACHE = config.FREEVO_CACHEDIR + '/weather'
     print
     print 'WARNING: the idlebar.weather plugin downloads new weather'
     print 'information inside the main loop. This bug makes all menu'
     print 'actions _very_ slow. Consider not using this plugin for higher'
     print 'speed.'
     print
Beispiel #16
0
 def __init__(self):
     IdleBarPlugin.__init__(self)
     self.NO_MAILIMAGE = os.path.join(config.ICON_DIR,
                                      'status/newmail_dimmed.png')
     self.MAILIMAGE = os.path.join(config.ICON_DIR,
                                   'status/newmail_active_small.png')
     self.FREQUENCY = 20  # seconds between checks
     self.unread = 0
     self.bg_thread = threading.Thread(target=self._bg_function,
                                       name='MultiMail Thread')
     self.bg_thread.setDaemon(1)
     self.bg_thread.start()  # Run self._bg_function() in a separate thread
Beispiel #17
0
 def __init__(self):
     IdleBarPlugin.__init__(self)
     self.plugin_name = 'idlebar.cdstatus'
     icondir = os.path.join(config.ICON_DIR, 'status')
     self.cdimages = {}
     self.cdimages ['audiocd']     = os.path.join(icondir, 'cd_audio.png')
     self.cdimages ['empty_cdrom'] = os.path.join(icondir, 'cd_inactive.png')
     self.cdimages ['images']      = os.path.join(icondir, 'cd_photo.png')
     self.cdimages ['video']       = os.path.join(icondir, 'cd_video.png')
     self.cdimages ['dvd']         = os.path.join(icondir, 'cd_video.png')
     self.cdimages ['burn']        = os.path.join(icondir, 'cd_burn.png')
     self.cdimages ['cdrip']       = os.path.join(icondir, 'cd_rip.png')
     self.cdimages ['mixed']       = os.path.join(icondir, 'cd_mixed.png')
Beispiel #18
0
 def __init__(self, listings_threshold=-1):
     IdleBarPlugin.__init__(self)
     self.plugin_name = 'idlebar.tv'
     self.listings_threshold = listings_threshold
     self.next_guide_check = 0
     self.listings_expire = 0
     self.tvlockfile = config.FREEVO_CACHEDIR + '/record.*'
     icondir = os.path.join(config.ICON_DIR, 'status')
     self.TVLOCKED = os.path.join(icondir, 'television_active.png')
     self.TVFREE = os.path.join(icondir, 'television_inactive.png')
     self.NEAR_EXPIRED = os.path.join(icondir,
                                      'television_near_expired.png')
     self.EXPIRED = os.path.join(icondir, 'television_expired.png')
Beispiel #19
0
 def __init__(self, listings_threshold=-1):
     IdleBarPlugin.__init__(self)
     self.plugin_name = 'idlebar.tv'
     self.listings_threshold = listings_threshold
     self.next_guide_check = 0
     self.listings_expire = 0
     self.tv_lockfile = config.FREEVO_CACHEDIR + '/record.*'
     self.pending_lockfile = config.FREEVO_CACHEDIR + '/record.soon'
     icondir = os.path.join(config.ICON_DIR, 'status')
     self.TVPENDING    = os.path.join(icondir, 'television_soon.png')
     self.TVLOCKED     = os.path.join(icondir, 'television_active.png')
     self.TVFREE       = os.path.join(icondir, 'television_inactive.png')
     self.NEAR_EXPIRED = os.path.join(icondir, 'television_near_expired.png')
     self.EXPIRED      = os.path.join(icondir, 'television_expired.png')
Beispiel #20
0
 def __init__(self):
     IdleBarPlugin.__init__(self)
     self.plugin_name = 'idlebar.cdstatus'
     icondir = os.path.join(config.ICON_DIR, 'status')
     self.cdimages = {}
     self.cdimages ['empty_cdrom'] = os.path.join(icondir, 'cd_inactive.png')
     self.cdimages ['audiocd']     = os.path.join(icondir, 'cd_audio.png')
     self.cdimages ['audio']       = os.path.join(icondir, 'cd_audio.png')
     self.cdimages ['images']      = os.path.join(icondir, 'cd_photo.png')
     self.cdimages ['video']       = os.path.join(icondir, 'cd_video.png')
     self.cdimages ['dvd']         = os.path.join(icondir, 'cd_video.png')
     self.cdimages ['burn']        = os.path.join(icondir, 'cd_burn.png')
     self.cdimages ['cdrip']       = os.path.join(icondir, 'cd_rip.png')
     self.cdimages ['mixed']       = os.path.join(icondir, 'cd_mixed.png')
Beispiel #21
0
    def __init__(self):
        """ Initialise the transcode idlebar plug-in """
        logger.log( 9, 'transcode.PluginInterface.__init__()')
        IdleBarPlugin.__init__(self)
        self.plugin_name = 'idlebar.transcode'

        self.background = os.path.join(config.ICON_DIR, 'status/enc_background.png')
        self.leftclamp  = os.path.join(config.ICON_DIR, 'status/enc_leftclamp.png')
        self.rightclamp = os.path.join(config.ICON_DIR, 'status/enc_rightclamp.png')
        self.notrunning = os.path.join(config.ICON_DIR, 'status/enc_notrunning.png')
        self.nojobs     = os.path.join(config.ICON_DIR, 'status/enc_nojobs.png')
        self.audio      = os.path.join(config.ICON_DIR, 'status/enc_audio.png')
        self.video      = os.path.join(config.ICON_DIR, 'status/enc_video.png')
        self.video1     = os.path.join(config.ICON_DIR, 'status/enc_video1.png')
        self.video2     = os.path.join(config.ICON_DIR, 'status/enc_video2.png')
        self.video3     = os.path.join(config.ICON_DIR, 'status/enc_video3.png')
        self.multiplex  = os.path.join(config.ICON_DIR, 'status/enc_multiplex.png')

        self.cacheimg = {}
        self.background_w, self.background_h = (0, 0)
        self.leftclamp_w, self.leftclamp_h = (0, 0)
        self.rightclamp_w, self.rightclamp_h = (0, 0)
        self.remaining_min = re.compile('[0-9]*')
        self.remaining = ''
        self.progress  = 0
        self.progress_x = None
        self.leftclamp_x = 0
        self.rightclamp_x = 0

        self.poll_interval = 1 # 1 sec should be same as most frequent
        self.draw_interval = 5.0 # 5 secs
        self.last_interval = self.poll_interval
        self.lastdraw  = 0
        self.lastpoll  = 0
        self.drawtime  = 0
        self.server    = EncodingClientActions()

        self.skin      = skin.get_singleton()
        self.calculate = True
        self.jobs      = ''
        self.mode      = 'Not Running'
        self.state     = 'noserver'
        self.laststate = None
        self.percent   = 0.0
        self.running   = False
        self.font      = self.skin.get_font(config.OSD_IDLEBAR_FONT)
        self.timer     = kaa.Timer(self._timerhandler)
        self.timer.start(self.poll_interval)
        logger.debug('transcode.PluginInterface.__init__() done.')
Beispiel #22
0
 def __init__(self, zone='CYYZ', units='C'):
     """
     Initialise an instance of the PluginInterface
     """
     logger.log( 9, 'PluginInterface.__init__(zone=%r, units=%r)', zone, units)
     if not config.SYS_USE_NETWORK:
         self.reason = 'SYS_USE_NETWORK not enabled'
         return
     IdleBarPlugin.__init__(self)
     self.plugin_name = 'idlebar.weather'
     self.tempunits = units
     self.metarcode = zone
     self.cachefile = config.FREEVO_CACHEDIR + '/weather'
     self.cachetime = 0
     self.fetcher = WeatherFetcher(config.IDLEBAR_WEATHER_REFRESH, self.metarcode, self.tempunits, self.cachefile)
     self.fetcher.start()
Beispiel #23
0
 def __init__(self, zone='CYYZ', units='C'):
     """
     """
     _debug_('PluginInterface.__init__(zone=%r, units=%r)' % (zone, units), 2)
     if not config.USE_NETWORK:
         self.reason = 'USE_NETWORK not enabled'
         return
     IdleBarPlugin.__init__(self)
     self.plugin_name = 'idlebar.weather'
     self.TEMPUNITS = units
     self.METARCODE = zone
     self.WEATHERCACHE = config.FREEVO_CACHEDIR + '/weather'
     self.cachetime = 0
     self.condition = Condition()
     self.fetcher = WeatherFetcher(self.condition, self.METARCODE, self.TEMPUNITS, self.WEATHERCACHE)
     self.fetcher.start()
Beispiel #24
0
    def __init__(self):
        IdleBarPlugin.__init__(self)
        self.plugin_name = 'idlebar.volume'

        self.barimg1  = os.path.join(config.ICON_DIR, 'status/volbar1.png')
        self.barimg2  = os.path.join(config.ICON_DIR, 'status/volbar2.png')
        self.barimg3  = os.path.join(config.ICON_DIR, 'status/volbar3.png')
        self.barimg4  = os.path.join(config.ICON_DIR, 'status/volbar4.png')
        self.outimg   = os.path.join(config.ICON_DIR, 'status/volume_out_multi.png')
        self.muteimg  = os.path.join(config.ICON_DIR, 'status/volume_mute_multi.png')
        self.cacheimg = {}
        self.muted    = False
        self.pcmvolume   = -1
        self.survolume   = -1
        self.ctrvolume   = -1
        self.lfevolume   = -1
Beispiel #25
0
    def __init__(self, *sensors):
        """ Initialize the plug-in """
        logger.log(9, 'sensor.__init__(sensors=%r)', sensors)
        for sens in sensors:
            if isinstance(sens, (tuple, list)):
                if len(sens) < 3 or len(sens) > 4:
                    self.reason = _('Sensors must have three or four values:'
                                    ) + ' %r' % sens
                    return
                if not os.path.exists(sens[1]):
                    self.reason = _('Sensor') + (' %s ' %
                                                 sens[1]) + _('does not exist')
                    return
            elif isinstance(sens, basestring):
                if self.getRamStat(sens) is None:
                    self.reason = _(
                        '%s ' % sens) + _('is not a valid meminfo entry')
                    return
            else:
                return
        IdleBarPlugin.__init__(self)

        self.sens = []
        self.hotstack = 0

        # Get the parameters
        for sens in sensors:
            if isinstance(sens, (tuple, list)):
                # We probably have a temperature sensor here
                if len(sens) == 4:
                    # Temperature with compute_expression...
                    self.sens.append(
                        self.sensor(sens[0], sens[1], sens[2], sens[3],
                                    self.hotstack))
                elif len(sens) == 3:
                    # ... and without
                    self.sens.append(
                        self.sensor(sens[0], sens[1], sens[2], '@',
                                    self.hotstack))

            elif isinstance(sens, basestring):
                # This will be treated as meminfo
                self.sens.append(sens)
            # XXX: Do we need an else here (to designate a config error)

        self.retwidth = 0
Beispiel #26
0
 def __init__(self, zone='CYYZ', units='C'):
     """
     Initialise an instance of the PluginInterface
     """
     logger.log(9, 'PluginInterface.__init__(zone=%r, units=%r)', zone,
                units)
     if not config.SYS_USE_NETWORK:
         self.reason = 'SYS_USE_NETWORK not enabled'
         return
     IdleBarPlugin.__init__(self)
     self.plugin_name = 'idlebar.weather'
     self.tempunits = units
     self.metarcode = zone
     self.cachefile = config.FREEVO_CACHEDIR + '/weather'
     self.cachetime = 0
     self.fetcher = WeatherFetcher(config.IDLEBAR_WEATHER_REFRESH,
                                   self.metarcode, self.tempunits,
                                   self.cachefile)
     self.fetcher.start()
Beispiel #27
0
    def __init__(self, *sensors):
        """ Initialize the plug-in """
        logger.log( 9, 'sensor.__init__(sensors=%r)', sensors)
        for sens in sensors:
            if isinstance(sens, (tuple, list)):
                if len(sens) < 3 or len(sens) > 4:
                    self.reason = _('Sensors must have three or four values:') + ' %r' % sens
                    return
                if not os.path.exists(sens[1]):
                    self.reason = _('Sensor')+(' %s ' % sens[1])+_('does not exist')
                    return
            elif isinstance(sens, basestring):
                if self.getRamStat(sens) is None:
                    self.reason = _('%s ' % sens)+_('is not a valid meminfo entry')
                    return
            else:
                return
        IdleBarPlugin.__init__(self)

        self.sens = []
        self.hotstack = 0

        # Get the parameters
        for sens in sensors:
            if isinstance(sens, (tuple, list)):
                # We probably have a temperature sensor here
                if len(sens) == 4:
                    # Temperature with compute_expression...
                    self.sens.append(self.sensor(sens[0], sens[1], sens[2], sens[3], self.hotstack))
                elif len(sens) == 3:
                    # ... and without
                    self.sens.append(self.sensor(sens[0], sens[1], sens[2], '@', self.hotstack))

            elif isinstance(sens, basestring):
                # This will be treated as meminfo
                self.sens.append(sens)
            # XXX: Do we need an else here (to designate a config error)

        self.retwidth = 0
Beispiel #28
0
    def __init__(self):
        if not config.TV_RECORD_DIR:
            self.reason = 'TV_RECORD_DIR is not set'
            return
        if not os.path.isdir(config.TV_RECORD_DIR):
            self.reason = 'TV_RECORD_DIR "%s" is not a directory' % (
                config.TV_RECORD_DIR)
            return
        IdleBarPlugin.__init__(self)
        self.plugin_name = 'idlebar.diskfree'
        self.time = 0
        self.diskfree = 0
        self.freespace = 0
        self.totalspace = 0
        self.percent = 0.0

        self.diskimg = os.path.join(config.ICON_DIR, 'status/diskfree.png')
        self.goodimg = os.path.join(config.ICON_DIR,
                                    'status/diskfree-good.png')
        self.poorimg = os.path.join(config.ICON_DIR,
                                    'status/diskfree-poor.png')
        self.badimg = os.path.join(config.ICON_DIR, 'status/diskfree-bad.png')
        self.cacheimg = {}
Beispiel #29
0
    def __init__(self):
        if not config.TV_RECORD_DIR:
            self.reason = 'TV_RECORD_DIR is not set'
            return
        if not os.path.isdir(config.TV_RECORD_DIR):
            self.reason = 'TV_RECORD_DIR "%s" is not a directory' % (config.TV_RECORD_DIR)
            return
        IdleBarPlugin.__init__(self)
        self.plugin_name = 'idlebar.diskfree'
        self.poll_interval = 15 # about 15 secs
        self.poll_menu_only = True
        self.time = 0
        self.diskfree = 0
        self.freespace = 0
        self.totalspace = 0
        self.percent = 0.0
        self.lastpoll = time.time()
        self.lastdraw = None

        self.diskimg = os.path.join(config.ICON_DIR, 'status/diskfree.png')
        self.goodimg = os.path.join(config.ICON_DIR, 'status/diskfree-good.png')
        self.poorimg = os.path.join(config.ICON_DIR, 'status/diskfree-poor.png')
        self.badimg  = os.path.join(config.ICON_DIR, 'status/diskfree-bad.png')
        self.cacheimg = {}
Beispiel #30
0
 def __init__(self):
     IdleBarPlugin.__init__(self)
     self.plugin_name = 'idlebar.holidays'
Beispiel #31
0
 def __init__(self):
     IdleBarPlugin.__init__(self)
     self.plugin_name = 'idlebar.DVDCopy'
     self.icon = os.path.join(config.ICON_DIR, 'status/copy_to_hdd.png')
 def __init__(self):
     IdleBarPlugin.__init__(self)
     if (random.randrange(2)):
         self.yeanay = 'yea'
     else:
         self.yeanay = 'nay'
Beispiel #33
0
 def __init__(self):
     IdleBarPlugin.__init__(self)
     self.plugin_name = 'idlebar.holidays'
Beispiel #34
0
 def __init__(self, mailbox):
     IdleBarPlugin.__init__(self)
     self.plugin_name = 'idlebar.mail'
     self.NO_MAILIMAGE = os.path.join(config.ICON_DIR, 'status/newmail_dimmed.png')
     self.MAILIMAGE = os.path.join(config.ICON_DIR, 'status/newmail_active.png')
     self.MAILBOX = mailbox
Beispiel #35
0
                 print "and sensor chip modules"
             else:
                 print "LM_Sensors proc data not available? Did you load i2c-proc"
                 print "and configured lm_sensors?"
                 print "temperatures will be bogus"
             return -1 #failure
             
         for senspath in os.listdir(self.initpath):
             testpath = os.path.join(self.initpath , senspath)
             if os.path.isdir(testpath): 
                 return testpath
                 
 
 
 def __init__(self, cpu='temp3', case='temp2' , ram='MemTotal'):
     IdleBarPlugin.__init__(self)
     
     
     self.hotstack = 0
     self.case = None
 
     if isinstance (cpu,types.StringType):
         self.cpu = self.sensor(cpu, '@', self.hotstack)
     else:
         self.cpu = self.sensor(cpu[0], cpu[1], self.hotstack)
 
     if case: 
         if isinstance (case,types.StringType):
             self.case = self.sensor(case, '@', self.hotstack)
         else:
             self.case = self.sensor(case[0], case[1], self.hotstack)
Beispiel #36
0
 def __init__(self):
     IdleBarPlugin.__init__(self)
     if ( random.randrange(2) ):
         self.yeanay = 'yea'
     else:
         self.yeanay = 'nay'
Beispiel #37
0
 def __init__(self):
     IdleBarPlugin.__init__(self)
     self.plugin_name = 'idlebar.DVDCopy'
     self.icon = os.path.join(config.ICON_DIR, 'status/copy_to_hdd.png')