| 1 |
#!/usr/bin/env python3 |
| 2 |
# -*- coding: utf-8 -*- |
| 3 |
|
| 4 |
# Fenrir TTY screen reader |
| 5 |
# By Chrys, Storm Dragon, and contributors. |
| 6 |
|
| 7 |
from fenrirscreenreader.core.i18n import _ |
| 8 |
|
| 9 |
|
| 10 |
class command: |
| 11 |
def __init__(self): |
| 12 |
pass |
| 13 |
|
| 14 |
def initialize(self, environment): |
| 15 |
self.env = environment |
| 16 |
|
| 17 |
def shutdown(self): |
| 18 |
pass |
| 19 |
|
| 20 |
def get_description(self): |
| 21 |
return _("enables or disables tracking of highlighted") |
| 22 |
|
| 23 |
def run(self): |
| 24 |
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool( |
| 25 |
"focus", "highlight" |
| 26 |
): |
| 27 |
return |
| 28 |
attribute_delta = self.env["runtime"][ |
| 29 |
"AttributeManager" |
| 30 |
].get_attribute_delta() |
| 31 |
self.env["runtime"]["OutputManager"].present_text( |
| 32 |
attribute_delta, sound_icon="", interrupt=True, flush=False |
| 33 |
) |
| 34 |
|
| 35 |
def set_callback(self, callback): |
| 36 |
pass |