def __init__(self, app):
self.VERSION = self.__class__.CLASS_VERSION<EOL>self.lock = threading.Lock()<EOL>self.app = app<EOL>self.folders = []<EOL>self.userCodeDir = None  <EOL>self.configHotkey = GlobalHotkey()<EOL>self.configHotkey.set_hotkey(["<STR_LIT>"], "<STR_LIT:k>")<EOL>self.configHotkey.enabled = True<EOL>self.toggleServiceHotkey = GlobalHotkey()<EOL>self.toggleServiceHotkey.set_hotkey(["<STR_LIT>", "<STR_LIT>"], "<STR_LIT:k>")<EOL>self.toggleServiceHotkey.enabled = True<EOL>self.workAroundApps = re.compile(self.SETTINGS[WORKAROUND_APP_REGEX])<EOL>app.init_global_hotkeys(self)<EOL>self.load_global_config()<EOL>self.app.monitor.add_watch(CONFIG_DEFAULT_FOLDER)<EOL>self.app.monitor.add_watch(common.CONFIG_DIR)<EOL>if self.folders:<EOL><INDENT>return<EOL><DEDENT>_logger.info("<STR_LIT>")       <EOL>myPhrases = model.Folder("<STR_LIT>")<EOL>myPhrases.set_hotkey(["<STR_LIT>"], "<STR_LIT>")<EOL>myPhrases.set_modes([model.TriggerMode.HOTKEY])<EOL>myPhrases.persist()<EOL>f = model.Folder("<STR_LIT>")<EOL>adr = model.Phrase("<STR_LIT>", "<STR_LIT>")<EOL>adr.set_modes([model.TriggerMode.ABBREVIATION])<EOL>adr.add_abbreviation("<STR_LIT>")<EOL>f.add_item(adr)<EOL>myPhrases.add_folder(f)        <EOL>f.persist()<EOL>adr.persist()<EOL>p = model.Phrase("<STR_LIT>", "<STR_LIT>")<EOL>p.set_modes([model.TriggerMode.PREDICTIVE])<EOL>p.set_window_titles("<STR_LIT>")<EOL>myPhrases.add_item(p)<EOL>myPhrases.add_item(model.Phrase("<STR_LIT>", "<STR_LIT>"))<EOL>myPhrases.add_item(model.Phrase("<STR_LIT>", "<STR_LIT>"))<EOL>self.folders.append(myPhrases)<EOL>[p.persist() for p in myPhrases.items]<EOL>sampleScripts = model.Folder("<STR_LIT>")<EOL>sampleScripts.persist()<EOL>dte = model.Script("<STR_LIT>", "<STR_LIT>")<EOL>dte.code = """<STR_LIT>"""<EOL>sampleScripts.add_item(dte)<EOL>lMenu = model.Script("<STR_LIT>", "<STR_LIT>")<EOL>lMenu.code = """<STR_LIT>"""<EOL>sampleScripts.add_item(lMenu)<EOL>sel = model.Script("<STR_LIT>", "<STR_LIT>")<EOL>sel.code = """<STR_LIT>"""<EOL>sampleScripts.add_item(sel)<EOL>abbrc = model.Script("<STR_LIT>", "<STR_LIT>")<EOL>abbrc.code = """<STR_LIT>"""<EOL>sampleScripts.add_item(abbrc)<EOL>phrasec = model.Script("<STR_LIT>", "<STR_LIT>")<EOL>phrasec.code = """<STR_LIT>"""<EOL>sampleScripts.add_item(phrasec)<EOL>win = model.Script("<STR_LIT>", "<STR_LIT>")<EOL>win.code = """<STR_LIT>"""<EOL>win.show_in_tray_menu = True<EOL>sampleScripts.add_item(win)<EOL>self.folders.append(sampleScripts)<EOL>[s.persist() for s in sampleScripts.items]<EOL>self.recentEntries = []<EOL>self.config_altered(True)<EOL>
Create initial default configuration