# Path: epymc/modules.py
# class EmcModule(object):
#     name = ''
#     label = ''
#     icon = ''
#     info = ''
# 
#     def __init__(self):
#         pass
# 
#     def __shutdown__(self):
#         pass
# 
#     def __restart__(self):
#         self.__shutdown__()
#         self.__init__()


import time, re
import epymc.ini as ini
import epymc.gui as gui
import epymc.config_gui as cgui
import epymc.events as events
from efl.ecore import Timer, Exe, ECORE_CALLBACK_RENEW
from epymc.modules import EmcModule
        if self.status == 0:
            # Status 0: the screensaver is off - user is active
            if elapsed > self.ssaver_on_after > 0:
                # turn on the screensaver
                DBG('ScreenSaver: activate screensaver')
                self.status = 1
                exe_run_safe(ini.get('screensaver', 'screensaver_on_cmd'))
            elif elapsed > self.monitor_off_after > 0:
                # turn off the monitor
                DBG('ScreenSaver: monitor off')
                self.status = 2
                exe_run_safe(ini.get('screensaver', 'monitor_off_cmd'))
            else:
                # or keep the screensaver alive and the monitor on
                DBG('ScreenSaver: keep alive')
                exe_run_safe(ini.get('screensaver', 'monitor_on_cmd'))
                exe_run_safe(ini.get('screensaver', 'screensaver_off_cmd'))

        elif self.status == 1:
            # Status 1: the screensaver is on - user is away
            if elapsed > self.monitor_off_after > 0:
                # turn off the monitor
                DBG('ScreenSaver: monitor off')
                self.status = 2
                exe_run_safe(ini.get('screensaver', 'monitor_off_cmd'))

            # the screensaver has been disabled outside epymc
            if elapsed < self.ssaver_on_after > 0:
                self.status = 0


# Path: epymc/modules.py
# class EmcModule(object):
#     name = ''
#     label = ''
#     icon = ''
#     info = ''
# 
#     def __init__(self):
#         pass
# 
#     def __shutdown__(self):
#         pass
# 
#     def __restart__(self):
#         self.__shutdown__()
#         self.__init__()


# Path: epymc/plugins/screensaver/screensaver.py
import time, re
import epymc.ini as ini
import epymc.gui as gui
import epymc.config_gui as cgui
import epymc.events as events
from efl.ecore import Timer, Exe, ECORE_CALLBACK_RENEW
from epymc.modules import EmcModule

        if self.status == 0:
            # Status 0: the screensaver is off - user is active
            if elapsed > self.ssaver_on_after > 0:
                # turn on the screensaver
                DBG('ScreenSaver: activate screensaver')
                self.status = 1
                exe_run_safe(ini.get('screensaver', 'screensaver_on_cmd'))
            elif elapsed > self.monitor_off_after > 0:
                # turn off the monitor
                DBG('ScreenSaver: monitor off')
                self.status = 2
                exe_run_safe(ini.get('screensaver', 'monitor_off_cmd'))
            else:
                # or keep the screensaver alive and the monitor on
                DBG('ScreenSaver: keep alive')
                exe_run_safe(ini.get('screensaver', 'monitor_on_cmd'))
                exe_run_safe(ini.get('screensaver', 'screensaver_off_cmd'))

        elif self.status == 1:
            # Status 1: the screensaver is on - user is away
            if elapsed > self.monitor_off_after > 0:
                # turn off the monitor
                DBG('ScreenSaver: monitor off')
                self.status = 2
                exe_run_safe(ini.get('screensaver', 'monitor_off_cmd'))

            # the screensaver has been disabled outside epymc
            if elapsed < self.ssaver_on_after > 0:
                self.status = 0


        elif self.status == 2: