Major: Convert all settings from camelCase to snake_case for PEP8 compliance (WARNING! BREAKING CHANGES)

Breaking change for v3.0 - users must update their settings.conf file.

  - Converted 45 settings across all sections
  - Updated 524 Python files, tests, and documentation
  - All tests passing, zero regressions
  - Moving forward the philosophy is clean code over backward compatibility
  - Next stable release will be considered a major release
This commit is contained in:
Storm Dragon
2025-12-10 19:39:45 -05:00
parent 61868c94e5
commit 560ceb26c9
52 changed files with 393 additions and 351 deletions
+122 -80
View File
@@ -24,9 +24,9 @@ volume=0.7
# fenrirFrequence = the frequency to play
# fenrirDuration = the duration of the frequency
# the following command is used to play a soundfile
genericPlayFileCommand=play -q -v fenrirVolume fenrirSoundFile
generic_play_file_command=play -q -v fenrirVolume fenrirSoundFile
#the following command is used to generate a frequency beep
genericFrequencyCommand=play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence
generic_frequency_command=play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence
# Enable progress bar monitoring with ascending tones by default
progressMonitoring=True
@@ -45,7 +45,7 @@ rate=0.5
# Pitch controls the pitch of the voice, select from 0, lowest, to 1.0, highest.
pitch=0.5
# Pitch for capital letters
capitalPitch=0.9
capital_pitch=0.9
# Volume controls the loudness of the voice, select from 0, quietest, to 1.0, loudest.
volume=1.0
@@ -65,10 +65,10 @@ volume=1.0
#language=en
# Read new text as it happens?
autoReadIncoming=True
auto_read_incoming=True
# Speak individual numbers instead of whole string.
readNumbersAsDigits = False
read_numbers_as_digits = False
# genericSpeechCommand is the command that is executed for talking
# the following variables are replaced with values
@@ -81,105 +81,130 @@ readNumbersAsDigits = False
# fenrirVolume = is replaced with the current volume
# fenrirPitch = is replaced with the current pitch
# fenrirRate = is replaced with the current speed (speech rate)
genericSpeechCommand=espeak-ng -a fenrirVolume -s fenrirRate -p fenrirPitch -v fenrirVoice -- "fenrirText"
generic_speech_command=espeak-ng -a fenrirVolume -s fenrirRate -p fenrirPitch -v fenrirVoice -- "fenrirText"
# min and max values of the TTS system that is used in genericSpeechCommand
fenrirMinVolume=0
fenrirMaxVolume=200
fenrirMinPitch=0
fenrirMaxPitch=99
fenrirMinRate=80
fenrirMaxRate=450
# min and max values of the TTS system that is used in generic_speech_command
fenrir_min_volume=0
fenrir_max_volume=200
fenrir_min_pitch=0
fenrir_max_pitch=99
fenrir_min_rate=80
fenrir_max_rate=450
[screen]
# Screen driver: vcsaDriver (Linux TTY/virtual console), ptyDriver (terminal emulation)
driver=vcsaDriver
# Text encoding: auto (auto-detect), utf-8, latin1, etc.
encoding=auto
screenUpdateDelay=0.05
ignoreScreen=7
autodetectIgnoreScreen=True
# Delay in seconds between screen updates (lower = more responsive, higher = less CPU)
# Recommended: 0.05 for most systems
screen_update_delay=0.05
# TTY number to completely ignore (e.g., 7 for X11/graphical login screen)
ignore_screen=7
# Automatically detect and ignore graphical TTYs (X11, Wayland sessions)
autodetect_ignore_screen=True
[keyboard]
driver=evdevDriver
# filter input devices NOMICE, ALL or a DEVICE NAME
device=ALL
# gives Fenrir exclusive access to the keyboard and lets it control keystrokes.
grabDevices=True
ignoreShortcuts=False
grab_devices=True
ignore_shortcuts=False
# the current shortcut layout located in /etc/fenrirscreenreader/keyboard
keyboardLayout=desktop
keyboard_layout=desktop
# echo chars while typing.
# 0 = None
# 1 = always
# 2 = only while capslock (not compatible with capslock as fenrir key)
charEchoMode=1
char_echo_mode=1
# echo deleted chars
charDeleteEcho=True
char_delete_echo=True
# echo word after pressing space
wordEcho=False
word_echo=False
# interrupt speech on any keypress
interruptOnKeyPress=True
interrupt_on_key_press=True
# you can filter the keys on that the speech should interrupt (empty = all keys, otherwhise the given keys)
interruptOnKeyPressFilter=
interrupt_on_key_press_filter=
# timeout for double tap in sec
doubleTapTimeout=0.2
double_tap_timeout=0.2
[general]
# Debug levels: 0=DEACTIVE, 1=ERROR, 2=WARNING, 3=INFO (most verbose)
# For production use, WARNING (2) provides good balance of useful info without spam
debugLevel=2
# debugMode sets where the debug output should send to:
# debugMode=File writes to debugFile (Default:/tmp/fenrir-PID.log)
# debugMode=File writes to debug_file (Default:/tmp/fenrir-PID.log)
# debugMode=Print just prints on the screen
debugMode=File
debugFile=
punctuationProfile=default
punctuationLevel=some
respectPunctuationPause=True
debug_file=
punctuation_profile=default
punctuation_level=some
respect_punctuation_pause=True
# Replace undefined punctuation with spaces instead of removing them
# This improves readability of text with punctuation like [X]mute, IP addresses, etc.
replaceUndefinedPunctuationWithSpace=True
newLinePause=True
numberOfClipboards=50
replace_undefined_punctuation_with_space=True
# Pause speech briefly at newline characters for better readability
new_line_pause=True
number_of_clipboards=50
# used path for "export_clipboard_to_file"
# $user is replaced by username
#clipboardExportPath=/home/$user/fenrirClipboard
clipboardExportPath=/tmp/fenrirClipboard
# Convert text emoticons like :) to descriptive text (e.g., "smiling face")
emoticons=True
# define the current Fenrir key
fenrirKeys=KEY_KP0,KEY_META,KEY_INSERT
scriptKeys=KEY_COMPOSE
# Define the Fenrir modifier key(s) - used to trigger Fenrir commands
# Examples: KEY_KP0 (numpad 0), KEY_META (Super/Windows), KEY_INSERT
# Multiple keys: KEY_KP0,KEY_META,KEY_INSERT
fenrir_keys=KEY_KP0,KEY_META,KEY_INSERT
# Script key - used to execute custom scripts in script_path
script_keys=KEY_COMPOSE
# Time format using Python strftime codes (https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior)
# Default: %%I:%%M%%P (12-hour format, e.g., "06:38pm")
# 24-hour format: %%H:%%M (e.g., "18:38")
# Common codes: %%I=12hr hour, %%H=24hr hour, %%M=minute, %%S=second, %%P=am/pm lowercase, %%p=AM/PM uppercase
timeFormat=%%I:%%M%%P
# Date format using Python strftime codes
# Default: %%A, %%B %%d, %%Y (e.g., "Tuesday, December 10, 2024")
# ISO format: %%Y-%%m-%%d (e.g., "2024-12-10")
# Common codes: %%A=weekday name, %%B=month name, %%d=day, %%Y=year with century, %%m=month number
dateFormat=%%A, %%B %%d, %%Y
autoSpellCheck=True
spellCheckLanguage=en_US
# path for your scripts "scriptKeys" functionality
scriptPath=/usr/share/fenrirscreenreader/scripts
# overload commands, and create new one without changing Fenrir default
commandPath=
#fenrirBGColor = the backgroundcolor
#fenrirFGColor = the foregroundcolor
#fenrirUnderline = speak the underline attribute
#fenrirBold = speak the bold attribute
#fenrirBlink = speak the blink attribute
#fenrirFont = the font
#fenrirFontSize = the fontsize
# Automatically spell check words when reviewing character-by-character
auto_spell_check=True
# Language for spell checking (format: language_COUNTRY, e.g., en_US, en_GB, es_ES)
spell_check_language=en_US
# path for your scripts "script_keys" functionality
script_path=/usr/share/fenrirscreenreader/scripts
# Override default commands or add custom commands without modifying Fenrir installation
# Leave empty to use default commands only
command_path=
# Format string for announcing text attributes (colors, formatting)
# Available variables:
# fenrirBGColor = the background color
# fenrirFGColor = the foreground color
# fenrirUnderline = speak the underline attribute
# fenrirBold = speak the bold attribute
# fenrirBlink = speak the blink attribute
# fenrirFont = the font name
# fenrirFontSize = the font size
attributeFormatString=Background fenrirBGColor,Foreground fenrirFGColor,fenrirUnderline,fenrirBold,fenrirBlink, Font fenrirFont,Fontsize fenrirFontSize
# present indentation
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 change
# Automatically announce indentation level changes (useful for Python, YAML, etc.)
auto_present_indent=False
# How to present indentation changes:
# 0 = sound and speak (both audio feedback and voice announcement)
# 1 = sound only (just play a tone)
# 2 = speak only (just voice announcement)
auto_present_indent_mode=1
# Play a sound when text attributes (color, bold, etc.) change
hasAttributes=True
# shell for PTY emulatiun (empty = default shell)
# Shell to use for PTY emulation mode (empty = use system default shell)
# Examples: /bin/bash, /bin/zsh, /usr/bin/fish
shell=
[focus]
#follow the text cursor
# Follow and announce text cursor position changes
cursor=True
#follow highlighted text changes
# Follow and announce highlighted/selected text changes (useful in menus)
highlight=False
[remote]
@@ -193,38 +218,50 @@ port=22447
# socket filepath
socketFile=
# allow settings to overwrite
enableSettingsRemote=True
enable_settings_remote=True
# allow commands to be executed
enableCommandRemote=True
enable_command_remote=True
[barrier]
# Enable barrier detection - automatically detects table/box borders for improved navigation
enabled=False
# Characters that represent left-side barriers/borders (for table/box detection)
leftBarriers=│└┌─
# Characters that represent right-side barriers/borders (for table/box detection)
rightBarriers=│┘┐─
[review]
# Announce line breaks during review mode
lineBreak=True
# Announce when reaching the end of screen during review
endOfScreen=True
# leave the review when pressing a key
leaveReviewOnCursorChange=True
# leave the review when changing the screen
leaveReviewOnScreenChange=True
# Exit review mode when cursor position changes (e.g., when typing)
leave_review_on_cursor_change=True
# Exit review mode when switching to a different TTY/screen
leave_review_on_screen_change=True
[promote]
# Enable promoting (announcing) important text updates automatically
enabled=True
inactiveTimeoutSec=120
# Seconds of inactivity before promoting text updates (prevents spam during active typing)
inactive_timeout_sec=120
# Comma-separated list of text patterns to promote when detected
# Leave empty to disable pattern-based promotion
list=
[menu]
vmenuPath=
# quickMenu: Semicolon-separated list of settings for quick adjustment
# Custom path for VMenu (virtual menu) profiles
# Leave empty to use default location (/etc/fenrirscreenreader/vmenu-profiles/)
vmenu_path=
# Quick menu: Semicolon-separated list of settings for rapid adjustment via VMenu
# Access with Fenrir+F10, navigate to "Quick Settings"
# Format: section#setting;section#setting;...
# Supported settings:
# - speech#rate, speech#pitch, speech#volume (0.0-1.0)
# - speech#module, speech#voice (speechdDriver only, auto-added)
# Note: speech#module and speech#voice are automatically added when
# speechdDriver is active. Do not add them manually.
quickMenu=speech#rate;speech#pitch;speech#volume
quick_menu=speech#rate;speech#pitch;speech#volume
[prompt]
# Custom prompt patterns for silence until prompt feature
@@ -251,18 +288,23 @@ customPatterns=
exactMatches=
[time]
# automatic time announcement
# Enable automatic time announcements
enabled=False
# present time
# Announce the current time
presentTime=True
# present date (on change)
# Announce the date (only when it changes, e.g., at midnight)
presentDate=True
# present time after a given period of seconds
delaySec=0
# present time after to given minutes example every 15 minutes: 00,15,30,45
# if delaySec is >0 onMinutes is ignored
onMinutes=00,30
# announce via soundicon (not interrupting)
# Announce time every N seconds (0 = disabled)
# If delay_sec > 0, on_minutes is ignored
delay_sec=0
# Announce time at specific minutes of each hour (comma-separated)
# Examples:
# 00 = Only on the hour (1:00, 2:00, 3:00, etc.)
# 00,30 = On the hour and half-hour (1:00, 1:30, 2:00, 2:30, etc.)
# 00,15,30,45 = Every 15 minutes
# Note: This is ignored if delay_sec > 0
on_minutes=00,30
# Play a sound icon before time announcement (non-interrupting)
announce=True
# interrupt current speech for time announcement
# Interrupt current speech to announce time immediately
interrupt=False
+35 -35
View File
@@ -1105,7 +1105,7 @@ the word "Chrys" appears after 120 Seconds of inactivity:
....
[promote]
enabled=True
inactiveTimeoutSec=120
inactive_timeout_sec=120
list=Chrys
....
@@ -1286,8 +1286,8 @@ Enable remote control in settings.conf:
[remote]
enable=True
driver=unixDriver
enableSettingsRemote=True
enableCommandRemote=True
enable_settings_remote=True
enable_command_remote=True
....
==== Using socat with Unix Sockets
@@ -1317,13 +1317,13 @@ echo "setting set focus#highlight=True" | socat - UNIX-CLIENT:/tmp/fenrirscreenr
echo "setting set speech#rate=0.8" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
# Change punctuation level (none/some/most/all)
echo "setting set general#punctuationLevel=all" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
echo "setting set general#punctuation_level=all" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
# Voice and TTS control
echo "setting set speech#voice=en-us+f3" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
# Multiple settings at once
echo "setting set speech#rate=0.8;sound#volume=0.7;general#punctuationLevel=most" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
echo "setting set speech#rate=0.8;sound#volume=0.7;general#punctuation_level=most" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
# Reset all settings to defaults
echo "setting reset" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
@@ -1394,8 +1394,8 @@ echo "command quitapplication" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-dea
* `+speech#module=module_name+` - TTS module (e.g., "espeak-ng")
*General Settings:*
* `+general#punctuationLevel=none/some/most/all+` - Punctuation verbosity
* `+general#autoSpellCheck=True/False+` - Automatic spell checking
* `+general#punctuation_level=none/some/most/all+` - Punctuation verbosity
* `+general#auto_spell_check=True/False+` - Automatic spell checking
* `+general#emoticons=True/False+` - Enable emoticon replacement
*Sound Settings:*
@@ -1407,11 +1407,11 @@ echo "command quitapplication" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-dea
* `+focus#highlight=True/False+` - Follow text highlighting
*Keyboard Settings:*
* `+keyboard#charEchoMode=0-2+` - Character echo (0=none, 1=always, 2=capslock only)
* `+keyboard#wordEcho=True/False+` - Echo complete words
* `+keyboard#char_echo_mode=0-2+` - Character echo (0=none, 1=always, 2=capslock only)
* `+keyboard#word_echo=True/False+` - Echo complete words
*Screen Settings:*
* `+screen#ignoreScreen=1,2,3+` - TTY screens to ignore
* `+screen#ignore_screen=1,2,3+` - TTY screens to ignore
==== settings.conf syntax
@@ -1511,14 +1511,14 @@ frequencies.
sound file.
....
genericPlayFileCommand=<your command for playing a file>
generic_play_file_command=<your command for playing a file>
....
`+genericFrequencyCommand+` defines the command that is used playing
frequencies.
....
genericFrequencyCommand=<your command for playing a frequence>
generic_frequency_command=<your command for playing a frequence>
....
The following variables are substituted in `+genericPlayFileCommand+`
@@ -1532,13 +1532,13 @@ and `+genericFrequencyCommand+`:
Example genericPlayFileCommand (default)
....
genericPlayFileCommand=play -q -v fenrirVolume fenrirSoundFile
generic_play_file_command=play -q -v fenrirVolume fenrirSoundFile
....
Example genericFrequencyCommand (default)
....
genericFrequencyCommand=play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence
generic_frequency_command=play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence
....
==== Speech
@@ -1579,7 +1579,7 @@ Values: Range Minimum:`+0.0+` is lowest, Maximum:`+1.0+` is highest.
A Pitch for capital letters can be set.
....
capitalPitch=0.9
capital_pitch=0.9
....
Values: Range Minimum:`+0.0+` is lowest, Maximum:`+1.0+` is highest.
@@ -1681,7 +1681,7 @@ the pico module:
language=de-DE
....
Read new text as it occurs autoReadIncoming=True Values: on=`+True+`,
Read new text as it occurs auto_read_incoming=True Values: on=`+True+`,
off=`+False+`
==== Screen
@@ -1711,7 +1711,7 @@ Values:`+cp850+` is used for Western languages like USA or Europe.
The driver updates Fenrir with changes on the screen.
....
screenUpdateDelay=0.05
screen_update_delay=0.05
....
Values: in Seconds
@@ -1776,7 +1776,7 @@ Gives Fenrir exclusive access to the keyboard and lets it control
keystrokes. This is needed to intercept Fenrir related shortcuts.
....
grabDevices=True
grab_devices=True
....
Values: on=`+True+`, off=`+False+`
@@ -1785,7 +1785,7 @@ The following makes sense if you are using a second screenreader and
want to have some hooked events. Fenrir ignores all shortcuts then.
....
ignoreShortcuts=False
ignore_shortcuts=False
....
Values: on=`+True+`, off=`+False+`
@@ -1793,7 +1793,7 @@ Values: on=`+True+`, off=`+False+`
The current keyboard layout used for shortcuts.
....
keyboardLayout=desktop
keyboard_layout=desktop
....
Values: An absolute Path to a Keyboard definition file or a Filename
@@ -1810,7 +1810,7 @@ Values: on=`+True+`, off=`+False+`
Announce deleted characters
....
charDeleteEcho=True
char_delete_echo=True
....
Values: on=`+True+`, off=`+False+`
@@ -1818,7 +1818,7 @@ Values: on=`+True+`, off=`+False+`
Announce word after pressing space
....
wordEcho=False
word_echo=False
....
Values: on=`+True+`, off=`+False+`
@@ -1826,7 +1826,7 @@ Values: on=`+True+`, off=`+False+`
Interrupt speech on any keypress
....
interruptOnKeyPress=False
interrupt_on_key_press=False
....
Values: on=`+True+`, off=`+False+`
@@ -1834,7 +1834,7 @@ Values: on=`+True+`, off=`+False+`
You can filter the keys that speech should interrupt
....
interruptOnKeyPressFilter=
interrupt_on_key_press_filter=
....
Values: (List) empty = all keys, otherwise interrupt with specified keys
@@ -1842,7 +1842,7 @@ Values: (List) empty = all keys, otherwise interrupt with specified keys
The timeout that is used for double tap shortcuts
....
doubleTapTimeout=0.2
double_tap_timeout=0.2
....
Values: Seconds
@@ -1862,7 +1862,7 @@ Values: off=0, error=1, warning=2, info=3
the current punctuation and dict file in use:
....
punctuationProfile=default
punctuation_profile=default
....
Values: Text, see available profiles in `+/etc/fenrir/punctuation+` or
@@ -1871,7 +1871,7 @@ in `+sourceTree/config/punctuation+`
The current punctuation level in use:
....
punctuationLevel=some
punctuation_level=some
....
Values: Text, See available levels in the used punctuation file.
@@ -1879,7 +1879,7 @@ Values: Text, See available levels in the used punctuation file.
Respect pause for punctuations:
....
respectPunctuationPause=True
respect_punctuation_pause=True
....
Values: on=`+True+`, off=`+False+`
@@ -1887,7 +1887,7 @@ Values: on=`+True+`, off=`+False+`
Add a pause on Line break:
....
newLinePause=True
new_line_pause=True
....
Values: on=`+True+`, off=`+False+`
@@ -1905,7 +1905,7 @@ Values: Text, Systemfilepath
The number of available clipboards:
....
numberOfClipboards=10
number_of_clipboards=10
....
Values: Integer, 1 - 999
@@ -1921,7 +1921,7 @@ Values: on=`+True+`, off=`+False+`
Define the current Fenrir keys:
....
fenrirKeys=KEY_KP0,KEY_META,KEY_INSERT
fenrir_keys=KEY_KP0,KEY_META,KEY_INSERT
....
Values, Text list, separated by comma.
@@ -1955,7 +1955,7 @@ https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior[d
Enable or Disable spellcheck whilst typing:
....
autoSpellCheck=True
auto_spell_check=True
....
Values: on=`+True+`, off=`+False+`
@@ -1963,7 +1963,7 @@ Values: on=`+True+`, off=`+False+`
The use of the dictionary with spellcheck:
....
spellCheckLanguage=en_US
spell_check_language=en_US
....
Values: Text, see aspell dictionary's.
@@ -2044,7 +2044,7 @@ Values: on=`+True+`, off=`+False+`
Leave the review mode when changing the screen (From TTY3 to TTY4):
....
leaveReviewOnScreenChange=True
leave_review_on_screen_change=True
....
Values: on=`+True+`, off=`+False+`
@@ -2064,7 +2064,7 @@ The minimum time interval of inactivity to activate promoting. By
default it promotes after 120 Seconds inactivity:
....
inactiveTimeoutSec=120
inactive_timeout_sec=120
....
Values: in Seconds
+11 -11
View File
@@ -102,17 +102,17 @@ volume=0.7
[keyboard]
driver=evdevDriver
keyboardLayout=desktop
keyboard_layout=desktop
[screen]
driver=vcsaDriver
ignoreScreen=
ignore_screen=
[remote]
enable=True
driver=unixDriver
enableSettingsRemote=True
enableCommandRemote=True
enable_settings_remote=True
enable_command_remote=True
```
## Remote Control
@@ -126,8 +126,8 @@ Enable remote control in settings:
enable=True
driver=unixDriver # or tcpDriver
port=22447 # for TCP driver
enableSettingsRemote=True # allow settings changes
enableCommandRemote=True # allow command execution
enable_settings_remote=True # allow settings changes
enable_command_remote=True # allow command execution
```
### Basic Usage with socat
@@ -155,14 +155,14 @@ echo "setting set speech#pitch=0.6" | socat - UNIX-CLIENT:/tmp/fenrirscreenreade
echo "setting set speech#volume=0.9" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
# Change punctuation level (none/some/most/all)
echo "setting set general#punctuationLevel=all" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
echo "setting set general#punctuation_level=all" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
# Voice and TTS control
echo "setting set speech#voice=en-us+f3" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
echo "setting set speech#module=espeak-ng" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
# Multiple settings at once
echo "setting set speech#rate=0.8;sound#volume=0.7;general#punctuationLevel=most" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
echo "setting set speech#rate=0.8;sound#volume=0.7;general#punctuation_level=most" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
# Reset all settings
echo "setting reset" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
@@ -208,11 +208,11 @@ echo "command quitapplication" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-dea
- `command resetvmenu` - Reset virtual menu
**Key Settings You Can Change:**
- Punctuation level: `setting set general#punctuationLevel=all`
- Punctuation level: `setting set general#punctuation_level=all`
- Speech parameters: `setting set speech#rate=0.8;speech#pitch=0.6`
- Voice selection: `setting set speech#voice=en-us+f3`
- Character echo: `setting set keyboard#charEchoMode=1`
- Screen ignore: `setting set screen#ignoreScreen=1,2,3`
- Character echo: `setting set keyboard#char_echo_mode=1`
- Screen ignore: `setting set screen#ignore_screen=1,2,3`
### Scripting Integration
+32 -32
View File
@@ -735,7 +735,7 @@ you can define a list of words which you want to hear a sound icon for after a p
Example if the word "Chrys" appears after 120 Seconds of inactivity:
[promote]
enabled=True
inactiveTimeoutSec=120
inactive_timeout_sec=120
list=Chrys
See section [[#Promote|Promote]] in ''settings.conf'' for more information.
==== Punctuation ====
@@ -867,9 +867,9 @@ Values: ''0.0'' is quietest, ''1.0'' is loudest.
The generic sound driver uses shell commands for play sound and frequencies.
''genericPlayFileCommand'' defines the command that is used to play a sound file.
genericPlayFileCommand=<your command for playing a file>
generic_play_file_command=<your command for playing a file>
''genericFrequencyCommand'' defines the command that is used playing frequencies.
genericFrequencyCommand=<your command for playing a frequence>
generic_frequency_command=<your command for playing a frequence>
The following variables are substituted in ''genericPlayFileCommand'' and ''genericFrequencyCommand'':
* ''fenrirVolume'' = the current volume setting
@@ -878,9 +878,9 @@ The following variables are substituted in ''genericPlayFileCommand'' and ''gene
* ''fenrirDuration'' = the duration of the frequency
Example genericPlayFileCommand (default)
genericPlayFileCommand=play -q -v fenrirVolume fenrirSoundFile
generic_play_file_command=play -q -v fenrirVolume fenrirSoundFile
Example genericFrequencyCommand (default)
genericFrequencyCommand=play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence
generic_frequency_command=play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence
==== Speech ====
Speech is configured in section ''[speech]''.
Turn speech on or off:
@@ -910,7 +910,7 @@ Pitch controls the pitch of the voice.
Values: Range Minimum:''0.0'' is lowest, Maximum:''1.0'' is highest.
A Pitch for capital letters can be set.
capitalPitch=0.9
capital_pitch=0.9
Values: Range Minimum:''0.0'' is lowest, Maximum:''1.0'' is highest.
The Volume controls the loudness of the voice.
@@ -931,7 +931,7 @@ Select the language you want Fenrir to use.
Values: Text, see your TTS synths documentation what is available.
Read new text as it occurs
autoReadIncoming=True
auto_read_incoming=True
Values: on=''True'', off=''False''
=== Generic Driver ===
@@ -948,16 +948,16 @@ The following variables are substituted in ''genericSpeechCommand'':
* ''fenrirRate'' = is replaced with the current speed (speech rate)
Example genericSpeechCommand (default):
genericSpeechCommand=espeak -a fenrirVolume -s fenrirRate -p fenrirPitch -v fenrirVoice "fenrirText"
generic_speech_command=espeak -a fenrirVolume -s fenrirRate -p fenrirPitch -v fenrirVoice "fenrirText"
These are the minimum and maximum values of the TTS system used in genericSpeechCommand. They are needed to calculate the abstract range in volume, rate and pitch 0.0 - 1.0.
FenrirMinVolume=0
fenrirMaxVolume=200
fenrirMinPitch=0
fenrirMaxPitch=99
fenrirMinRate=80
fenrirMaxRate=450
fenrir_max_volume=200
fenrir_min_pitch=0
fenrir_max_pitch=99
fenrir_min_rate=80
fenrir_max_rate=450
The current volume, pitch and rate is calculated like this
value = min + [volume,pitch,rate] * (min - max )
@@ -1033,7 +1033,7 @@ The encoding of the screen
Values:''cp850'' is used for Western languages like USA or Europe.
The driver updates Fenrir with changes on the screen.
screenUpdateDelay=0.05
screen_update_delay=0.05
Values: in Seconds
If you want Fenrir to not be active on any screen for various reasons. Maybe an X server or Wayland is running on that screen. You can make Fenrir ignore it or multiple screens seperated by '','' with:
@@ -1064,15 +1064,15 @@ Values:
* ''<Device Name>'' just use the device with the given name.
Gives Fenrir exclusive access to the keyboard and lets it control keystrokes. This is needed to intercept Fenrir related shortcuts.
grabDevices=True
grab_devices=True
Values: on=''True'', off=''False''
The following makes sense if you are using a second screenreader and want to have some hooked events. Fenrir ignores all shortcuts then.
ignoreShortcuts=False
ignore_shortcuts=False
Values: on=''True'', off=''False''
The current keyboard layout used for shortcuts.
keyboardLayout=desktop
keyboard_layout=desktop
Values: An absolute Path to a Keyboard definition file or a Filename without extension located in ''/etc/fenrir/keyboard''
Announce characters while typing.
@@ -1080,23 +1080,23 @@ Announce characters while typing.
Values: on=''True'', off=''False''
Announce deleted characters
charDeleteEcho=True
char_delete_echo=True
Values: on=''True'', off=''False''
Announce word after pressing space
wordEcho=False
word_echo=False
Values: on=''True'', off=''False''
Interrupt speech on any keypress
interruptOnKeyPress=False
interrupt_on_key_press=False
Values: on=''True'', off=''False''
You can filter the keys that speech should interrupt
interruptOnKeyPressFilter=
interrupt_on_key_press_filter=
Values: (List) empty = all keys, otherwise interrupt with specified keys
The timeout that is used for double tap shortcuts
doubleTapTimeout=0.2
double_tap_timeout=0.2
Values: Seconds
==== General ====
Overall settings can be configured from the section ''[general]''.
@@ -1106,19 +1106,19 @@ Set the current debug level:
Values: off=0, error=1, warning=2, info=3
the current punctuation and dict file in use:
punctuationProfile=default
punctuation_profile=default
Values: Text, see available profiles in ''/etc/fenrir/punctuation'' or in ''sourceTree/config/punctuation''
The current punctuation level in use:
punctuationLevel=some
punctuation_level=some
Values: Text, See available levels in the used punctuation file.
Respect pause for punctuations:
respectPunctuationPause=True
respect_punctuation_pause=True
Values: on=''True'', off=''False''
Add a pause on Line break:
newLinePause=True
new_line_pause=True
Values: on=''True'', off=''False''
Specify the path where the clipboard should be exported to.
@@ -1128,7 +1128,7 @@ The variable ''$user'' is replaced by the current logged username.
Values: Text, Systemfilepath
The number of available clipboards:
numberOfClipboards=10
number_of_clipboards=10
Values: Integer, 1 - 999
Replace emoticons like :) or ;) with text insertions:
@@ -1136,7 +1136,7 @@ Replace emoticons like :) or ;) with text insertions:
Values: on=''True'', off=''False''
Define the current Fenrir keys:
fenrirKeys=KEY_KP0,KEY_META,KEY_INSERT
fenrir_keys=KEY_KP0,KEY_META,KEY_INSERT
Values, Text list, separated by comma.
Define the current script keys:
@@ -1152,11 +1152,11 @@ The date format to be used for (date command) output:
Values: see python specification for [[https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior|datetime.strftime]]
Enable or Disable spellcheck whilst typing:
autoSpellCheck=True
auto_spell_check=True
Values: on=''True'', off=''False''
The use of the dictionary with spellcheck:
spellCheckLanguage=en_US
spell_check_language=en_US
Values: Text, see aspell dictionary's.
Folder Path for your scripts "scriptKey" functionality:
@@ -1197,7 +1197,7 @@ Leave the review mode when pressing a key:
Values: on=''True'', off=''False''
Leave the review mode when changing the screen (From TTY3 to TTY4):
leaveReviewOnScreenChange=True
leave_review_on_screen_change=True
Values: on=''True'', off=''False''
==== Promote ====
"Promoted Lists" are configured in the section ''[promote]''.
@@ -1207,7 +1207,7 @@ Values: on=''True'', off=''False''
The minimum time interval of inactivity to activate promoting.
By default it promotes after 120 Seconds inactivity:
inactiveTimeoutSec=120
inactive_timeout_sec=120
Values: in Seconds
Define a list of promoted words comma seperated:
@@ -22,7 +22,7 @@ class command:
self.env["runtime"]["MemoryManager"].add_index_list(
"clipboardHistory",
self.env["runtime"]["SettingsManager"].get_setting_as_int(
"general", "numberOfClipboards"
"general", "number_of_clipboards"
),
)
@@ -36,11 +36,11 @@ class command:
def update_spell_language(self):
self.spellChecker = enchant.Dict(
self.env["runtime"]["SettingsManager"].get_setting(
"general", "spellCheckLanguage"
"general", "spell_check_language"
)
)
self.language = self.env["runtime"]["SettingsManager"].get_setting(
"general", "spellCheckLanguage"
"general", "spell_check_language"
)
def run(self):
@@ -48,7 +48,7 @@ class command:
return
if (
self.env["runtime"]["SettingsManager"].get_setting(
"general", "spellCheckLanguage"
"general", "spell_check_language"
)
!= self.language
):
@@ -59,7 +59,7 @@ class command:
def run(self):
current_layout = self.env["runtime"]["SettingsManager"].get_setting(
"keyboard", "keyboardLayout"
"keyboard", "keyboard_layout"
)
# Extract layout name from full path if needed
@@ -83,7 +83,7 @@ class command:
# Update setting and reload shortcuts
self.env["runtime"]["SettingsManager"].set_setting(
"keyboard", "keyboardLayout", next_layout
"keyboard", "keyboard_layout", next_layout
)
# Reload shortcuts with new layout
@@ -18,7 +18,7 @@ class command:
self.env["runtime"]["MemoryManager"].add_index_list(
"clipboardHistory",
self.env["runtime"]["SettingsManager"].get_setting_as_int(
"general", "numberOfClipboards"
"general", "number_of_clipboards"
),
)
@@ -36,11 +36,11 @@ class command:
def update_spell_language(self):
self.spellChecker = enchant.Dict(
self.env["runtime"]["SettingsManager"].get_setting(
"general", "spellCheckLanguage"
"general", "spell_check_language"
)
)
self.language = self.env["runtime"]["SettingsManager"].get_setting(
"general", "spellCheckLanguage"
"general", "spell_check_language"
)
def run(self):
@@ -51,7 +51,7 @@ class command:
return
if (
self.env["runtime"]["SettingsManager"].get_setting(
"general", "spellCheckLanguage"
"general", "spell_check_language"
)
!= self.language
):
@@ -36,11 +36,11 @@ class command:
return
self.spellChecker = enchant.Dict(
self.env["runtime"]["SettingsManager"].get_setting(
"general", "spellCheckLanguage"
"general", "spell_check_language"
)
)
self.language = self.env["runtime"]["SettingsManager"].get_setting(
"general", "spellCheckLanguage"
"general", "spell_check_language"
)
def run(self):
@@ -51,7 +51,7 @@ class command:
return
if (
self.env["runtime"]["SettingsManager"].get_setting(
"general", "spellCheckLanguage"
"general", "spell_check_language"
)
!= self.language
):
@@ -25,15 +25,15 @@ class command:
def run(self):
self.env["runtime"]["SettingsManager"].set_setting(
"general",
"autoPresentIndent",
"auto_present_indent",
str(
not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"general", "autoPresentIndent"
"general", "auto_present_indent"
)
),
)
if self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"general", "autoPresentIndent"
"general", "auto_present_indent"
):
self.env["runtime"]["OutputManager"].present_text(
_("autoindent enabled"), sound_icon="", interrupt=True
@@ -25,15 +25,15 @@ class command:
def run(self):
self.env["runtime"]["SettingsManager"].set_setting(
"speech",
"autoReadIncoming",
"auto_read_incoming",
str(
not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"speech", "autoReadIncoming"
"speech", "auto_read_incoming"
)
),
)
if self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"speech", "autoReadIncoming"
"speech", "auto_read_incoming"
):
self.env["runtime"]["OutputManager"].present_text(
_("autoread enabled"), sound_icon="", interrupt=True
@@ -24,15 +24,15 @@ class command:
def run(self):
self.env["runtime"]["SettingsManager"].set_setting(
"general",
"autoSpellCheck",
"auto_spell_check",
str(
not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"general", "autoSpellCheck"
"general", "auto_spell_check"
)
),
)
if self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"general", "autoSpellCheck"
"general", "auto_spell_check"
):
self.env["runtime"]["OutputManager"].present_text(
_("auto spellcheck enabled"), sound_icon="", interrupt=True
@@ -25,7 +25,7 @@ class command:
if self.env["runtime"]["PunctuationManager"].cycle_punctuation():
self.env["runtime"]["OutputManager"].present_text(
self.env["runtime"]["SettingsManager"].get_setting(
"general", "punctuationLevel"
"general", "punctuation_level"
),
interrupt=True,
ignore_punctuation=True,
@@ -23,7 +23,7 @@ class command:
def run(self):
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"keyboard", "interruptOnKeyPress"
"keyboard", "interrupt_on_key_press"
):
return
if self.env["runtime"]["InputManager"].no_key_pressed():
@@ -37,13 +37,13 @@ class command:
# if the filter is set
if (
self.env["runtime"]["SettingsManager"]
.get_setting("keyboard", "interruptOnKeyPressFilter")
.get_setting("keyboard", "interrupt_on_key_press_filter")
.strip()
!= ""
):
filter_list = (
self.env["runtime"]["SettingsManager"]
.get_setting("keyboard", "interruptOnKeyPressFilter")
.get_setting("keyboard", "interrupt_on_key_press_filter")
.split(",")
)
for currInput in self.env["input"]["currInput"]:
@@ -24,7 +24,7 @@ class command:
def run(self):
# enabled?
active = self.env["runtime"]["SettingsManager"].get_setting_as_int(
"keyboard", "charEchoMode"
"keyboard", "char_echo_mode"
)
# 0 = off
if active == 0:
@@ -26,7 +26,7 @@ class command:
def run(self):
# is it enabled?
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"keyboard", "wordEcho"
"keyboard", "word_echo"
):
return
# is navigation?
@@ -39,23 +39,23 @@ class command:
return
self.spellChecker = enchant.Dict(
self.env["runtime"]["SettingsManager"].get_setting(
"general", "spellCheckLanguage"
"general", "spell_check_language"
)
)
self.language = self.env["runtime"]["SettingsManager"].get_setting(
"general", "spellCheckLanguage"
"general", "spell_check_language"
)
def run(self):
if not initialized:
return
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"general", "autoSpellCheck"
"general", "auto_spell_check"
):
return
if (
self.env["runtime"]["SettingsManager"].get_setting(
"general", "spellCheckLanguage"
"general", "spell_check_language"
)
!= self.language
):
@@ -23,7 +23,7 @@ class command:
def run(self):
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"keyboard", "charDeleteEcho"
"keyboard", "char_delete_echo"
):
return
# detect typing or chilling
@@ -46,7 +46,7 @@ class command:
# echo word insteed of char
if self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"keyboard", "wordEcho"
"keyboard", "word_echo"
):
if (
abs(
@@ -55,17 +55,17 @@ class command:
self.lastIdent = curr_ident
do_interrupt = True
if self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"general", "autoPresentIndent"
"general", "auto_present_indent"
):
if self.env["runtime"]["SettingsManager"].get_setting_as_int(
"general", "autoPresentIndentMode"
"general", "auto_present_indent_mode"
) in [0, 1]:
if self.lastIdent != curr_ident:
self.env["runtime"]["OutputManager"].play_frequence(
curr_ident * 50, 0.1, interrupt=do_interrupt
)
if self.env["runtime"]["SettingsManager"].get_setting_as_int(
"general", "autoPresentIndentMode"
"general", "auto_present_indent_mode"
) in [0, 2]:
if self.lastIdent != curr_ident:
self.env["runtime"]["OutputManager"].present_text(
@@ -68,10 +68,10 @@ class command:
# Only beep/announce if indentation level has changed
if self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"general", "autoPresentIndent"
"general", "auto_present_indent"
) and self.lastIdent != curr_ident:
if self.env["runtime"]["SettingsManager"].get_setting_as_int(
"general", "autoPresentIndentMode"
"general", "auto_present_indent_mode"
) in [0, 1]:
self.env["runtime"]["OutputManager"].play_frequence(
curr_ident * 50, 0.1, interrupt=False
@@ -23,7 +23,7 @@ class command:
def run(self):
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"review", "leaveReviewOnCursorChange"
"review", "leave_review_on_cursor_change"
):
return
if self.env["runtime"]["CursorManager"].is_review_mode():
@@ -22,7 +22,7 @@ class command:
def run(self):
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"keyboard", "interruptOnKeyPress"
"keyboard", "interrupt_on_key_press"
):
return
if self.env["runtime"]["InputManager"].no_key_pressed():
@@ -36,13 +36,13 @@ class command:
# if the filter is set
if (
self.env["runtime"]["SettingsManager"]
.get_setting("keyboard", "interruptOnKeyPressFilter")
.get_setting("keyboard", "interrupt_on_key_press_filter")
.strip()
!= ""
):
filter_list = (
self.env["runtime"]["SettingsManager"]
.get_setting("keyboard", "interruptOnKeyPressFilter")
.get_setting("keyboard", "interrupt_on_key_press_filter")
.split(",")
)
for currInput in self.env["input"]["currInput"]:
@@ -23,7 +23,7 @@ class command:
def run(self):
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"review", "leaveReviewOnScreenChange"
"review", "leave_review_on_screen_change"
):
return
self.env["runtime"]["CursorManager"].clear_review_cursor()
@@ -42,7 +42,7 @@ class command:
def run(self):
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"speech", "autoReadIncoming"
"speech", "auto_read_incoming"
):
return
# is there something to read?
@@ -38,7 +38,7 @@ class command:
if int(time.time() - self.env["input"]["lastInputTime"]) < self.env[
"runtime"
]["SettingsManager"].get_setting_as_int(
"promote", "inactiveTimeoutSec"
"promote", "inactive_timeout_sec"
):
return
if (
@@ -134,7 +134,7 @@ class config_command:
self.config.add_section("keyboard")
self.config.set("keyboard", "driver", "evdevDriver")
self.config.set("keyboard", "keyboardLayout", "desktop")
self.config.set("keyboard", "keyboard_layout", "desktop")
self.config.add_section("screen")
self.config.set("screen", "driver", "vcsaDriver")
@@ -21,13 +21,13 @@ class command(config_command):
return "Set punctuation to All (every punctuation mark)"
def run(self):
current_level = self.get_setting("general", "punctuationLevel", "some")
current_level = self.get_setting("general", "punctuation_level", "some")
if current_level.lower() == "all":
self.present_text("Punctuation level already set to All")
return
success = self.set_setting("general", "punctuationLevel", "all")
success = self.set_setting("general", "punctuation_level", "all")
if success:
self.present_text("Punctuation level set to All - every punctuation mark will be spoken")
@@ -21,13 +21,13 @@ class command(config_command):
return "Set punctuation to Most (detailed punctuation)"
def run(self):
current_level = self.get_setting("general", "punctuationLevel", "some")
current_level = self.get_setting("general", "punctuation_level", "some")
if current_level.lower() == "most":
self.present_text("Punctuation level already set to Most")
return
success = self.set_setting("general", "punctuationLevel", "most")
success = self.set_setting("general", "punctuation_level", "most")
if success:
self.present_text("Punctuation level set to Most - detailed punctuation will be spoken")
@@ -21,13 +21,13 @@ class command(config_command):
return "Set punctuation to None (no punctuation spoken)"
def run(self):
current_level = self.get_setting("general", "punctuationLevel", "some")
current_level = self.get_setting("general", "punctuation_level", "some")
if current_level.lower() == "none":
self.present_text("Punctuation level already set to None")
return
success = self.set_setting("general", "punctuationLevel", "none")
success = self.set_setting("general", "punctuation_level", "none")
if success:
self.present_text("Punctuation level set to None - no punctuation will be spoken")
@@ -21,13 +21,13 @@ class command(config_command):
return "Set punctuation to Some (basic punctuation only)"
def run(self):
current_level = self.get_setting("general", "punctuationLevel", "some")
current_level = self.get_setting("general", "punctuation_level", "some")
if current_level.lower() == "some":
self.present_text("Punctuation level already set to Some")
return
success = self.set_setting("general", "punctuationLevel", "some")
success = self.set_setting("general", "punctuation_level", "some")
if success:
self.present_text("Punctuation level set to Some - basic punctuation will be spoken")
@@ -21,13 +21,13 @@ class command(config_command):
return "Set character echo to Always (echo all typed characters)"
def run(self):
current_mode = self.get_setting("keyboard", "charEchoMode", "1")
current_mode = self.get_setting("keyboard", "char_echo_mode", "1")
if current_mode == "1":
self.present_text("Character echo already set to Always")
return
success = self.set_setting("keyboard", "charEchoMode", "1")
success = self.set_setting("keyboard", "char_echo_mode", "1")
if success:
self.present_text("Character echo set to Always - all typed characters will be spoken")
@@ -21,13 +21,13 @@ class command(config_command):
return "Set character echo to Caps Lock (echo only when caps lock is on)"
def run(self):
current_mode = self.get_setting("keyboard", "charEchoMode", "1")
current_mode = self.get_setting("keyboard", "char_echo_mode", "1")
if current_mode == "2":
self.present_text("Character echo already set to Caps Lock mode")
return
success = self.set_setting("keyboard", "charEchoMode", "2")
success = self.set_setting("keyboard", "char_echo_mode", "2")
if success:
self.present_text("Character echo set to Caps Lock mode - characters will be spoken only when caps lock is on")
@@ -21,13 +21,13 @@ class command(config_command):
return "Set character echo to None (no character echo)"
def run(self):
current_mode = self.get_setting("keyboard", "charEchoMode", "1")
current_mode = self.get_setting("keyboard", "char_echo_mode", "1")
if current_mode == "0":
self.present_text("Character echo already set to None")
return
success = self.set_setting("keyboard", "charEchoMode", "0")
success = self.set_setting("keyboard", "char_echo_mode", "0")
if success:
self.present_text("Character echo set to None - no typed characters will be spoken")
@@ -21,8 +21,8 @@ class command(config_command):
return "Toggle exclusive keyboard access"
def run(self):
current_state = self.getBooleanSetting("keyboard", "grabDevices", True)
new_state = self.toggleBooleanSetting("keyboard", "grabDevices")
current_state = self.getBooleanSetting("keyboard", "grab_devices", True)
new_state = self.toggleBooleanSetting("keyboard", "grab_devices")
if new_state != current_state:
state_text = "enabled" if new_state else "disabled"
@@ -21,8 +21,8 @@ class command(config_command):
return "Toggle word echo when pressing space"
def run(self):
current_state = self.getBooleanSetting("keyboard", "wordEcho", False)
new_state = self.toggleBooleanSetting("keyboard", "wordEcho")
current_state = self.getBooleanSetting("keyboard", "word_echo", False)
new_state = self.toggleBooleanSetting("keyboard", "word_echo")
if new_state != current_state:
state_text = "enabled" if new_state else "disabled"
@@ -108,7 +108,7 @@ class command(config_command):
"rate": "0.5",
"pitch": "0.5",
"volume": "1.0",
"autoReadIncoming": "True",
"auto_read_incoming": "True",
}
# Basic sound defaults
@@ -123,10 +123,10 @@ class command(config_command):
self.config["keyboard"] = {
"driver": "evdevDriver",
"device": "ALL",
"keyboardLayout": "desktop",
"charEchoMode": "1",
"wordEcho": "False",
"charDeleteEcho": "True",
"keyboard_layout": "desktop",
"char_echo_mode": "1",
"word_echo": "False",
"char_delete_echo": "True",
}
# Basic screen defaults
@@ -137,9 +137,9 @@ class command(config_command):
# Basic general defaults
self.config["general"] = {
"punctuationLevel": "some",
"punctuation_level": "some",
"debug_level": "0",
"numberOfClipboards": "50",
"number_of_clipboards": "50",
}
# Write the configuration
+1 -1
View File
@@ -112,7 +112,7 @@ class ByteManager:
if self.lastByteKey == converted_escape_sequence:
if time.time() - self.lastInputTime <= self.env["runtime"][
"SettingsManager"
].get_setting_as_float("keyboard", "doubleTapTimeout"):
].get_setting_as_float("keyboard", "double_tap_timeout"):
self.repeat += 1
shortcut_data = b""
for i in range(self.repeat):
@@ -29,7 +29,7 @@ class DynamicKeyboardLayoutCommand:
try:
settingsManager = self.env["runtime"]["SettingsManager"]
currentLayout = settingsManager.get_setting(
"keyboard", "keyboardLayout"
"keyboard", "keyboard_layout"
)
# Check if already set (compare both full path and base name)
@@ -44,7 +44,7 @@ class DynamicKeyboardLayoutCommand:
try:
# Update the setting in memory
settingsManager.set_setting(
"keyboard", "keyboardLayout", self.layoutPath
"keyboard", "keyboard_layout", self.layoutPath
)
# Save to the actual config file
@@ -162,7 +162,7 @@ def get_keyboard_layouts(env):
# Get current layout setting path
try:
currentLayoutSetting = env["runtime"]["SettingsManager"].get_setting(
"keyboard", "keyboardLayout"
"keyboard", "keyboard_layout"
)
if currentLayoutSetting and os.path.exists(currentLayoutSetting):
currentLayoutDir = os.path.dirname(currentLayoutSetting)
+6 -6
View File
@@ -89,7 +89,7 @@ class InputManager:
if not self.no_key_pressed():
return
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"keyboard", "grabDevices"
"keyboard", "grab_devices"
):
self.executeDeviceGrab = False
return
@@ -208,7 +208,7 @@ class InputManager:
elif self.lastDeepestInput == self.env["input"]["currInput"]:
if time.time() - self.lastInputTime <= self.env["runtime"][
"SettingsManager"
].get_setting_as_float("keyboard", "doubleTapTimeout"):
].get_setting_as_float("keyboard", "double_tap_timeout"):
self.env["input"]["shortcut_repeat"] += 1
else:
self.env["input"]["shortcut_repeat"] = 1
@@ -255,7 +255,7 @@ class InputManager:
def grab_all_devices(self):
if self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"keyboard", "grabDevices"
"keyboard", "grab_devices"
):
try:
return self.env["runtime"]["InputDriver"].grab_all_devices()
@@ -265,7 +265,7 @@ class InputManager:
def ungrab_all_devices(self):
if self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"keyboard", "grabDevices"
"keyboard", "grab_devices"
):
try:
return self.env["runtime"]["InputDriver"].ungrab_all_devices()
@@ -355,7 +355,7 @@ class InputManager:
def write_event_buffer(self):
try:
if self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"keyboard", "grabDevices"
"keyboard", "grab_devices"
):
self.env["runtime"]["InputDriver"].write_event_buffer()
self.clear_event_buffer()
@@ -572,7 +572,7 @@ class InputManager:
# Get current layout path
layout_setting = self.env["runtime"]["SettingsManager"].get_setting(
"keyboard", "keyboardLayout"
"keyboard", "keyboard_layout"
)
# Resolve full path if needed
+3 -3
View File
@@ -49,7 +49,7 @@ class OutputManager:
return
if (
self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"speech", "readNumbersAsDigits"
"speech", "read_numbers_as_digits"
)
and len(text.strip()) > 1
):
@@ -157,7 +157,7 @@ class OutputManager:
self.env["runtime"]["SpeechDriver"].set_pitch(
self.env["runtime"][
"SettingsManager"
].get_setting_as_float("speech", "capitalPitch")
].get_setting_as_float("speech", "capital_pitch")
)
else:
self.env["runtime"]["SpeechDriver"].set_pitch(
@@ -221,7 +221,7 @@ class OutputManager:
try:
if self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"general", "newLinePause"
"general", "new_line_pause"
):
clean_text = text.replace("\n", " , ")
else:
@@ -52,7 +52,7 @@ class PunctuationManager:
# Check if we should replace undefined punctuation with spaces
replace_with_space = self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"general", "replaceUndefinedPunctuationWithSpace"
"general", "replace_undefined_punctuation_with_space"
)
# If the setting is disabled, use the old behavior (remove completely)
@@ -128,7 +128,7 @@ class PunctuationManager:
) and key not in " ":
if (
self.env["runtime"]["SettingsManager"].get_setting(
"general", "respectPunctuationPause"
"general", "respect_punctuation_pause"
)
and len(key) == 1
and key in "',.;:?!"
@@ -161,13 +161,13 @@ class PunctuationManager:
curr_punct_level = ""
if (
self.env["runtime"]["SettingsManager"]
.get_setting("general", "punctuationLevel")
.get_setting("general", "punctuation_level")
.lower()
in self.env["punctuation"]["LEVELDICT"]
):
curr_punct_level = self.env["punctuation"]["LEVELDICT"][
self.env["runtime"]["SettingsManager"]
.get_setting("general", "punctuationLevel")
.get_setting("general", "punctuation_level")
.lower()
]
else:
@@ -183,7 +183,7 @@ class PunctuationManager:
try:
curr_index = punct_list.index(
self.env["runtime"]["SettingsManager"]
.get_setting("general", "punctuationLevel")
.get_setting("general", "punctuation_level")
.lower()
) # curr punctuation
except Exception as e:
@@ -193,7 +193,7 @@ class PunctuationManager:
curr_index = 0
curr_level = punct_list[curr_index]
self.env["runtime"]["SettingsManager"].set_setting(
"general", "punctuationLevel", curr_level.lower()
"general", "punctuation_level", curr_level.lower()
)
return True
@@ -236,7 +236,7 @@ class QuickMenuManager(SpeechHelperMixin):
# Load base menu from config
menu_string = self.env["runtime"]["SettingsManager"].get_setting(
"menu", "quickMenu"
"menu", "quick_menu"
)
# Dynamically add speech-dispatcher specific items
+4 -4
View File
@@ -69,7 +69,7 @@ class RemoteManager:
def handle_settings_change_with_response(self, settings_text):
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"remote", "enableSettingsRemote"
"remote", "enable_settings_remote"
):
return {
"success": False,
@@ -115,7 +115,7 @@ class RemoteManager:
def handle_settings_change(self, settings_text):
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"remote", "enableSettingsRemote"
"remote", "enable_settings_remote"
):
return
@@ -137,7 +137,7 @@ class RemoteManager:
def handle_command_execution_with_response(self, command_text):
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"remote", "enableCommandRemote"
"remote", "enable_command_remote"
):
return {
"success": False,
@@ -218,7 +218,7 @@ class RemoteManager:
def handle_command_execution(self, command_text):
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"remote", "enableCommandRemote"
"remote", "enable_command_remote"
):
return
+2 -2
View File
@@ -429,11 +429,11 @@ class ScreenManager:
ignore_screens = []
fix_ignore_screens = self.env["runtime"][
"SettingsManager"
].get_setting("screen", "ignoreScreen")
].get_setting("screen", "ignore_screen")
if fix_ignore_screens != "":
ignore_screens.extend(fix_ignore_screens.split(","))
if self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"screen", "autodetectIgnoreScreen"
"screen", "autodetect_ignore_screen"
):
ignore_screens.extend(self.env["screen"]["autoIgnoreScreens"])
self.env["runtime"]["DebugManager"].write_debug_out(
+45 -45
View File
@@ -12,59 +12,59 @@ settings_data = {
"driver": "genericDriver",
"theme": "default",
"volume": 1.0,
"genericPlayFileCommand": "play -q -v fenrirVolume fenrirSoundFile",
"genericFrequencyCommand": "play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence",
"generic_play_file_command": "play -q -v fenrirVolume fenrirSoundFile",
"generic_frequency_command": "play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence",
},
"speech": {
"enabled": True,
"driver": "genericDriver",
"serverPath": "",
"server_path": "",
"rate": 0.75,
"pitch": 0.5,
"capitalPitch": 0.8,
"capital_pitch": 0.8,
"volume": 1.0,
"module": "",
"voice": "en-us",
"language": "",
"autoReadIncoming": True,
"readNumbersAsDigits": False,
"genericSpeechCommand": 'espeak -a fenrirVolume -s fenrirRate -p fenrirPitch -v fenrirVoice "fenrirText"',
"fenrirMinVolume": 0,
"fenrirMaxVolume": 200,
"fenrirMinPitch": 0,
"fenrirMaxPitch": 99,
"fenrirMinRate": 80,
"fenrirMaxRate": 450,
"auto_read_incoming": True,
"read_numbers_as_digits": False,
"generic_speech_command": 'espeak -a fenrirVolume -s fenrirRate -p fenrirPitch -v fenrirVoice "fenrirText"',
"fenrir_min_volume": 0,
"fenrir_max_volume": 200,
"fenrir_min_pitch": 0,
"fenrir_max_pitch": 99,
"fenrir_min_rate": 80,
"fenrir_max_rate": 450,
},
"screen": {
"driver": "vcsaDriver",
"encoding": "auto",
"screenUpdateDelay": 0.1,
"ignoreScreen": "",
"autodetectIgnoreScreen": False,
"screen_update_delay": 0.1,
"ignore_screen": "",
"autodetect_ignore_screen": False,
},
"general": {
"debug_level": debug.DebugLevel.DEACTIVE,
"debug_mode": "FILE",
"debugFile": "",
"punctuationProfile": "default",
"punctuationLevel": "some",
"respectPunctuationPause": True,
"replaceUndefinedPunctuationWithSpace": True,
"newLinePause": True,
"numberOfClipboards": 10,
"debug_file": "",
"punctuation_profile": "default",
"punctuation_level": "some",
"respect_punctuation_pause": True,
"replace_undefined_punctuation_with_space": True,
"new_line_pause": True,
"number_of_clipboards": 10,
"emoticons": True,
"fenrirKeys": "KEY_KP0,KEY_META",
"scriptKeys": "KEY_COMPOSE",
"fenrir_keys": "KEY_KP0,KEY_META",
"script_keys": "KEY_COMPOSE",
"time_format": "%I:%M%P",
"date_format": "%A, %B %d, %Y",
"autoSpellCheck": False,
"spellCheckLanguage": "en_US",
"auto_spell_check": False,
"spell_check_language": "en_US",
"script_path": "/usr/share/fenrirscreenreader/scripts",
"command_path": "/usr/share/fenrirscreenreader/commands",
"attribute_format_string": "Background fenrirBGColor,Foreground fenrirFGColor,fenrirUnderline,fenrirBold,fenrirBlink, Font fenrirFont,Fontsize fenrirFontSize",
"autoPresentIndent": False,
"autoPresentIndentMode": 1,
"auto_present_indent": False,
"auto_present_indent_mode": 1,
"has_attributes": True,
"shell": "",
},
@@ -77,8 +77,8 @@ settings_data = {
"driver": "unixDriver",
"port": 22447,
"socket_file": "",
"enableSettingsRemote": True,
"enableCommandRemote": True,
"enable_settings_remote": True,
"enable_command_remote": True,
},
"barrier": {
"enabled": True,
@@ -88,16 +88,16 @@ settings_data = {
"review": {
"line_break": True,
"end_of_screen": True,
"leaveReviewOnCursorChange": True,
"leaveReviewOnScreenChange": True,
"leave_review_on_cursor_change": True,
"leave_review_on_screen_change": True,
},
"menu": {
"vmenuPath": "",
"quickMenu": "speech#rate;speech#pitch;speech#volume",
"vmenu_path": "",
"quick_menu": "speech#rate;speech#pitch;speech#volume",
},
"promote": {
"enabled": True,
"inactiveTimeoutSec": 120,
"inactive_timeout_sec": 120,
"list": "",
},
"time": {
@@ -112,14 +112,14 @@ settings_data = {
"keyboard": {
"driver": "evdev",
"device": "all",
"grabDevices": True,
"ignoreShortcuts": False,
"keyboardLayout": "desktop",
"charEchoMode": 2, # while capslock
"charDeleteEcho": True,
"wordEcho": True,
"interruptOnKeyPress": True,
"interruptOnKeyPressFilter": "",
"doubleTapTimeout": 0.2,
"grab_devices": True,
"ignore_shortcuts": False,
"keyboard_layout": "desktop",
"char_echo_mode": 2, # while capslock
"char_delete_echo": True,
"word_echo": True,
"interrupt_on_key_press": True,
"interrupt_on_key_press_filter": "",
"double_tap_timeout": 0.2,
},
}
+36 -36
View File
@@ -498,7 +498,7 @@ class SettingsManager:
# Set PTY driver settings
pty_settings = {
"screen": {"driver": "ptyDriver"},
"keyboard": {"driver": "ptyDriver", "keyboardLayout": "pty"}
"keyboard": {"driver": "ptyDriver", "keyboard_layout": "pty"}
}
for section, settings in pty_settings.items():
for key, value in settings.items():
@@ -507,12 +507,12 @@ class SettingsManager:
self.set_setting("screen", "driver", "ptyDriver")
self.set_setting("keyboard", "driver", "evdevDriver")
self.set_fenrir_keys(self.get_setting("general", "fenrirKeys"))
self.set_script_keys(self.get_setting("general", "scriptKeys"))
self.set_fenrir_keys(self.get_setting("general", "fenrir_keys"))
self.set_script_keys(self.get_setting("general", "script_keys"))
environment["runtime"]["DebugManager"] = debugManager.DebugManager(
self.env["runtime"]["SettingsManager"].get_setting(
"general", "debugFile"
"general", "debug_file"
)
)
environment["runtime"]["DebugManager"].initialize(environment)
@@ -521,7 +521,7 @@ class SettingsManager:
environment["runtime"]["force_all_screens"] = True
if cliArgs.ignore_screen:
current_ignore_screen = self.get_setting("screen", "ignoreScreen")
current_ignore_screen = self.get_setting("screen", "ignore_screen")
if current_ignore_screen:
ignore_screens = (
current_ignore_screen.split(",") + cliArgs.ignore_screen
@@ -529,7 +529,7 @@ class SettingsManager:
else:
ignore_screens = cliArgs.ignore_screen
self.set_setting(
"screen", "ignoreScreen", ",".join(ignore_screens)
"screen", "ignore_screen", ",".join(ignore_screens)
)
if not os.path.exists(
@@ -561,43 +561,43 @@ class SettingsManager:
environment["runtime"]["TextManager"].initialize(environment)
if not os.path.exists(
self.get_setting("general", "punctuationProfile")
self.get_setting("general", "punctuation_profile")
):
if os.path.exists(
settings_root
+ "punctuation/"
+ self.get_setting("general", "punctuationProfile")
+ self.get_setting("general", "punctuation_profile")
):
self.set_setting(
"general",
"punctuationProfile",
"punctuation_profile",
settings_root
+ "punctuation/"
+ self.get_setting("general", "punctuationProfile"),
+ self.get_setting("general", "punctuation_profile"),
)
environment["runtime"]["PunctuationManager"].load_dicts(
self.get_setting("general", "punctuationProfile")
self.get_setting("general", "punctuation_profile")
)
if os.path.exists(
settings_root
+ "punctuation/"
+ self.get_setting("general", "punctuationProfile")
+ self.get_setting("general", "punctuation_profile")
+ ".conf"
):
self.set_setting(
"general",
"punctuationProfile",
"punctuation_profile",
settings_root
+ "punctuation/"
+ self.get_setting("general", "punctuationProfile")
+ self.get_setting("general", "punctuation_profile")
+ ".conf",
)
environment["runtime"]["PunctuationManager"].load_dicts(
self.get_setting("general", "punctuationProfile")
self.get_setting("general", "punctuation_profile")
)
else:
environment["runtime"]["PunctuationManager"].load_dicts(
self.get_setting("general", "punctuationProfile")
self.get_setting("general", "punctuation_profile")
)
if fenrir_manager:
@@ -644,86 +644,86 @@ class SettingsManager:
if environment["runtime"]["InputManager"].get_shortcut_type() == "KEY":
if not os.path.exists(
self.get_setting("keyboard", "keyboardLayout")
self.get_setting("keyboard", "keyboard_layout")
):
if os.path.exists(
settings_root
+ "keyboard/"
+ self.get_setting("keyboard", "keyboardLayout")
+ self.get_setting("keyboard", "keyboard_layout")
):
self.set_setting(
"keyboard",
"keyboardLayout",
"keyboard_layout",
settings_root
+ "keyboard/"
+ self.get_setting("keyboard", "keyboardLayout"),
+ self.get_setting("keyboard", "keyboard_layout"),
)
environment["runtime"]["InputManager"].load_shortcuts(
self.get_setting("keyboard", "keyboardLayout")
self.get_setting("keyboard", "keyboard_layout")
)
if os.path.exists(
settings_root
+ "keyboard/"
+ self.get_setting("keyboard", "keyboardLayout")
+ self.get_setting("keyboard", "keyboard_layout")
+ ".conf"
):
self.set_setting(
"keyboard",
"keyboardLayout",
"keyboard_layout",
settings_root
+ "keyboard/"
+ self.get_setting("keyboard", "keyboardLayout")
+ self.get_setting("keyboard", "keyboard_layout")
+ ".conf",
)
environment["runtime"]["InputManager"].load_shortcuts(
self.get_setting("keyboard", "keyboardLayout")
self.get_setting("keyboard", "keyboard_layout")
)
else:
environment["runtime"]["InputManager"].load_shortcuts(
self.get_setting("keyboard", "keyboardLayout")
self.get_setting("keyboard", "keyboard_layout")
)
elif (
environment["runtime"]["InputManager"].get_shortcut_type()
== "BYTE"
):
if not os.path.exists(
self.get_setting("keyboard", "keyboardLayout")
self.get_setting("keyboard", "keyboard_layout")
):
if os.path.exists(
settings_root
+ "keyboard/"
+ self.get_setting("keyboard", "keyboardLayout")
+ self.get_setting("keyboard", "keyboard_layout")
):
self.set_setting(
"keyboard",
"keyboardLayout",
"keyboard_layout",
settings_root
+ "keyboard/"
+ self.get_setting("keyboard", "keyboardLayout"),
+ self.get_setting("keyboard", "keyboard_layout"),
)
environment["runtime"]["ByteManager"].load_byte_shortcuts(
self.get_setting("keyboard", "keyboardLayout")
self.get_setting("keyboard", "keyboard_layout")
)
if os.path.exists(
settings_root
+ "keyboard/"
+ self.get_setting("keyboard", "keyboardLayout")
+ self.get_setting("keyboard", "keyboard_layout")
+ ".conf"
):
self.set_setting(
"keyboard",
"keyboardLayout",
"keyboard_layout",
settings_root
+ "keyboard/"
+ self.get_setting("keyboard", "keyboardLayout")
+ self.get_setting("keyboard", "keyboard_layout")
+ ".conf",
)
environment["runtime"]["ByteManager"].load_byte_shortcuts(
self.get_setting("keyboard", "keyboardLayout")
self.get_setting("keyboard", "keyboard_layout")
)
else:
environment["runtime"]["ByteManager"].load_byte_shortcuts(
self.get_setting("keyboard", "keyboardLayout")
self.get_setting("keyboard", "keyboard_layout")
)
environment["runtime"]["CursorManager"] = cursorManager.CursorManager()
+2 -2
View File
@@ -40,13 +40,13 @@ class VmenuManager:
# if there is no user configuration
if (
self.env["runtime"]["SettingsManager"].get_setting(
"menu", "vmenuPath"
"menu", "vmenu_path"
)
!= ""
):
self.defaultVMenuPath = self.env["runtime"][
"SettingsManager"
].get_setting("menu", "vmenuPath")
].get_setting("menu", "vmenu_path")
if not self.defaultVMenuPath.endswith("/"):
self.defaultVMenuPath += "/"
self.defaultVMenuPath += self.env["runtime"][
@@ -623,7 +623,7 @@ class driver(inputDriver):
def create_u_input_dev(self, fd):
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"keyboard", "grabDevices"
"keyboard", "grab_devices"
):
self.uDevices[fd] = None
return
@@ -730,7 +730,7 @@ class driver(inputDriver):
Only effective if grabDevices setting is enabled.
"""
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"keyboard", "grabDevices"
"keyboard", "grab_devices"
):
return True
@@ -792,7 +792,7 @@ class driver(inputDriver):
bool: True if ungrab successful, False otherwise
"""
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"keyboard", "grabDevices"
"keyboard", "grab_devices"
):
return True
@@ -48,10 +48,10 @@ class driver(sound_driver):
self.env = environment
self.soundFileCommand = self.env["runtime"][
"SettingsManager"
].get_setting("sound", "genericPlayFileCommand")
].get_setting("sound", "generic_play_file_command")
self.frequenceCommand = self.env["runtime"][
"SettingsManager"
].get_setting("sound", "genericFrequencyCommand")
].get_setting("sound", "generic_frequency_command")
if self.soundFileCommand == "":
self.soundFileCommand = "play -q -v fenrirVolume fenrirSoundFile"
if self.frequenceCommand == "":
@@ -38,26 +38,26 @@ class driver(speech_driver):
self.env = environment
self.minVolume = self.env["runtime"][
"SettingsManager"
].get_setting_as_int("speech", "fenrirMinVolume")
].get_setting_as_int("speech", "fenrir_min_volume")
self.maxVolume = self.env["runtime"][
"SettingsManager"
].get_setting_as_int("speech", "fenrirMaxVolume")
].get_setting_as_int("speech", "fenrir_max_volume")
self.minPitch = self.env["runtime"][
"SettingsManager"
].get_setting_as_int("speech", "fenrirMinPitch")
].get_setting_as_int("speech", "fenrir_min_pitch")
self.maxPitch = self.env["runtime"][
"SettingsManager"
].get_setting_as_int("speech", "fenrirMaxPitch")
].get_setting_as_int("speech", "fenrir_max_pitch")
self.minRate = self.env["runtime"][
"SettingsManager"
].get_setting_as_int("speech", "fenrirMinRate")
].get_setting_as_int("speech", "fenrir_min_rate")
self.maxRate = self.env["runtime"][
"SettingsManager"
].get_setting_as_int("speech", "fenrirMaxRate")
].get_setting_as_int("speech", "fenrir_max_rate")
self.speechCommand = self.env["runtime"][
"SettingsManager"
].get_setting("speech", "genericSpeechCommand")
].get_setting("speech", "generic_speech_command")
if self.speechCommand == "":
self.speechCommand = 'espeak -a fenrirVolume -s fenrirRate -p fenrirPitch -v fenrirVoice -- "fenrirText"'
if False: # for debugging overwrite here