Debian Codegraph @

README.md

raw
1 # Fenrir
2
3 A modern, modular, flexible and fast console screen reader for Linux.
4 This software is licensed under the LGPL v3.
5
6 **Current maintainer:** Storm Dragon
7 **Previous developer:** Chrys
8
9 ## Key Features
10
11 - **Linux Console Support**: Works as a Linux TTY screen reader, with optional X11 terminal mode
12 - **Flexible Driver System**: Modular architecture with multiple drivers for speech, sound, input, and screen
13 - **Review Mode**: Navigate and review screen content without moving the edit cursor
14 - **Table Navigation**: Advanced table mode with column headers, cell-by-cell navigation, and boundary feedback
15 - **Progress Bar Monitoring**: Automatic detection and audio feedback for progress indicators with ascending tones
16 - **Multiple Clipboard Support**: Manage multiple clipboard entries
17 - **Configurable Key Bindings**: Desktop and laptop keyboard layouts
18 - **Sound Icons**: Audio feedback for various events
19 - **Spell Checking**: Built-in spell checker with word management
20 - **Language Support**: Multiple speech synthesis languages and voices
21 - **Bookmark System**: Quick access to specific screen areas
22 - **Auto-announcement**: Automatic reading of incoming text and time announcements
23 - **Tutorial Mode**: Built-in help system for learning keyboard shortcuts
24
25
26 ## Platform Support
27
28 Fenrir is a Linux screen reader. Linux is the only officially supported platform.
29
30 **Other platforms (macOS, BSD, Windows):** Pull requests adding support for other operating systems may be accepted provided they do not break Linux functionality. However, no special care will be taken to preserve functionality on secondary platforms. If changes to Fenrir break support on a non-Linux OS, it is the responsibility of third-party contributors to submit fixes.
31
32 - Linux TTY (`vcsaDriver`, `evdevDriver`) - Full support
33 - X11 terminal emulators (`-x`, `ptyDriver`, `x11Driver`) - Supported
34
35
36 ## Core Requirements
37
38 - Python 3 >= 3.9 (recommended 3.13+)
39 - Screen, input, speech, sound driver dependencies (see "Features, Drivers, Extras" section)
40 - For full functionality on Linux: evdev, speech-dispatcher, sox
41
42
43 ## Features, Drivers, Extras, Dependencies
44
45 ### Input Drivers:
46 1. **evdevDriver** - Linux evdev input driver (recommended for Linux)
47 - python-evdev >=0.6.3 (This is commonly referred to as python3-evdev by your distribution)
48 - python-pyudev
49 - loaded uinput kernel module
50 - ReadWrite permission:
51 - /dev/input
52 - /dev/uinput
53 2. **x11Driver** - X11 terminal-scoped input driver for `fenrir -x`
54 - python-xlib
55 ### Remote Drivers:
56 1. **unixDriver** - Unix socket remote control (default)
57 - socat (for command-line interaction)
58 2. **tcpDriver** - TCP socket remote control (localhost only)
59 - netcat or telnet (for command-line interaction)
60
61
62 ### Screen Drivers:
63
64 1. **vcsaDriver** - Linux VCSA devices driver (recommended for Linux TTY)
65 - python-dbus
66 - Read permission to the following files and services:
67 - /sys/devices/virtual/tty/tty0/active
68 - /dev/tty[1-64]
69 - /dev/vcsa[1-64]
70 - read logind DBUS
71 2. **ptyDriver** - Terminal emulation screen driver for `fenrir -x`
72 - python-pyte
73
74
75 ### Speech Drivers:
76
77 1. **speechdDriver** - Speech-dispatcher driver (recommended)
78 - Speech-dispatcher
79 - python-speechd
80 2. **genericDriver** - Generic subprocess speech driver
81 - espeak or espeak-ng (or any TTS command)
82 3. **dectalkDriver** - Serial DECtalk-compatible hardware speech driver
83 - RPITalk gadget mode or a DECtalk-compatible serial device
84 4. **dectalkUsbDriver** - Native Access Solutions DECtalk USB driver
85 - USB ID `0dd0:2001`
86 - PyUSB and a libusb backend
87 5. **litetalkDriver** - Serial LiteTalk-compatible hardware speech driver
88 - RPITalk gadget mode or a LiteTalk-compatible serial device
89 6. **doubletalkDriver** - Serial DoubleTalk LT-compatible hardware speech driver
90 - DoubleTalk LT; does not support the internal DoubleTalk PC card
91 7. **tripletalkDriver** - Serial TripleTalk-compatible hardware speech driver
92 - External DB9 serial TripleTalk devices, or USB models that expose a tty serial device
93 8. **debugDriver** - Debug speech driver for testing
94 - No dependencies
95
96
97 ### Sound Drivers:
98
99 1. **genericDriver** (default) - Generic subprocess sound driver
100 - Sox with opus support (recommended)
101 2. **gstreamerDriver** - GStreamer sound driver
102 - gstreamer >=1.0
103 - GLib
104 3. **debugDriver** - Debug sound driver for testing
105 - No dependencies
106
107
108 ## Extras:
109
110 1. spellchecker
111 - python-pyenchant
112 - aspell-YourLanguageCode (example aspell-en for us English)
113 2. Unix daemon (also needed for Systemd):
114 - python-daemonize
115 3. Modify system volume:
116 - pyalsaaudio (needs libasound2's headers).
117
118
119 ## installation
120
121 If there is a package for your distrobution of choice, please let us know so we can add it here.
122
123 - Archlinux: PKGBUILD in AUR
124 - fenrir: stable release
125 - fenrir-git: Bleeding edge release
126 - Manual:
127 - install "espeak" and "sox" with your package manager
128 - sudo pip install -r requirements.txt
129 - run install.sh or uninstall.sh as root
130 - You can also just run it from Git without installing:
131 Requires root privileges
132
133 cd src/
134 sudo ./fenrir
135
136 Settings are located in:
137 - **System-wide installation**: `/etc/fenrirscreenreader/settings/settings.conf`
138 - **User-local settings**: `~/.local/share/stormux/fenrirscreenreader/settings/settings.conf`
139 - **Development**: `config/settings/settings.conf`
140
141 When Fenrir runs as a regular user, including `fenrir -x`, it loads the
142 user-local settings file if it exists. If it does not exist, Fenrir falls back
143 to the system settings file, but saving settings writes to the user-local path.
144 When Fenrir runs as root, settings save to the system-wide path by default.
145
146 User sound themes are loaded before system themes from
147 `~/.local/stormux/fenrir/sounds/`. User scripts are loaded before configured
148 system scripts from `~/.local/stormux/fenrir/`.
149
150 By default Fenrir uses:
151 - **Sound driver**: genericDriver (via sox)
152 - **Speech driver**: speechdDriver (via speech-dispatcher)
153 - **Input driver**: evdevDriver for Linux TTY, x11Driver for `fenrir -x`
154 - **Screen driver**: vcsaDriver for Linux TTY, ptyDriver for `fenrir -x`
155
156 ## Audio Configuration
157
158 Both PulseAudio and PipeWire require special configuration to allow console applications running as root (like Fenrir) to route audio to your regular user session. This is normal audio system behavior, not a Fenrir issue.
159
160 ### Quick Setup - Direct Script Download
161
162 For non-Fenrir users or quick setup, download and run these scripts directly:
163
164 #### PulseAudio Configuration
165 ```bash
166 # Download the script
167 wget https://git.stormux.org/storm/fenrir/raw/branch/master/tools/configure_pulse.sh
168 chmod +x configure_pulse.sh
169
170 # Run twice: once as user, once as root
171 ./configure_pulse.sh
172 sudo ./configure_pulse.sh
173 ```
174
175 #### PipeWire Configuration
176 ```bash
177 # Download the script
178 wget https://git.stormux.org/storm/fenrir/raw/branch/master/tools/configure_pipewire.sh
179 chmod +x configure_pipewire.sh
180
181 # Run twice: once as user, once as root
182 ./configure_pipewire.sh
183 sudo ./configure_pipewire.sh
184 ```
185
186 **Direct links:**
187 - [configure_pulse.sh](https://git.stormux.org/storm/fenrir/raw/branch/master/tools/configure_pulse.sh)
188 - [configure_pipewire.sh](https://git.stormux.org/storm/fenrir/raw/branch/master/tools/configure_pipewire.sh)
189
190 ### Using Installed Scripts
191
192 If you have Fenrir installed, the scripts are available at:
193
194 **PulseAudio:**
195 ```bash
196 /usr/share/fenrirscreenreader/tools/configure_pulse.sh
197 sudo /usr/share/fenrirscreenreader/tools/configure_pulse.sh
198 ```
199
200 **PipeWire:**
201 ```bash
202 /usr/share/fenrirscreenreader/tools/configure_pipewire.sh
203 sudo /usr/share/fenrirscreenreader/tools/configure_pipewire.sh
204 ```
205
206 **Note:** These scripts work for any console application that needs root audio access, not just Fenrir.
207
208 ## Getting Started
209
210 ### Basic Usage
211
212 1. **Start Fenrir**:
213 ```bash
214 sudo systemctl start fenrir # If installed as service
215 # OR
216 sudo fenrir # Run directly
217 ```
218
219 2. **Basic Navigation**:
220 - **Fenrir Key**: By default `Insert`, `Keypad Insert`, or `Meta/Super` key
221 - **Tutorial Mode**: `Fenrir + H` to learn all commands interactively
222 - **Speech History**: `Fenrir + Ctrl + H` to review recent speech
223 - **Quit Fenrir**: `Fenrir + Q`
224
225 3. **Essential Commands**:
226 - `Ctrl` - Stop speech (shut up)
227 - `Fenrir + Keypad 5` - Read current screen
228 - `Keypad 8` - Read current line
229 - `Keypad 5` - Read current word
230 - `Keypad 2` - Read current character
231 - `Fenrir + T` - Announce time
232 - `Fenrir + S` - Spell check current word
233 - `Fenrir + Keypad *` - Toggle table mode / highlight tracking
234
235 ### Keyboard Layouts
236
237 Fenrir supports two main keyboard layouts:
238
239 - **Desktop Layout**: Uses numeric keypad for navigation (recommended for desktop users)
240 - **Laptop Layout**: Alternative bindings for keyboards without numeric keypad
241
242 Configure in `/etc/fenrirscreenreader/settings/settings.conf` or your
243 user-local settings file:
244 ```ini
245 [keyboard]
246 keyboard_layout=desktop # or 'laptop'
247 ```
248
249 ### First Time Setup
250
251 1. **Enable Fenrir at boot**:
252 ```bash
253 sudo systemctl enable fenrir
254 ```
255
256 2. **Configure audio** (if needed):
257 - For PulseAudio: Run configure_pulse.sh script (see below)
258 - For PipeWire: Run configure_pipewire.sh script (see below)
259
260 3. **Test speech**:
261 ```bash
262 # Test speech-dispatcher directly
263 sudo spd-say "Hello World"
264 ```
265
266 ## Remote Control
267
268 Fenrir includes a powerful remote control system that allows external applications and scripts to control Fenrir through Unix sockets or TCP connections. This is particularly useful for automation, integration with other applications, or providing alternative control methods.
269
270 ### Configuration
271
272 Enable remote control in `/etc/fenrirscreenreader/settings/settings.conf` or
273 your user-local settings file:
274
275 ```ini
276 [remote]
277 enable=True
278 driver=unixDriver # or tcpDriver
279 port=22447 # for TCP driver
280 socket_file= # custom socket path (optional)
281 enable_settings_remote=True # allow settings changes
282 enable_command_remote=True # allow command execution
283 ```
284
285 ### Remote Drivers
286
287 1. **unixDriver** (recommended): Uses Unix domain sockets
288 - Socket location: `/tmp/fenrirscreenreader-daemon.sock` for the standard control socket
289 - `fenrir -x` instances also create private sockets: `/tmp/fenrirscreenreader-<pid>.sock`
290 - More secure, local-only access
291 - Works with `socat`
292
293 2. **tcpDriver**: Uses TCP sockets on localhost
294 - Default port: 22447
295 - Works with `netcat`, `telnet`, or any TCP client
296 - Local connections only (127.0.0.1)
297
298 ### Using socat with Unix Sockets
299
300 The `socat` command provides the easiest way to send commands to Fenrir:
301
302 #### Instance Discovery
303 ```bash
304 # List registered Fenrir instances and their socket paths
305 echo "ls" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
306 ```
307
308 In X terminal mode (`fenrir -x`), multiple Fenrir instances can run at the same
309 time. Each instance has a private socket, and one instance may also own the
310 standard control socket. Use `ls` or `command ls` on the standard socket to find
311 the private socket for a specific instance. Commands sent to the standard socket
312 are handled by its owner when possible; otherwise they are forwarded to a
313 registered private socket, preferring the sender's Fenrir ancestor when one can
314 be found. Untargeted commands sent through a shared or broadcast path are
315 claimed by one instance so duplicate instances do not all perform the same
316 action.
317
318 #### Basic Speech Control
319 ```bash
320 # Interrupt current speech
321 echo "command interrupt" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
322
323 # Speak custom text
324 echo "command say Hello, this is a test message" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
325
326 # Temporarily disable speech (until next keystroke)
327 echo "command tempdisablespeech" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
328 ```
329
330 #### Settings Control
331 ```bash
332 # Enable highlight tracking mode
333 echo "setting set focus#highlight=True" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
334
335 # Change speech parameters
336 echo "setting set speech#rate=0.8" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
337 echo "setting set speech#pitch=0.6" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
338 echo "setting set speech#volume=0.9" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
339
340 # Change punctuation level (none/some/most/all)
341 echo "setting set general#punctuation_level=all" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
342 echo "setting set general#punctuation_level=none" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
343
344 # Voice and TTS engine control
345 echo "setting set speech#voice=en-us+f3" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
346 echo "setting set speech#module=espeak-ng" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
347
348 # Disable sound temporarily
349 echo "setting set sound#enabled=False" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
350 echo "setting set sound#volume=0.5" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
351
352 # Keyboard and input settings
353 echo "setting set keyboard#char_echo_mode=1" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
354 echo "setting set keyboard#word_echo=True" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
355
356 # Screen control (ignore specific TTYs)
357 echo "setting set screen#ignore_screen=1,2,3" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
358
359 # Multiple settings at once
360 echo "setting set speech#rate=0.8;sound#volume=0.7;general#punctuation_level=most" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
361
362 # Reset all settings to defaults
363 echo "setting reset" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
364
365 # Save current settings
366 echo "setting save" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
367 echo "setting saveas /tmp/my-fenrir-settings.conf" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
368 ```
369
370 #### Clipboard Operations
371 ```bash
372 # Place text into clipboard
373 echo "command clipboard This text will be copied to clipboard" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
374
375 # Export clipboard to file
376 echo "command exportclipboard" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
377 ```
378
379 #### Window Management
380 ```bash
381 # Define a window area (x1 y1 x2 y2)
382 echo "command window 0 0 80 24" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
383
384 # Reset window to full screen
385 echo "command resetwindow" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
386 ```
387
388 #### VMenu Control
389 ```bash
390 # Set virtual menu context
391 echo "command vmenu nano/file" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
392
393 # Reset virtual menu
394 echo "command resetvmenu" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
395 ```
396
397 #### Application Control
398 ```bash
399 # Quit Fenrir
400 echo "command quitapplication" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
401 ```
402
403 ### Using TCP Driver
404
405 If using the TCP driver, replace socat commands with netcat:
406
407 ```bash
408 # Using netcat
409 echo "command say Hello from TCP" | nc localhost 22447
410
411 # Using telnet
412 echo "command interrupt" | telnet localhost 22447
413 ```
414
415 ### Remote Command Reference
416
417 #### Command Format
418 ```
419 command <action> [parameters]
420 setting <action> [parameters]
421 ```
422
423 #### Available Commands
424
425 **Speech Commands:**
426 - `command say <text>` - Speak the specified text
427 - `command interrupt` - Stop current speech
428 - `command tempdisablespeech` - Disable speech until next key press
429
430 **Clipboard Commands:**
431 - `command clipboard <text>` - Add text to clipboard
432 - `command exportclipboard` - Export clipboard to file
433
434 **Window Commands:**
435 - `command window <x1> <y1> <x2> <y2>` - Define window area
436 - `command resetwindow` - Reset to full screen
437
438 **VMenu Commands:**
439 - `command vmenu <menu_path>` - Set vmenu context
440 - `command resetvmenu` - Reset vmenu
441
442 **Application Commands:**
443 - `command quitapplication` - Quit Fenrir
444
445 **Instance Commands:**
446 - `ls` / `list` / `command ls` / `command list` - List registered Fenrir instances and their socket paths
447
448 #### Available Settings
449
450 **Settings Commands:**
451 - `setting set <section>#<key>=<value>` - Set configuration value
452 - `setting reset` - Reset all settings to defaults
453 - `setting save [path]` - Save current settings
454 - `setting saveas <path>` - Save settings to specific file
455
456 **Common Settings:**
457
458 *Speech Settings:*
459 - `speech#enabled=True/False` - Enable/disable speech
460 - `speech#rate=0.1-1.0` - Speech rate (speed)
461 - `speech#pitch=0.1-1.0` - Speech pitch (tone)
462 - `speech#volume=0.1-1.0` - Speech volume
463 - `speech#voice=voice_name` - Voice selection (e.g., "en-us+f3")
464 - `speech#module=module_name` - TTS module (e.g., "espeak-ng")
465 - `speech#driver=driver_name` - Speech driver (speechdDriver/genericDriver/dectalkDriver/dectalkUsbDriver/litetalkDriver/doubletalkDriver/tripletalkDriver)
466 - `speech#hardware_device=/dev/ttyS0` - Hardware synth serial device for dectalkDriver/litetalkDriver
467 - `speech#hardware_baud_rate=9600` - Hardware synth serial baud rate
468 - `speech#history_size=50` - Number of spoken items kept in runtime speech history
469
470 The native Access Solutions DECtalk USB, USB ID `0dd0:2001`, uses
471 `dectalkUsbDriver`. It is autodetected and does not use
472 `speech#hardware_device` or `speech#hardware_baud_rate`. Install PyUSB and a
473 libusb backend first. From a source checkout, use
474 `python3 -m pip install '.[dectalk_usb]'`; distributions may package PyUSB as
475 `python3-usb` or `python-pyusb`. Root-run Fenrir can access the device directly.
476 A non-root Fenrir process needs a local udev rule granting its account
477 read/write access to `0dd0:2001`; do not make the device world-writable. Other
478 USB hardware synths are supported only when Linux exposes them as a serial tty
479 such as `/dev/ttyACM0` or `/dev/ttyUSB0`. Use an explicit
480 `speech#hardware_device` path for serial hardware speech.
481 - `speech#auto_read_incoming=True/False` - Auto-read new text
482
483 *Sound Settings:*
484 - `sound#enabled=True/False` - Enable/disable sound
485 - `sound#volume=0.1-1.0` - Sound volume
486 - `sound#driver=driver_name` - Sound driver (genericDriver/gstreamerDriver)
487 - `sound#theme=theme_name` - Sound theme
488
489 *General Settings:*
490 - `general#punctuation_level=none/some/most/all` - Punctuation verbosity
491 - `general#debug_level=0-3` - Debug level
492 - `general#emoticons=True/False` - Enable emoticon replacement
493 - `general#auto_spell_check=True/False` - Automatic spell checking
494
495 *Focus Settings:*
496 - `focus#cursor=True/False` - Follow text cursor
497 - `focus#highlight=True/False` - Follow text highlighting
498
499 *Keyboard Settings:*
500 - `keyboard#char_echo_mode=0-2` - Character echo (0=none, 1=always, 2=capslock only)
501 - `keyboard#word_echo=True/False` - Echo complete words
502 - `keyboard#char_delete_echo=True/False` - Echo deleted characters
503 - `keyboard#interrupt_on_key_press=True/False` - Interrupt speech on key press
504
505 *Screen Settings:*
506 - `screen#ignore_screen=1,2,3` - TTY screens to ignore
507 - `screen#autodetect_ignore_screen=True/False` - Auto-detect screens to ignore
508 - `screen#screen_update_delay=float` - Screen update delay
509
510 *Time Settings:*
511 - `time#enabled=True/False` - Enable time announcements
512 - `time#present_time=True/False` - Announce time
513 - `time#present_date=True/False` - Announce date changes
514 - `time#delay_sec=seconds` - Announcement interval
515 - `time#on_minutes=00,30` - Specific minutes to announce
516
517 ## Table Navigation
518
519 Fenrir includes advanced table navigation capabilities for working with tabular data in terminal applications, CSV files, and formatted text output.
520
521 ### Entering Table Mode
522
523 Table mode is activated through the **toggle_highlight_tracking** command, which cycles through three focus modes:
524
525 1. **Highlight tracking mode** (default) - Follows text highlighting
526 2. **Cursor tracking mode** - Follows text cursor movement
527 3. **Table mode** - Enables table navigation
528
529 **Key bindings:**
530 - **Desktop layout**: `Fenrir + Keypad *` (asterisk)
531 - **Laptop layout**: `Fenrir + Y`
532
533 Press the key combination repeatedly to cycle through modes until you hear "table mode enabled".
534
535 ### Table Navigation Commands
536
537 #### Column Navigation (Desktop Layout)
538 - **Next column**: `Keypad 6` - Move to next table column
539 - **Previous column**: `Keypad 4` - Move to previous table column
540 - **First column**: `Fenrir + Keypad 4` - Jump to first column of current row
541 - **Last column**: `Fenrir + Keypad 6` - Jump to last column of current row
542
543 #### Column Navigation (Laptop Layout)
544 - **Next column**: `Fenrir + L` - Move to next table column
545 - **Previous column**: `Fenrir + J` - Move to previous table column
546 - **First column**: `Fenrir + Shift + J` - Jump to first column of current row
547 - **Last column**: `Fenrir + Shift + L` - Jump to last column of current row
548
549 #### Cell Character Navigation
550 - **First character in cell**: `Fenrir + Keypad 1` (desktop) or `Fenrir + Ctrl + J` (laptop)
551 - **Last character in cell**: `Fenrir + Keypad 3` (desktop) or `Fenrir + Ctrl + L` (laptop)
552
553 ### Setting Column Headers
554
555 For better navigation experience, you can set column headers:
556
557 1. **Navigate to header row**: Use normal navigation to reach the row containing column headers
558 2. **Set headers**: Press `Fenrir + X` to mark the current line as the header row
559 3. **Navigation feedback**: Column headers will be announced along with cell content
560
561 ### Table Detection
562
563 Fenrir automatically detects table structures using multiple strategies:
564 - **Delimited text**: CSV, pipe-separated (`|`), semicolon-separated (`;`), tab-separated
565 - **Aligned columns**: Space-aligned columns (2+ spaces between columns)
566 - **Flexible parsing**: Handles various table formats commonly found in terminal applications
567
568 ### Table Mode Features
569
570 - **Cell-by-cell navigation**: Navigate through table cells with precise positioning
571 - **Column header support**: Set and announce column headers for better context
572 - **Boundary feedback**: Audio cues when reaching start/end of rows
573 - **Empty cell handling**: Blank cells are announced as "blank"
574 - **Independent tracking**: Table position is maintained independently of cursor movement
575
576 ### Speech Output in Table Mode
577
578 When navigating in table mode, Fenrir announces:
579 - **Cell content** followed by **column header/name**
580 - **Boundary notifications**: "end of line", "start of line"
581 - **Position indicators**: "first character in cell [column name]"
582
583 ### Example Usage
584
585 ```bash
586 # Working with CSV data
587 cat data.csv
588 Name,Age,City
589 Alice,30,New York
590 Bob,25,Los Angeles
591
592 # 1. Press Fenrir + Keypad * until "table mode enabled"
593 # 2. Navigate to "Name,Age,City" line
594 # 3. Press Fenrir + X to set headers
595 # 4. Use Keypad 4/6 to navigate between columns
596 # 5. Each cell will be announced with its column header
597 ```
598
599 ## Progress Bar Monitoring
600
601 Fenrir provides intelligent progress bar detection and audio feedback for various progress indicators commonly found in terminal applications.
602
603 ### Enabling Progress Monitoring
604
605 **Command**: `progress_bar_monitor` (no default key binding - assign manually)
606
607 To enable progress monitoring:
608 1. Add a key binding in your keyboard layout file
609 2. Or use the remote control system: `echo "command progress_bar_monitor" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock`
610
611 ### Progress Detection Patterns
612
613 Fenrir automatically detects various progress indicator formats:
614
615 #### 1. Percentage Progress
616 ```
617 Download: 45%
618 Processing: 67.5%
619 Installing: 100%
620 ```
621
622 #### 2. Fraction Progress
623 ```
624 Files: 15/100
625 Progress: 3 of 10
626 Step 7/15
627 ```
628
629 #### 3. Progress Bars
630 ```
631 [#### ] 40%
632 [====> ] 50%
633 [**********] 100%
634 ```
635
636 #### 4. Activity Indicators
637 ```
638 Loading...
639 Processing...
640 Working...
641 Installing...
642 Downloading...
643 Compiling...
644 Building...
645 ```
646
647 ### Audio Feedback
648
649 #### Progress Tones
650 - **Ascending tones**: 400Hz to 1200Hz frequency range
651 - **Percentage mapping**: 0% = 400Hz, 100% = 1200Hz
652 - **Smooth progression**: Frequency increases proportionally with progress
653
654 #### Activity Indicators
655 - **Steady beep**: 800Hz tone every 2 seconds for ongoing activity
656 - **Non-intrusive**: Beeps don't interrupt speech or other audio
657
658 ### Progress Monitoring Features
659
660 - **Automatic detection**: No manual configuration required
661 - **Multiple format support**: Handles various progress indicator styles
662 - **Prompt awareness**: Automatically pauses when command prompts are detected
663 - **Non-blocking**: Progress tones don't interrupt speech or other functionality
664 - **Configurable**: Can be enabled/disabled as needed
665
666 Fenrir detects stable progress structures rather than application-specific
667 status formats. Application-specific formats change too frequently to support
668 reliably.
669
670 ### Usage Examples
671
672 ```bash
673 # Enable progress monitoring
674 echo "command progress_bar_monitor" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock
675
676 # Common scenarios where progress monitoring is useful:
677 wget https://example.com/large-file.zip # Download progress
678 tar -xvf archive.tar.gz # Extraction progress
679 make -j4 # Compilation progress
680 pacman -S package # Package installation
681 rsync -av source/ destination/ # File synchronization
682 ```
683
684 ### Customization
685
686 Progress monitoring can be configured through settings:
687 - **Default enabled**: Set `progress_monitoring=True` in sound section
688 - **Sound integration**: Works with all sound drivers (sox, gstreamer)
689 - **Remote control**: Enable/disable through remote commands
690
691 ### Scripting Examples
692
693 #### Bash Script for Speech Notifications
694 ```bash
695 #!/bin/bash
696 # notify_fenrir.sh - Send notifications to Fenrir
697
698 SOCKET="/tmp/fenrirscreenreader-daemon.sock"
699
700 fenrir_say() {
701 echo "command say $1" | socat - UNIX-CLIENT:$SOCKET
702 }
703
704 fenrir_interrupt() {
705 echo "command interrupt" | socat - UNIX-CLIENT:$SOCKET
706 }
707
708 # Usage examples
709 fenrir_say "Build completed successfully"
710 fenrir_interrupt
711 ```
712
713 #### Python Integration
714 ```python
715 #!/usr/bin/env python3
716 import socket
717 import os
718
719 def send_fenrir_command(command):
720 """Send command to Fenrir via Unix socket"""
721 socket_path = "/tmp/fenrirscreenreader-daemon.sock"
722 if os.path.exists(socket_path):
723 sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
724 try:
725 sock.connect(socket_path)
726 sock.send(command.encode('utf-8'))
727 finally:
728 sock.close()
729
730 # Examples
731 send_fenrir_command("command say Processing complete")
732 send_fenrir_command("setting set speech#rate=0.9")
733 ```
734
735 ### Security Considerations
736
737 - Unix sockets are accessible only to the user running Fenrir
738 - TCP driver binds only to localhost (127.0.0.1)
739 - Socket file permissions are set to write-only (0o222)
740 - Commands are processed with Fenrir's privileges
741 - Settings changes can be disabled via `enable_settings_remote=False`
742 - Command execution can be disabled via `enable_command_remote=False`
743
744 ### Troubleshooting
745
746 **Socket not found:**
747 - Verify Fenrir is running: `ps aux | grep fenrir`
748 - Check socket location: `/tmp/fenrirscreenreader-*`
749 - Ensure remote driver is enabled in settings
750
751 **Commands not working:**
752 - Verify `enable_command_remote=True` in settings
753 - Check Fenrir debug logs: `/tmp/fenrir.log`
754 - Test with simple command: `echo "command interrupt" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-daemon.sock`
755
756 ## Command Line Options
757
758 Fenrir supports several command-line options for different use cases:
759
760 ```
761 fenrir [OPTIONS]
762 ```
763
764 ### Options:
765 - `-h, --help` - Show help message and exit
766 - `-v, --version` - Show version information and exit
767 - `-f, --foreground` - Run in foreground (don't daemonize)
768 - `-s, --setting SETTING-FILE` - Path to custom settings file
769 - `-o, --options SECTION#SETTING=VALUE;..` - Override settings file options
770 - `-d, --debug` - Enable debug mode
771 - `-p, --print` - Print debug messages to screen
772 - `-x, --x11` - Use PTY emulation with X11 keyboard input scoped to the terminal window
773 - `--x11-window-id WINDOWID` - X11 window id to use for `--x11` terminal mode
774 - `-F, --force-all-screens` - Force Fenrir to respond on all screens, ignoring ignore_screen setting
775 - `-i, -I, --ignore-screen SCREEN` - Ignore specific screen(s). Can be used multiple times. Combines with existing ignore settings.
776
777 ### Examples:
778 ```bash
779 # Run in foreground with debug output
780 sudo fenrir -f -d
781
782 # Use PTY emulation with X11 terminal-scoped keybindings
783 fenrir -x
784
785 # Use X11 mode with an explicit terminal window id
786 fenrir -x --x11-window-id 0x123456
787
788 # Override settings via command line
789 sudo fenrir -o "speech#rate=0.8;sound#volume=0.5"
790
791 # Force Fenrir to work on all screens (ignore ignore_screen setting)
792 sudo fenrir -F
793
794 # Ignore specific screens
795 sudo fenrir --ignore-screen 1
796 sudo fenrir -i 1 -i 2 # Ignore screens 1 and 2
797 ```
798
799 ### X11 Terminal Mode
800
801 `fenrir -x` runs Fenrir inside a GUI terminal without root. It uses the PTY screen driver for terminal contents and the X11 input driver for Fenrir keybindings. Unlike evdev mode, it does not listen to the whole desktop; key grabs are scoped to the target terminal window so desktop screen readers can keep their own global bindings outside that terminal.
802
803 By default, Fenrir targets the X11 window from `WINDOWID`, falling back to the active X11 window. If a terminal does not set `WINDOWID`, pass the window explicitly with `--x11-window-id`.
804
805 X11 terminal mode uses the normal keyboard layout files, including desktop and laptop bindings. It supports Fenrir keys such as numpad Insert/`KEY_KP0`, CapsLock/`KEY_CAPSLOCK`, Insert/`KEY_INSERT`, and Super/Windows/`KEY_META`. Script keys such as Compose use `KEY_COMPOSE`.
806
807 In this mode Fenrir runs as a regular user. Settings are loaded from
808 `~/.local/share/stormux/fenrirscreenreader/settings/settings.conf` when present,
809 otherwise from `/etc/fenrirscreenreader/settings/settings.conf`; saving settings
810 creates or updates the user-local file. User sound themes and scripts are read
811 first from `~/.local/stormux/fenrir/sounds/` and `~/.local/stormux/fenrir/`.
812
813 This mode requires `python-xlib`.
814
815 For users who want a dedicated PTY/terminal screen reader instead of Fenrir's Linux console focus, see TDSR: https://github.com/tspivey/tdsr
816
817 ## Localization
818 Translation files are located in the `locale/` directory. To install translations:
819
820 ```bash
821 # Copy translation file to system location
822 sudo cp locale/your_language/LC_MESSAGES/fenrir.mo /usr/share/locale/your_language/LC_MESSAGES/fenrir.mo
823 ```
824
825 Available languages:
826 - German (de)
827 - Spanish (es)
828 - Polish (pl)
829 - Portuguese (pt)
830 - Russian (ru)
831
832 ## Documentation and Support
833
834 - **Email list**: [[email protected]](mailto:[email protected]?subject=subscribe) with the subject subscribe
835 - **Fenrir Wiki**: [https://git.stormux.org/storm/fenrir/wiki](https://git.stormux.org/storm/fenrir/wiki)
836 - **IRC**: irc.stormux.org #stormux
837 - **Issues**: Report bugs and feature requests on the project repository