コード例 #1
0
    def __init__(self):
        CommandConditionPlugin.__init__(
            self,
            basename=plugin_name(__file__),
            name=_("Fire This"),
            description=_(
                "Expect a file with specific name in the home directory"),
            author="Francesco Garosi",
            copyright="Copyright (c) 2016",
            icon='firethis',
            help_string=HELP,
            version="1.0.0",
        )
        # the append steps inform the plugin installer of the resource files
        self.graphics.append('firethis.png')
        self.resources.append('firethis.glade')

        # here the pane is prepared in the same way as a dialog box, but
        # it is not initialized: the initialization is deferred to the first
        # attempt to retrieve the pane
        self.builder = self.get_dialog('firethis')
        self.plugin_panel = None
        self.forward_allowed = True

        # the default command line is almost the same as before
        self.command_line = "test -f ~/'fire.this'"
        self.summary_description = \
            "On creation of a 'fire.this' file in the home directory"
コード例 #2
0
 def __init__(self):
     TaskPlugin.__init__(
         self,
         category=PLUGIN_CONST.CATEGORY_TASK_FILEOPS,
         basename=plugin_name(__file__),
         name=_("Media Copy"),
         description=_("Copy from Removable Media"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='briefcase',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_fileops-mediacopy')
     self.plugin_panel = None
     self.forward_allowed = False
     self.media_label = None
     self.destination = None
     self.data = self.data_retrieve()
     if self.data is None:
         self.data = {
             'device_labels': [],
         }
     self.device_labels = self.data['device_labels']
コード例 #3
0
    def __init__(self):
        TaskPlugin.__init__(
            self,
            category=PLUGIN_CONST.CATEGORY_TASK_MISC,
            basename=plugin_name(__file__),
            name=_("Template"),
            description=_("Explain here what it does"),
            author="John Smith",
            copyright="Copyright (c) 2016",
            icon='puzzle',
            help_string=HELP,
            version="0.1.0",
        )
        # the icon resource is only needed if the plugin uses a custom icon
        # self.graphics.append('plugin_icon.png')

        # the items below might be not needed and can be deleted if the
        # plugin does not have a configuration panel
        self.resources.append('plugin_template.glade')
        self.builder = self.get_dialog('plugin_template')
        self.plugin_panel = None
        self.forward_allowed = False        # forward not enabled by default

        # define this only if the plugin provides one or more scripts
        # self.scripts.append('needed_script.sh')

        # mandatory or anyway structural variables and object values follow:
        self.command_line = None            # must be set for task plugins
        self.summary_description = None     # must be set for all plugins

        # this variable is defined here only for demonstrational purposes
        self.value = None
コード例 #4
0
 def __init__(self):
     TaskPlugin.__init__(
         self,
         category=PLUGIN_CONST.CATEGORY_TASK_FILEOPS,
         basename=plugin_name(__file__),
         name=_("Media Copy"),
         description=_("Copy from Removable Media"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='briefcase',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_fileops-mediacopy')
     self.plugin_panel = None
     self.forward_allowed = False
     self.media_label = None
     self.destination = None
     self.data = self.data_retrieve()
     if self.data is None:
         self.data = {
             'device_labels': [],
         }
     self.device_labels = self.data['device_labels']
コード例 #5
0
    def __init__(self):
        TaskPlugin.__init__(
            self,
            category=PLUGIN_CONST.CATEGORY_TASK_MISC,
            basename=plugin_name(__file__),
            name=_("Confluent Task"),
            description=_("Concur in triggering a compound condition"),
            author="Francesco Garosi",
            copyright="Copyright (c) 2016",
            icon='parallel_tasks',
            help_string=HELP,
            version="0.1.0",
        )
        self.resources.append('plugin_confluence.glade')
        self.builder = self.get_dialog('plugin_confluence')
        self.plugin_panel = None
        self.forward_allowed = False

        self.scripts.append('confluence.sh')
        self.command_line = None
        self.summary_description = None
        self.persistence_dir = self.file_storage('plugin_confluence')
        self.group_name = None

        # the plugin data store can be used to save associations of tasks
        # and groups, because group information is lost in the default
        # task store process: in this way if this task is not a new one
        # its group can be easily retrieved; we can be sure no overwrite
        # is possible since ids are unique by construction
        self.data = self.data_retrieve()
        if self.data is None:
            self.data = {}
            self.data_store(self.data)
コード例 #6
0
    def __init__(self):
        CommandConditionPlugin.__init__(
            self,
            basename=plugin_name(__file__),
            name=_("Template"),
            description=_("Explain here what it does"),
            author="John Smith",
            copyright="Copyright (c) 2016",
            icon='puzzle',
            help_string=HELP,
            version="0.1.0",
        )
        # to repeat checks after first success uncomment the following line
        # self.repeat = True

        # the icon resource is only needed if the plugin uses a custom icon
        # self.graphics.append('plugin_icon.png')

        # the items below might be not needed and can be deleted if the
        # plugin does not have a configuration panel
        self.resources.append('plugin_template.glade')
        self.builder = self.get_dialog('plugin_template')
        self.plugin_panel = None
        self.forward_allowed = False  # forward not enabled by default

        # define this only if the plugin provides one or more scripts
        # self.scripts.append('needed_script.sh')

        # mandatory or anyway structural variables and object values follow:
        self.command_line = None  # full command line to run
        self.summary_description = None  # must be set for all plugins

        # this variable is defined here only for demonstrational purposes
        self.value = None
コード例 #7
0
    def __init__(self):
        CommandConditionPlugin.__init__(
            self,
            basename=plugin_name(__file__),
            name=_("Fire This"),
            description=_(
                "Expect a file with specific name in the home directory"),
            author="Francesco Garosi",
            copyright="Copyright (c) 2016",
            icon='firethis',
            help_string=HELP,
            version="1.0.0",
        )
        # the append steps inform the plugin installer of the resource files
        self.graphics.append('firethis.png')
        self.resources.append('firethis.glade')

        # here the pane is prepared in the same way as a dialog box, but
        # it is not initialized: the initialization is deferred to the first
        # attempt to retrieve the pane
        self.builder = self.get_dialog('firethis')
        self.plugin_panel = None
        self.forward_allowed = True

        # the default command line is almost the same as before
        self.command_line = "test -f ~/'fire.this'"
        self.summary_description = \
            "On creation of a 'fire.this' file in the home directory"
コード例 #8
0
 def __init__(self):
     EventConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Screensaver"),
         description=_("The Screensaver Starts"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='panorama',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.event = EVENT_SESSION_SCREENSAVER
     self.summary_description = _("When the screensaver starts")
コード例 #9
0
 def __init__(self):
     EventConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Exit Screensaver"),
         description=_("The Screensaver Ends"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='light_at_the_end_of_tunnel',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.event = EVENT_SESSION_SCREENSAVER_EXIT
     self.summary_description = _("When the screensaver stops")
コード例 #10
0
 def __init__(self):
     EventConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Session Start"),
         description=_("Beginning of the User Session"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='sports_mode',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.event = EVENT_APPLET_STARTUP
     self.summary_description = _("When the session is beginning")
コード例 #11
0
 def __init__(self):
     EventConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Session End"),
         description=_("End of the User Session"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='no_idea',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.event = EVENT_APPLET_SHUTDOWN
     self.summary_description = _("When the session is ending")
コード例 #12
0
 def __init__(self):
     EventConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Session Start"),
         description=_("Beginning of the User Session"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='sports_mode',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.event = EVENT_APPLET_STARTUP
     self.summary_description = _("When the session is beginning")
コード例 #13
0
 def __init__(self):
     EventConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Screensaver"),
         description=_("The Screensaver Starts"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='panorama',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.event = EVENT_SESSION_SCREENSAVER
     self.summary_description = _("When the screensaver starts")
コード例 #14
0
 def __init__(self):
     EventConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Exit Screensaver"),
         description=_("The Screensaver Ends"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='light_at_the_end_of_tunnel',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.event = EVENT_SESSION_SCREENSAVER_EXIT
     self.summary_description = _("When the screensaver stops")
コード例 #15
0
 def __init__(self):
     EventConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Session Unlock"),
         description=_("Unlock the User Session"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='unlock',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.event = EVENT_SESSION_UNLOCK
     self.summary_description = _("When the session is unlocked")
コード例 #16
0
 def __init__(self):
     EventConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Session Lock"),
         description=_("Lock the User Session"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='lock',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.event = EVENT_SESSION_LOCK
     self.summary_description = _("When the session is being locked")
コード例 #17
0
 def __init__(self):
     EventConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Suspend"),
         description=_("Enter a Low Consumption Mode"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='night_landscape',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.category = PLUGIN_CONST.CATEGORY_COND_POWER
     self.stock = True
     self.event = EVENT_SYSTEM_SUSPEND
     self.summary_description = _("When the session is suspended")
コード例 #18
0
 def __init__(self):
     EventConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Suspend"),
         description=_("Enter a Low Consumption Mode"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='night_landscape',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.category = PLUGIN_CONST.CATEGORY_COND_POWER
     self.stock = True
     self.event = EVENT_SYSTEM_SUSPEND
     self.summary_description = _("When the session is suspended")
コード例 #19
0
 def __init__(self):
     EventConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Disconnect Storage"),
         description=_("An External Storage Device is Disconnected"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='delete_database',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.category = PLUGIN_CONST.CATEGORY_COND_FILESYSTEM
     self.stock = True
     self.event = EVENT_SYSTEM_DEVICE_DETACH
     self.summary_description = _("When a storage device is detached from the computer")
コード例 #20
0
 def __init__(self):
     EventConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Disconnect Storage"),
         description=_("An External Storage Device is Disconnected"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='delete_database',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.category = PLUGIN_CONST.CATEGORY_COND_FILESYSTEM
     self.stock = True
     self.event = EVENT_SYSTEM_DEVICE_DETACH
     self.summary_description = _("When a storage device is detached from the computer")
コード例 #21
0
 def __init__(self):
     EventConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Discharging"),
         description=_("The Battery is Discharging"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='high_battery',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.category = PLUGIN_CONST.CATEGORY_COND_POWER
     self.stock = True
     self.event = EVENT_SYSTEM_BATTERY_DISCHARGING
     self.summary_description = _("When the battery is discharging")
コード例 #22
0
 def __init__(self):
     TaskPlugin.__init__(
         self,
         category=PLUGIN_CONST.CATEGORY_TASK_POWER,
         basename=plugin_name(__file__),
         name=_("Hibernate"),
         description=_("Hibernate your Workstation"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon="night_landscape",
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.command_line = HIBERNATE_COMMAND
     self.summary_description = _("The system will suspend or hibernate")
コード例 #23
0
 def __init__(self):
     TaskPlugin.__init__(
         self,
         category=PLUGIN_CONST.CATEGORY_TASK_SESSION,
         basename=plugin_name(__file__),
         name=_("Lock"),
         description=_("Session Lock"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='lock',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.command_line = LOCK_COMMAND
     self.summary_description = _("The session will be locked")
コード例 #24
0
 def __init__(self):
     TaskPlugin.__init__(
         self,
         category=PLUGIN_CONST.CATEGORY_TASK_POWER,
         basename=plugin_name(__file__),
         name=_("Hibernate"),
         description=_("Hibernate your Workstation"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='night_landscape',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.command_line = HIBERNATE_COMMAND
     self.summary_description = _("The system will suspend or hibernate")
コード例 #25
0
 def __init__(self):
     EventConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Charging"),
         description=_("The Battery is Charging"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='charge_battery',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.category = PLUGIN_CONST.CATEGORY_COND_POWER
     self.stock = True
     self.event = EVENT_SYSTEM_BATTERY_CHARGE
     self.summary_description = _("When the battery is charging")
コード例 #26
0
 def __init__(self):
     TaskPlugin.__init__(
         self,
         category=PLUGIN_CONST.CATEGORY_TASK_SESSION,
         basename=plugin_name(__file__),
         name=_("Lock"),
         description=_("Session Lock"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='lock',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.command_line = LOCK_COMMAND
     self.summary_description = _("The session will be locked")
コード例 #27
0
 def __init__(self):
     EventConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Resume"),
         description=_("Exit the Low Consumption Mode"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='mms',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.category = PLUGIN_CONST.CATEGORY_COND_POWER
     self.stock = True
     self.event = EVENT_SYSTEM_RESUME
     self.summary_description = _("When the session is resumed")
コード例 #28
0
 def __init__(self):
     TaskPlugin.__init__(
         self,
         category=PLUGIN_CONST.CATEGORY_TASK_POWER,
         basename=plugin_name(__file__),
         name=_("Reboot"),
         description=_("Reboot your Workstation"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='refresh',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.command_line = REBOOT_COMMAND
     self.summary_description = _("The system will reboot")
コード例 #29
0
 def __init__(self):
     EventConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Join Network"),
         description=_("A New Network Connection is Available"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='flash_on',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.category = PLUGIN_CONST.CATEGORY_COND_NETWORK
     self.stock = True
     self.event = EVENT_SYSTEM_NETWORK_JOIN
     self.summary_description = _("When a new network connection is joined")
コード例 #30
0
 def __init__(self):
     TaskPlugin.__init__(
         self,
         category=PLUGIN_CONST.CATEGORY_TASK_POWER,
         basename=plugin_name(__file__),
         name=_("Shutdown"),
         description=_("Shut Down your Workstation"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='no_idea',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.command_line = SHUTDOWN_COMMAND
     self.summary_description = _("The system will be shut down")
コード例 #31
0
 def __init__(self):
     EventConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Low Battery"),
         description=_("The Battery is Critically Low"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon="low_battery",
         help_string=HELP,
         version=APP_VERSION,
     )
     self.category = PLUGIN_CONST.CATEGORY_COND_POWER
     self.stock = True
     self.event = EVENT_SYSTEM_BATTERY_LOW
     self.summary_description = _("When the battery is critically low")
コード例 #32
0
 def __init__(self):
     EventConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Leave Network"),
         description=_("A Network Connection is no more Available"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='flash_off',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.category = PLUGIN_CONST.CATEGORY_COND_NETWORK
     self.stock = True
     self.event = EVENT_SYSTEM_NETWORK_LEAVE
     self.summary_description = _("When a network connection has been left")
コード例 #33
0
 def __init__(self):
     TaskPlugin.__init__(
         self,
         category=PLUGIN_CONST.CATEGORY_TASK_MISC,
         basename=plugin_name(__file__),
         name=_("Sound"),
         description=_("Play a Sound"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='speaker',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_misc-sound')
     self.plugin_panel = None
     self.path = None
コード例 #34
0
 def __init__(self):
     TaskPlugin.__init__(
         self,
         category=PLUGIN_CONST.CATEGORY_TASK_MISC,
         basename=plugin_name(__file__),
         name=_("Sound"),
         description=_("Play a Sound"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='speaker',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_misc-sound')
     self.plugin_panel = None
     self.path = None
コード例 #35
0
 def __init__(self):
     IdleConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Idle Time"),
         description=_("Occur when the Workstation is Idle"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='night_portrait',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_cond-time-idletime')
     self.plugin_panel = None
     self.forward_allowed = False
     self.idlemins = None
コード例 #36
0
 def __init__(self):
     IntervalConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Time Interval"),
         description=_("Occur Periodically after an Amount of Time"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='pie_chart',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_cond-time-interval')
     self.plugin_panel = None
     self.forward_allowed = False
     self.interval = None
コード例 #37
0
 def __init__(self):
     CommandConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Command"),
         description=_("Check Successful Execution of Command"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='start',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_cond-misc-command')
     self.plugin_panel = None
     self.forward_allowed = False
     self.command_line = None
コード例 #38
0
 def __init__(self):
     IntervalConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Time Interval"),
         description=_("Occur Periodically after an Amount of Time"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='pie_chart',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_cond-time-interval')
     self.plugin_panel = None
     self.forward_allowed = False
     self.interval = None
コード例 #39
0
 def __init__(self):
     TaskPlugin.__init__(
         self,
         category=PLUGIN_CONST.CATEGORY_TASK_APPS,
         basename=plugin_name(__file__),
         name=_("Command Launcher"),
         description=_("Run a Command using the Default Shell"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='start',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_apps-command')
     self.plugin_panel = None
     self.forward_allowed = False
コード例 #40
0
 def __init__(self):
     CommandConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Command"),
         description=_("Check Successful Execution of Command"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='start',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_cond-misc-command')
     self.plugin_panel = None
     self.forward_allowed = False
     self.command_line = None
コード例 #41
0
 def __init__(self):
     TaskPlugin.__init__(
         self,
         category=PLUGIN_CONST.CATEGORY_TASK_APPS,
         basename=plugin_name(__file__),
         name=_("Command Launcher"),
         description=_("Run a Command using the Default Shell"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='start',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_apps-command')
     self.plugin_panel = None
     self.forward_allowed = False
コード例 #42
0
 def __init__(self):
     IdleConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Idle Time"),
         description=_("Occur when the Workstation is Idle"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='night_portrait',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_cond-time-idletime')
     self.plugin_panel = None
     self.forward_allowed = False
     self.idlemins = None
コード例 #43
0
 def __init__(self):
     TaskPlugin.__init__(
         self,
         category=PLUGIN_CONST.CATEGORY_TASK_SETTINGS,
         basename=plugin_name(__file__),
         name=_("Change Background"),
         description=_("Modify the Desktop Background"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='gallery',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_desktop-changebg')
     self.plugin_panel = None
     self.forward_allowed = False
     self.background_image = None
コード例 #44
0
 def __init__(self):
     TaskPlugin.__init__(
         self,
         category=PLUGIN_CONST.CATEGORY_TASK_FILEOPS,
         basename=plugin_name(__file__),
         name=_("Open File"),
         description=_("Open a File"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='file',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_fileops-openfile')
     self.plugin_panel = None
     self.forward_allowed = False
     self.path = None
コード例 #45
0
 def __init__(self):
     TaskPlugin.__init__(
         self,
         category=PLUGIN_CONST.CATEGORY_TASK_FILEOPS,
         basename=plugin_name(__file__),
         name=_("Open Directory"),
         description=_("Show a Directory in File Manager"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='folder',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_fileops-opendir')
     self.plugin_panel = None
     self.forward_allowed = False
     self.path = None
コード例 #46
0
 def __init__(self):
     TaskPlugin.__init__(
         self,
         category=PLUGIN_CONST.CATEGORY_TASK_SETTINGS,
         basename=plugin_name(__file__),
         name=_("Change Background"),
         description=_("Modify the Desktop Background"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='gallery',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_desktop-changebg')
     self.plugin_panel = None
     self.forward_allowed = False
     self.background_image = None
コード例 #47
0
 def __init__(self):
     TaskPlugin.__init__(
         self,
         category=PLUGIN_CONST.CATEGORY_TASK_APPS,
         basename=plugin_name(__file__),
         name=_("Application Launcher"),
         description=_("Start a Desktop Application"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='electro_devices',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.script_path = self.get_script('run-desktop.py')
     self.builder = self.get_dialog('plugin_apps-launch')
     self.plugin_panel = None
     self.app_name = None
コード例 #48
0
 def __init__(self):
     CommandConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Downloads Finished"),
         description=_("Check that all Active Downloads have Finished"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='business',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.category = PLUGIN_CONST.CATEGORY_COND_FILESYSTEM
     self.script = self.get_script('plugin_cond-fs-downloads-finished.sh')
     self.download_dir = "~/Downloads"
     self.command_line = '%s "%s"' % (self.script, self.download_dir)
     self.summary_description = _("When all downloads in '%s' are complete") % self.download_dir
コード例 #49
0
 def __init__(self):
     TaskPlugin.__init__(
         self,
         category=PLUGIN_CONST.CATEGORY_TASK_APPS,
         basename=plugin_name(__file__),
         name=_("Application Launcher"),
         description=_("Start a Desktop Application"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='electro_devices',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.script_path = self.get_script('run-desktop.py')
     self.builder = self.get_dialog('plugin_apps-launch')
     self.plugin_panel = None
     self.app_name = None
コード例 #50
0
 def __init__(self):
     FileChangeConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Directory Monitor"),
         description=_("Monitor a Directory for Changes"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='folder',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_cond-fs-dirchange')
     self.plugin_panel = None
     self.forward_allowed = False        # forward not enabled by default
     self.watched_path = None            # file or directory to observe
     self.summary_description = None     # must be set for all plugins
コード例 #51
0
 def __init__(self):
     FileChangeConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("File Monitor"),
         description=_("Monitor a Single File for Changes"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='file',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_cond-fs-filechange')
     self.plugin_panel = None
     self.forward_allowed = False  # forward not enabled by default
     self.watched_path = None  # file or directory to observe
     self.summary_description = None  # must be set for all plugins
コード例 #52
0
 def __init__(self):
     CommandConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("System Load"),
         description=_("Check system load against a target"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='electronics',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.repeat = True
     self.builder = self.get_dialog('plugin_cond-misc-sysload')
     self.plugin_panel = None
     self.forward_allowed = False
     self.command_line = None
     self.summary_description = None
コード例 #53
0
 def __init__(self):
     TimeConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Time Of Day"),
         description=_("Full Specification of the Time of Day"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='alarm_clock',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_cond-time-timeofday')
     self.plugin_panel = None
     self.timespec['hour'] = 0
     self.timespec['minute'] = 0
     self.summary_description = _("At midnight")
     self.forward_allowed = True
コード例 #54
0
 def __init__(self):
     CommandConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("System Temperature"),
         description=_("Check system temperature against a target"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='electrical_sensor',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.repeat = True
     self.builder = self.get_dialog('plugin_cond-misc-systemp')
     self.plugin_panel = None
     self.forward_allowed = False
     self.command_line = None
     self.summary_description = None
コード例 #55
0
 def __init__(self):
     TimeConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Time Of Day"),
         description=_("Full Specification of the Time of Day"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='alarm_clock',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_cond-time-timeofday')
     self.plugin_panel = None
     self.timespec['hour'] = 0
     self.timespec['minute'] = 0
     self.summary_description = _("At midnight")
     self.forward_allowed = True
コード例 #56
0
 def __init__(self):
     CommandConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Downloads Finished"),
         description=_("Check that all Active Downloads have Finished"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='business',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.category = PLUGIN_CONST.CATEGORY_COND_FILESYSTEM
     self.script = self.get_script('plugin_cond-fs-downloads-finished.sh')
     self.download_dir = "~/Downloads"
     self.command_line = '%s "%s"' % (self.script, self.download_dir)
     self.summary_description = _(
         "When all downloads in '%s' are complete") % self.download_dir
コード例 #57
0
 def __init__(self):
     CommandConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Resource URL"),
         description=_("The Resource at the given URL is available"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='globe',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.category = PLUGIN_CONST.CATEGORY_COND_NETWORK
     self.resources.append('plugin_cond-net-urlavailable.glade')
     self.builder = self.get_dialog('plugin_cond-net-urlavailable')
     self.plugin_panel = None
     self.forward_allowed = False  # forward not enabled by default
     self.command_line = None  # full command line to run
     self.summary_description = None  # must be set for all plugins
コード例 #58
0
 def __init__(self):
     TaskPlugin.__init__(
         self,
         category=PLUGIN_CONST.CATEGORY_TASK_FILEOPS,
         basename=plugin_name(__file__),
         name=_("Synchronize"),
         description=_("Synchronize Two Directories"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='advance',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.script = self.get_script('plugin_fileops-sync.sh')
     self.builder = self.get_dialog('plugin_fileops-sync')
     self.plugin_panel = None
     self.forward_allowed = False
     self.source = None
     self.destination = None
コード例 #59
0
 def __init__(self):
     TaskPlugin.__init__(
         self,
         category=PLUGIN_CONST.CATEGORY_TASK_FILEOPS,
         basename=plugin_name(__file__),
         name=_("Synchronize"),
         description=_("Synchronize Two Directories"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='advance',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.script = self.get_script('plugin_fileops-sync.sh')
     self.builder = self.get_dialog('plugin_fileops-sync')
     self.plugin_panel = None
     self.forward_allowed = False
     self.source = None
     self.destination = None
コード例 #60
0
 def __init__(self):
     CommandConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Resource URL"),
         description=_("The Resource at the given URL is available"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='globe',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.category = PLUGIN_CONST.CATEGORY_COND_NETWORK
     self.resources.append('plugin_cond-net-urlavailable.glade')
     self.builder = self.get_dialog('plugin_cond-net-urlavailable')
     self.plugin_panel = None
     self.forward_allowed = False        # forward not enabled by default
     self.command_line = None            # full command line to run
     self.summary_description = None     # must be set for all plugins