atril
This directory provides Talon integration for Atril, the default document viewer for the MATE desktop environment on Linux. It enables standard document navigation controls, allowing hands-free reading and PDF navigation.
The integration is lightweight and consists of two primary files:
- atril.py: Defines the application context and overrides standard page-navigation actions.
- atril.talon: Activates the necessary voice commands when Atril is focused.
How It Works
The integration relies on Talon's global user.pages tag, which defines standard voice commands for document navigation (e.g., jumping to a page, moving to the next or previous page, or going to the end of the document).
- Application Identification: atril.py registers a Linux-specific application definition matching the application name "Atril".
- Enabling Voice Commands: When Atril is the active window, atril.talon activates the
user.pagestag, making standard page-navigation voice commands available. -
Action Implementation: atril.py overrides the underlying actions that the
user.pagestag uses, mapping them to Atril's specific keyboard shortcuts:- Next/Previous Page: Uses
ctrl-pagedownandctrl-pageup. - Final Page: Sends
ctrl-endto jump to the end of the document. - Page Jumping: Uses
ctrl-lto focus the page number input field, inserts the target page number, and pressesenter. - Current Page Detection: Uses
ctrl-lto select the current page number text, copies it to read the value, and safely restores focus back to the document view.
- Next/Previous Page: Uses