From 099aa2da0dfd03af8fd6ba49a5fd7c7e31bb24a0 Mon Sep 17 00:00:00 2001 From: chrys Date: Sat, 1 Jul 2017 22:54:31 +0200 Subject: [PATCH] set custom command path to emtpy; load customs after defaults --- config/settings/espeak.settings.conf | 2 +- config/settings/settings.conf | 4 ++-- config/settings/settings.conf.storm | 2 +- src/fenrir/core/commandManager.py | 7 ++++--- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/config/settings/espeak.settings.conf b/config/settings/espeak.settings.conf index eb2b95cd..56f2d781 100644 --- a/config/settings/espeak.settings.conf +++ b/config/settings/espeak.settings.conf @@ -163,7 +163,7 @@ dateFormat=%A, %B %d, %Y autoSpellCheck=True spellCheckLanguage=en_US scriptPath=/usr/share/fenrir/scripts -commandPath=/usr/share/fenrir/commands +commandPath= [focus] cursor=True diff --git a/config/settings/settings.conf b/config/settings/settings.conf index d055a363..9033d4fc 100644 --- a/config/settings/settings.conf +++ b/config/settings/settings.conf @@ -147,7 +147,7 @@ interruptOnKeyPressFilter= doubleTapTimeout=0.2 [general] -debugLevel=1 +debugLevel=0 punctuationProfile=default punctuationLevel=some respectPunctuationPause=True @@ -168,7 +168,7 @@ spellCheckLanguage=en_US # path for your scripts "scriptKey" functionality scriptPath=/usr/share/fenrir/scripts # overload commands, and create new one without changing Fenrir default -commandPath=/usr/share/fenrir/commands +commandPath= [focus] #follow the text cursor diff --git a/config/settings/settings.conf.storm b/config/settings/settings.conf.storm index b4e00d7c..b2f93cb2 100644 --- a/config/settings/settings.conf.storm +++ b/config/settings/settings.conf.storm @@ -116,7 +116,7 @@ autoSpellCheck=True spellCheckLanguage=en_US scriptPath=/usr/share/fenrir/scripts # overload commands, and create new one without changing Fenrir default -commandPath=/usr/share/fenrir/commands +commandPath= [focus] #follow the text cursor diff --git a/src/fenrir/core/commandManager.py b/src/fenrir/core/commandManager.py index d5dde35c..24e361da 100644 --- a/src/fenrir/core/commandManager.py +++ b/src/fenrir/core/commandManager.py @@ -18,9 +18,10 @@ class commandManager(): self.env['commands'] = {} self.env['commandsIgnore'] = {} for commandFolder in self.env['general']['commandFolderList']: - self.env['runtime']['commandManager'].loadCommands(commandFolder, - self.env['runtime']['settingsManager'].getSetting('general', 'commandPath')) - self.env['runtime']['commandManager'].loadCommands(commandFolder) + self.env['runtime']['commandManager'].loadCommands(commandFolder) + if self.env['runtime']['settingsManager'].getSetting('general', 'commandPath') != '': + self.env['runtime']['commandManager'].loadCommands(commandFolder, + self.env['runtime']['settingsManager'].getSetting('general', 'commandPath')) # scripts for scriptKey self.env['runtime']['commandManager'].loadScriptCommands()