make beep for indentation work and configurable
This commit is contained in:
parent
29dbceee5a
commit
c555bef0eb
@ -179,7 +179,13 @@ commandPath=
|
|||||||
#fenrirFont = the font
|
#fenrirFont = the font
|
||||||
#fenrirFontSize = the fontsize
|
#fenrirFontSize = the fontsize
|
||||||
attributeFormatString=Background fenrirBGColor,Foreground fenrirFGColor,fenrirUnderline,fenrirBold,fenrirBlink, Font fenrirFont,Fontsize fenrirFontSize
|
attributeFormatString=Background fenrirBGColor,Foreground fenrirFGColor,fenrirUnderline,fenrirBold,fenrirBlink, Font fenrirFont,Fontsize fenrirFontSize
|
||||||
|
# present indentation
|
||||||
autoPresentIndent=False
|
autoPresentIndent=False
|
||||||
|
# speak is only invoked on changeing ident level, sound always
|
||||||
|
# 0 = sound and speak
|
||||||
|
# 1 = sound only
|
||||||
|
# 2 = speak only
|
||||||
|
autoPresentIndentMode=1
|
||||||
# play a sound when attributes are changeing
|
# play a sound when attributes are changeing
|
||||||
hasAttributes=True
|
hasAttributes=True
|
||||||
# shell for PTY emulatiun (empty = default shell)
|
# shell for PTY emulatiun (empty = default shell)
|
||||||
|
@ -184,7 +184,13 @@ commandPath=
|
|||||||
#fenrirFont = the font
|
#fenrirFont = the font
|
||||||
#fenrirFontSize = the fontsize
|
#fenrirFontSize = the fontsize
|
||||||
attributeFormatString=Background fenrirBGColor,Foreground fenrirFGColor,fenrirUnderline,fenrirBold,fenrirBlink, Font fenrirFont,Fontsize fenrirFontSize
|
attributeFormatString=Background fenrirBGColor,Foreground fenrirFGColor,fenrirUnderline,fenrirBold,fenrirBlink, Font fenrirFont,Fontsize fenrirFontSize
|
||||||
|
# present indentation
|
||||||
autoPresentIndent=False
|
autoPresentIndent=False
|
||||||
|
# speak is only invoked on changeing ident level, sound always
|
||||||
|
# 0 = sound and speak
|
||||||
|
# 1 = sound only
|
||||||
|
# 2 = speak only
|
||||||
|
autoPresentIndentMode=1
|
||||||
# play a sound when attributes are changeing
|
# play a sound when attributes are changeing
|
||||||
hasAttributes=True
|
hasAttributes=True
|
||||||
# shell for PTY emulatiun (empty = default shell)
|
# shell for PTY emulatiun (empty = default shell)
|
||||||
|
@ -184,7 +184,13 @@ commandPath=
|
|||||||
#fenrirFont = the font
|
#fenrirFont = the font
|
||||||
#fenrirFontSize = the fontsize
|
#fenrirFontSize = the fontsize
|
||||||
attributeFormatString=Background fenrirBGColor,Foreground fenrirFGColor,fenrirUnderline,fenrirBold,fenrirBlink, Font fenrirFont,Fontsize fenrirFontSize
|
attributeFormatString=Background fenrirBGColor,Foreground fenrirFGColor,fenrirUnderline,fenrirBold,fenrirBlink, Font fenrirFont,Fontsize fenrirFontSize
|
||||||
|
# present indentation
|
||||||
autoPresentIndent=False
|
autoPresentIndent=False
|
||||||
|
# speak is only invoked on changeing ident level, sound always
|
||||||
|
# 0 = sound and speak
|
||||||
|
# 1 = sound only
|
||||||
|
# 2 = speak only
|
||||||
|
autoPresentIndentMode=1
|
||||||
# play a sound when attributes are changeing
|
# play a sound when attributes are changeing
|
||||||
hasAttributes=True
|
hasAttributes=True
|
||||||
# shell for PTY emulatiun (empty = default shell)
|
# shell for PTY emulatiun (empty = default shell)
|
||||||
|
@ -185,7 +185,13 @@ commandPath=
|
|||||||
#fenrirFont = the font
|
#fenrirFont = the font
|
||||||
#fenrirFontSize = the fontsize
|
#fenrirFontSize = the fontsize
|
||||||
attributeFormatString=Background fenrirBGColor,Foreground fenrirFGColor,fenrirUnderline,fenrirBold,fenrirBlink, Font fenrirFont,Fontsize fenrirFontSize
|
attributeFormatString=Background fenrirBGColor,Foreground fenrirFGColor,fenrirUnderline,fenrirBold,fenrirBlink, Font fenrirFont,Fontsize fenrirFontSize
|
||||||
|
# present indentation
|
||||||
autoPresentIndent=False
|
autoPresentIndent=False
|
||||||
|
# speak is only invoked on changeing ident level, sound always
|
||||||
|
# 0 = sound and speak
|
||||||
|
# 1 = sound only
|
||||||
|
# 2 = speak only
|
||||||
|
autoPresentIndentMode=1
|
||||||
# play a sound when attributes are changeing
|
# play a sound when attributes are changeing
|
||||||
hasAttributes=True
|
hasAttributes=True
|
||||||
# shell for PTY emulatiun (empty = default shell)
|
# shell for PTY emulatiun (empty = default shell)
|
||||||
|
@ -185,7 +185,13 @@ commandPath=
|
|||||||
#fenrirFont = the font
|
#fenrirFont = the font
|
||||||
#fenrirFontSize = the fontsize
|
#fenrirFontSize = the fontsize
|
||||||
attributeFormatString=Background fenrirBGColor,Foreground fenrirFGColor,fenrirUnderline,fenrirBold,fenrirBlink, Font fenrirFont,Fontsize fenrirFontSize
|
attributeFormatString=Background fenrirBGColor,Foreground fenrirFGColor,fenrirUnderline,fenrirBold,fenrirBlink, Font fenrirFont,Fontsize fenrirFontSize
|
||||||
|
# present indentation
|
||||||
autoPresentIndent=False
|
autoPresentIndent=False
|
||||||
|
# speak is only invoked on changeing ident level, sound always
|
||||||
|
# 0 = sound and speak
|
||||||
|
# 1 = sound only
|
||||||
|
# 2 = speak only
|
||||||
|
autoPresentIndentMode=1
|
||||||
# play a sound when attributes are changeing
|
# play a sound when attributes are changeing
|
||||||
hasAttributes=True
|
hasAttributes=True
|
||||||
# shell for PTY emulatiun (empty = default shell)
|
# shell for PTY emulatiun (empty = default shell)
|
||||||
|
@ -130,7 +130,13 @@ commandPath=
|
|||||||
#fenrirFont = the font
|
#fenrirFont = the font
|
||||||
#fenrirFontSize = the fontsize
|
#fenrirFontSize = the fontsize
|
||||||
attributeFormatString=Background fenrirBGColor,Foreground fenrirFGColor,fenrirUnderline,fenrirBold,fenrirBlink, Font fenrirFont,Fontsize fenrirFontSize
|
attributeFormatString=Background fenrirBGColor,Foreground fenrirFGColor,fenrirUnderline,fenrirBold,fenrirBlink, Font fenrirFont,Fontsize fenrirFontSize
|
||||||
|
# present indentation
|
||||||
autoPresentIndent=False
|
autoPresentIndent=False
|
||||||
|
# speak is only invoked on changeing ident level, sound always
|
||||||
|
# 0 = sound and speak
|
||||||
|
# 1 = sound only
|
||||||
|
# 2 = speak only
|
||||||
|
autoPresentIndentMode=1
|
||||||
# play a sound when attributes are changeing
|
# play a sound when attributes are changeing
|
||||||
hasAttributes=False
|
hasAttributes=False
|
||||||
# shell for PTY emulatiun (empty = default shell)
|
# shell for PTY emulatiun (empty = default shell)
|
||||||
|
@ -184,7 +184,13 @@ commandPath=
|
|||||||
#fenrirFont = the font
|
#fenrirFont = the font
|
||||||
#fenrirFontSize = the fontsize
|
#fenrirFontSize = the fontsize
|
||||||
attributeFormatString=Background fenrirBGColor,Foreground fenrirFGColor,fenrirUnderline,fenrirBold,fenrirBlink, Font fenrirFont,Fontsize fenrirFontSize
|
attributeFormatString=Background fenrirBGColor,Foreground fenrirFGColor,fenrirUnderline,fenrirBold,fenrirBlink, Font fenrirFont,Fontsize fenrirFontSize
|
||||||
|
# present indentation
|
||||||
autoPresentIndent=False
|
autoPresentIndent=False
|
||||||
|
# speak is only invoked on changeing ident level, sound always
|
||||||
|
# 0 = sound and speak
|
||||||
|
# 1 = sound only
|
||||||
|
# 2 = speak only
|
||||||
|
autoPresentIndentMode=1
|
||||||
# play a sound when attributes are changeing
|
# play a sound when attributes are changeing
|
||||||
hasAttributes=True
|
hasAttributes=True
|
||||||
# shell for PTY emulatiun (empty = default shell)
|
# shell for PTY emulatiun (empty = default shell)
|
||||||
|
@ -42,9 +42,12 @@ class command():
|
|||||||
self.lastIdent = currIdent
|
self.lastIdent = currIdent
|
||||||
doInterrupt = True
|
doInterrupt = True
|
||||||
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'):
|
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'):
|
||||||
if self.lastIdent != currIdent:
|
if self.env['runtime']['settingsManager'].getSettingAsInt('general', 'autoPresentIndentMode') in [0,1]:
|
||||||
self.env['runtime']['outputManager'].presentText(_('indented ') + str(currIdent) + ' ', interrupt=doInterrupt, flush=False)
|
self.env['runtime']['outputManager'].playFrequence(currIdent * 50, 0.1, interrupt=doInterrupt)
|
||||||
doInterrupt = False
|
if self.env['runtime']['settingsManager'].getSettingAsInt('general', 'autoPresentIndentMode') in [0,2]:
|
||||||
|
if self.lastIdent != currIdent:
|
||||||
|
self.env['runtime']['outputManager'].presentText(_('indented ') + str(currIdent) + ' ', interrupt=doInterrupt, flush=False)
|
||||||
|
doInterrupt = False
|
||||||
# barrier
|
# barrier
|
||||||
sayLine = currLine
|
sayLine = currLine
|
||||||
if self.env['runtime']['settingsManager'].getSettingAsBool('barrier','enabled'):
|
if self.env['runtime']['settingsManager'].getSettingAsBool('barrier','enabled'):
|
||||||
|
@ -23,11 +23,7 @@ class fenrirManager():
|
|||||||
raise RuntimeError('Cannot Initialize. Maybe the configfile is not available or not parseable')
|
raise RuntimeError('Cannot Initialize. Maybe the configfile is not available or not parseable')
|
||||||
except RuntimeError:
|
except RuntimeError:
|
||||||
raise
|
raise
|
||||||
for m in range(1, 280):
|
self.environment['runtime']['outputManager'].presentText(_("Start Fenrir"), soundIcon='ScreenReaderOn', interrupt=True)
|
||||||
if m % 4 ==0:
|
|
||||||
self.environment['runtime']['outputManager'].playFrequence(m * 40, 0.2, interrupt=True)
|
|
||||||
time.sleep(0.3)
|
|
||||||
#self.environment['runtime']['outputManager'].presentText(_("Start Fenrir"), soundIcon='ScreenReaderOn', interrupt=True)
|
|
||||||
signal.signal(signal.SIGINT, self.captureSignal)
|
signal.signal(signal.SIGINT, self.captureSignal)
|
||||||
signal.signal(signal.SIGTERM, self.captureSignal)
|
signal.signal(signal.SIGTERM, self.captureSignal)
|
||||||
self.initialized = True
|
self.initialized = True
|
||||||
|
@ -73,6 +73,7 @@ settingsData = {
|
|||||||
'commandPath': '/usr/share/fenrirscreenreader/commands',
|
'commandPath': '/usr/share/fenrirscreenreader/commands',
|
||||||
'attributeFormatString': 'Background fenrirBGColor,Foreground fenrirFGColor,fenrirUnderline,fenrirBold,fenrirBlink, Font fenrirFont,Fontsize fenrirFontSize',
|
'attributeFormatString': 'Background fenrirBGColor,Foreground fenrirFGColor,fenrirUnderline,fenrirBold,fenrirBlink, Font fenrirFont,Fontsize fenrirFontSize',
|
||||||
'autoPresentIndent': False,
|
'autoPresentIndent': False,
|
||||||
|
'autoPresentIndentMode': 1,
|
||||||
'hasAttributes': True,
|
'hasAttributes': True,
|
||||||
'shell': '',
|
'shell': '',
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user