Compare commits

...

35 Commits

Author SHA1 Message Date
Storm Dragon
2cc2fda28c Actually fix the version file this time. 2025-03-02 17:59:20 -05:00
Storm Dragon
c99d0f6ee1 Fixed version.py. 2025-03-02 17:44:32 -05:00
Storm Dragon
1552b962a1 Updated dependencies. 2025-03-02 17:43:01 -05:00
Storm Dragon
09391bfe84 Experimental fix for evdev failures. 2025-03-02 17:24:45 -05:00
Storm Dragon
e76ca9889a Same update for export to x clipboard. Now using pyperclip. 2025-03-02 16:04:38 -05:00
Storm Dragon
73206ce393 Switched from xclip to pyperclip for import from x. 2025-03-02 15:25:06 -05:00
Storm Dragon
5b642cd9e2 Fixed error in settings file. 2025-02-26 17:41:01 -05:00
Storm Dragon
4966b87ba1 pyttsx removed from setup file because it's no longer a speech option. 2025-02-26 17:38:22 -05:00
Storm Dragon
145cab6221 Updated dependencies to include rapidfuzz. 2025-02-26 17:08:50 -05:00
Storm Dragon
e46926f145 Fixed a traceback on shutdown. Hopefully improved responsiveness with the diff. Trying rapidfuzz for smaller screen updates, add a catch to fall back to the original difflib if there are any problems. This is experimental, please watch for bugs. 2025-02-26 17:02:25 -05:00
Storm Dragon
8cd50c5070 Hopefully improve accuracy of blank line reporting. 2025-02-26 16:05:17 -05:00
Storm Dragon
ed918a0334 Forgot to push one of the punctuation files.
?
2025-01-08 20:26:46 -05:00
Storm Dragon
760b873abe Updated emoticon handling to make it more accurate, fewer false positives. 2025-01-04 21:57:12 -05:00
Storm Dragon
46c348634c Post release switch code name back to master. 2024-12-21 18:01:42 -05:00
Storm Dragon
9da925c80d Fixed merge conflict. 2024-12-21 17:52:38 -05:00
Storm Dragon
9c45ca1b5f Fixed bug in Fenrir configuration tool. 2024-12-21 17:46:23 -05:00
Storm Dragon
d1be848ebb Merge branch 'testing' got rid of the scm dependency." 2024-12-20 14:11:51 -05:00
Storm Dragon
bc4319bf5e Forgot to get rid of the scm stuff since moving back to setup.py. 2024-12-20 14:08:25 -05:00
Storm Dragon
6f8139ed8f Change codename to stable for tag. 2024-12-20 13:33:23 -05:00
Storm Dragon
f1a6c75459 Merged setup fixes to master. Went back to setup.py just with some updates to minimize python's grumbling. Also, merged the locale setup. 2024-12-20 12:50:32 -05:00
Storm Dragon
1d746eb709 Minimal pyproject.tmol added. 2024-12-20 12:30:56 -05:00
Storm Dragon
80f549fde9 Hopefully final fix to setup. 2024-12-20 12:24:52 -05:00
Storm Dragon
9f57f7faec Revert back to setup.py because it worked. 2024-12-20 12:19:09 -05:00
Storm Dragon
099d49d670 maybe was over complicating things. 2024-12-20 12:00:23 -05:00
Storm Dragon
67b6c79678 Trying some debugging to figure out what's going wrong. 2024-12-20 11:43:43 -05:00
Storm Dragon
191181a6a5 This modern installation method is turning out to be a pita. 2024-12-20 11:32:26 -05:00
Storm Dragon
c77d2bddd8 Second attempt at placing files into correct directories. 2024-12-20 11:22:09 -05:00
Storm Dragon
90d8e62db0 Fixed a bug in setup.py. 2024-12-20 11:09:32 -05:00
Storm Dragon
d6a9332f80 Modernize installation. 2024-12-20 11:04:13 -05:00
Storm Dragon
55ce73322b File restructuring. 2024-12-20 10:09:07 -05:00
Storm Dragon
78ca59a938 Found non working unused python directory. Can add it back if needed. 2024-12-20 09:42:47 -05:00
Storm Dragon
dd52d08171 Copy translation files into place with setup. 2024-12-20 08:57:27 -05:00
Storm Dragon
29a2db0e0c Fixed a bug that required the -f flag in conjunction with -e to use pty. 2024-12-15 21:27:39 -05:00
Storm Dragon
b6201235e6 Removed the emacs speech driver. Also some cleanup missed from removing the old espeak driver that no longer worked. 2024-12-11 17:31:05 -05:00
Storm Dragon
f7584463e3 Changed default speech driver to speech-dispatcher. Lowered default speech rate a bit. 2024-12-11 08:46:22 -05:00
147 changed files with 4688 additions and 4759 deletions

View File

@ -46,28 +46,33 @@ _:===:Lienie unten
[customDict]
[emoticonDict]
# This dictionary uses regexp when prefixed with "regex;", so be sure to escape anything that would be parsed by regexp, e.g. *, ., ^, $, etc.
regex;[\s*|'|"][\s*|'|"]<{-.-}>:===:Raves
regex;[\s*|'|"][\s*|'|"]8-\):===:smile with sunglasses
regex;[\s*|'|"][\s*|'|"]:-/:===:confused
regex;[\s*|'|"][\s*|'|"]-\.-:===:bugged
regex;[\s*|'|"][\s*|'|"]>\.<:===:laughing
regex;[\s*|'|"][\s*|'|"]8-X:===:skull
regex;[\s*|'|"][\s*|'|"]>:\):===:evil smile
regex;[\s*|'|"][\s*|'|"]>:-\):===:evil smile
regex;[\s*|'|"][\s*|'|"]\\o/:===:Hurray
regex;[\s*|'|"][\s*|'|"]:/:===:confused
regex;[\s*|'|"][\s*|'|"]8\):===:smile with sunglasses
regex;[\s*|'|"]:D[\s*|'|"]:===:laugh
regex;[\s*|'|"];\)[\s*|'|"]:===:wink
regex;[\s*|'|"]XD[\s*|'|"]:===:LOL
regex;[\s*|'|"]:-\)[\s*|'|"]:===:smile
regex;[\s*|'|"]:\)[\s*|'|"]:===:smile
regex;[\s*|'|"]->[\s*|'|"]:===:arrow right
# example for arrow left
#(?:[ |^])(<-)(?:[ ,.!?$]):===:arrow left
# or
#([ |^])<-([ ,.!?$]):===:arrow left\2
regex;[\s*|'|"]<-[\s*|'|"]:===:arrow left
regex;[\s*|'|"][O|o][O|o][\s*|'|"]:===:WTF?
regex;[\s*|'|"]\^\^[\s*|'|"]:===:enjoy smile
regex;(?:^|\s)(?::-\)|:\))(?:\s|$):===:smile
regex;(?:^|\s)(?::-\(|:\()(?:\s|$):===:frown
regex;(?:^|\s)(?::-D|:D)(?:\s|$):===:big grin
regex;(?:^|\s)(?:;-\)|;\))(?:\s|$):===:wink
regex;(?:^|\s)(?::-P|:P)(?:\s|$):===:tongue out
regex;(?:^|\s)(?::-O|:O)(?:\s|$):===:surprised
regex;(?:^|\s)(?::-/|:/)(?:\s|$):===:skeptical
regex;(?:^|\s)(?:>:-\(|>:\()(?:\s|$):===:angry
regex;(?:^|\s)(?::'\(|:'-\()(?:\s|$):===:crying
regex;(?:^|\s)(?::-\||:\|)(?:\s|$):===:neutral
regex;(?:^|\s)(?:8-\)|B-\))(?:\s|$):===:cool
regex;(?:^|\s)8-X(?:\s|$):===:skull and crossbones
regex;(?:^|\s)(?:X-X|x-x)(?:\s|$):===:knocked out
regex;(?:^|\s)(?::-X|:-x|:X|:x)(?:\s|$):===:lips sealed
regex;(?:^|\s)XD(?:\s|$):===:laughing hard
regex;(?:^|\s)\^_\^(?:\s|$):===:happy
regex;(?:^|\s)-_-(?:\s|$):===:annoyed
regex;(?:^|\s)o_O(?:\s|$):===:confused
regex;(?:^|\s)>_<(?:\s|$):===:frustrated
regex;(?:^|\s)\\o/(?:\s|$):===:hurray
regex;(?:^|\s)<3(?:\s|$):===:heart
regex;(?:^|\s)</3(?:\s|$):===:broken heart
regex;(?:^|\s)(?:Oo|oO)(?:\s|$):===:WTF?
regex;(?:^|\s)<{-.-}>(?:\s|$):===:Raves
regex;(?:^|\s)-\.-(?:\s|$):===:bugged
regex;(?:^|\s)>\.<(?:\s|$):===:laughing
regex;(?:^|\s)(?:>:\)|>:-\))(?:\s|$):===:evil smile
regex;(?:^|\s)\^\^(?:\s|$):===:enjoy smile
regex;(?:^|\s)->(?:\s|$):===:arrow right
regex;(?:^|\s)<-(?:\s|$):===:arrow left

View File

@ -46,27 +46,33 @@ _:===:line
[customDict]
[emoticonDict]
# This dictionary uses regexp when prefixed with "regex;", so be sure to escape anything that would be parsed by regexp, e.g. *, ., ^, $, etc.
regex;[\s*|'|"][\s*|'|"]<{-.-}>:===:Raves
regex;[\s*|'|"][\s*|'|"]8-\):===:smile with sunglasses
regex;[\s*|'|"][\s*|'|"]:-/:===:confused
regex;[\s*|'|"][\s*|'|"]-\.-:===:bugged
regex;[\s*|'|"][\s*|'|"]>\.<:===:laughing
regex;[\s*|'|"][\s*|'|"]8-X:===:skull
regex;[\s*|'|"][\s*|'|"]>:\):===:evil smile
regex;[\s*|'|"][\s*|'|"]>:-\):===:evil smile
regex;[\s*|'|"][\s*|'|"]\\o/:===:Hurray
regex;[\s*|'|"][\s*|'|"]:/:===:confused
regex;[\s*|'|"]:D[\s*|'|"]:===:laugh
regex;[\s*|'|"];\)[\s*|'|"]:===:wink
regex;[\s*|'|"]XD[\s*|'|"]:===:LOL
regex;[\s*|'|"]:-\)[\s*|'|"]:===:smile
regex;[\s*|'|"]:\)[\s*|'|"]:===:smile
regex;[\s*|'|"]->[\s*|'|"]:===:arrow right
# example for arrow left
#(?:[ |^])(<-)(?:[ ,.!?$]):===:arrow left
# or
#([ |^])<-([ ,.!?$]):===:arrow left\2
regex;[\s*|'|"]<-[\s*|'|"]:===:arrow left
regex;[\s+|'|"](Oo)|(oO)[\s+|'|"]:===:WTF?
regex;[\s*|'|"]\^\^[\s*|'|"]:===:enjoy smile
regex;(?:^|\s)(?::-\)|:\))(?:\s|$):===:smile
regex;(?:^|\s)(?::-\(|:\()(?:\s|$):===:frown
regex;(?:^|\s)(?::-D|:D)(?:\s|$):===:big grin
regex;(?:^|\s)(?:;-\)|;\))(?:\s|$):===:wink
regex;(?:^|\s)(?::-P|:P)(?:\s|$):===:tongue out
regex;(?:^|\s)(?::-O|:O)(?:\s|$):===:surprised
regex;(?:^|\s)(?::-/|:/)(?:\s|$):===:skeptical
regex;(?:^|\s)(?:>:-\(|>:\()(?:\s|$):===:angry
regex;(?:^|\s)(?::'\(|:'-\()(?:\s|$):===:crying
regex;(?:^|\s)(?::-\||:\|)(?:\s|$):===:neutral
regex;(?:^|\s)(?:8-\)|B-\))(?:\s|$):===:cool
regex;(?:^|\s)8-X(?:\s|$):===:skull and crossbones
regex;(?:^|\s)(?:X-X|x-x)(?:\s|$):===:knocked out
regex;(?:^|\s)(?::-X|:-x|:X|:x)(?:\s|$):===:lips sealed
regex;(?:^|\s)XD(?:\s|$):===:laughing hard
regex;(?:^|\s)\^_\^(?:\s|$):===:happy
regex;(?:^|\s)-_-(?:\s|$):===:annoyed
regex;(?:^|\s)o_O(?:\s|$):===:confused
regex;(?:^|\s)>_<(?:\s|$):===:frustrated
regex;(?:^|\s)\\o/(?:\s|$):===:hurray
regex;(?:^|\s)<3(?:\s|$):===:heart
regex;(?:^|\s)</3(?:\s|$):===:broken heart
regex;(?:^|\s)(?:Oo|oO)(?:\s|$):===:WTF?
regex;(?:^|\s)<{-.-}>(?:\s|$):===:Raves
regex;(?:^|\s)-\.-(?:\s|$):===:bugged
regex;(?:^|\s)>\.<(?:\s|$):===:laughing
regex;(?:^|\s)(?:>:\)|>:-\))(?:\s|$):===:evil smile
regex;(?:^|\s)\^\^(?:\s|$):===:enjoy smile
regex;(?:^|\s)->(?:\s|$):===:arrow right
regex;(?:^|\s)<-(?:\s|$):===:arrow left

View File

@ -46,27 +46,33 @@ _:===:line
[customDict]
[emoticonDict]
# This dictionary uses regexp when prefixed with "regex;", so be sure to escape anything that would be parsed by regexp, e.g. *, ., ^, $, etc.
regex;[\s*|'|"][\s*|'|"]<{-.-}>:===:Raves
regex;[\s*|'|"][\s*|'|"]8-\):===:smile with sunglasses
regex;[\s*|'|"][\s*|'|"]:-/:===:confused
regex;[\s*|'|"][\s*|'|"]-\.-:===:bugged
regex;[\s*|'|"][\s*|'|"]>\.<:===:laughing
regex;[\s*|'|"][\s*|'|"]8-X:===:skull
regex;[\s*|'|"][\s*|'|"]>:\):===:evil smile
regex;[\s*|'|"][\s*|'|"]>:-\):===:evil smile
regex;[\s*|'|"][\s*|'|"]\\o/:===:Hurray
regex;[\s*|'|"][\s*|'|"]:/:===:confused
regex;[\s*|'|"]:D[\s*|'|"]:===:laugh
regex;[\s*|'|"];\)[\s*|'|"]:===:wink
regex;[\s*|'|"]XD[\s*|'|"]:===:LOL
regex;[\s*|'|"]:-\)[\s*|'|"]:===:smile
regex;[\s*|'|"]:\)[\s*|'|"]:===:smile
regex;[\s*|'|"]->[\s*|'|"]:===:arrow right
# example for arrow left
#(?:[ |^])(<-)(?:[ ,.!?$]):===:arrow left
# or
#([ |^])<-([ ,.!?$]):===:arrow left\2
regex;[\s*|'|"]<-[\s*|'|"]:===:arrow left
regex;[\s+|'|"][O|o][O|o][\s+|'|"]:===:WTF?
regex;[\s*|'|"]\^\^[\s*|'|"]:===:enjoy smile
regex;(?:^|\s)(?::-\)|:\))(?:\s|$):===:smile
regex;(?:^|\s)(?::-\(|:\()(?:\s|$):===:frown
regex;(?:^|\s)(?::-D|:D)(?:\s|$):===:big grin
regex;(?:^|\s)(?:;-\)|;\))(?:\s|$):===:wink
regex;(?:^|\s)(?::-P|:P)(?:\s|$):===:tongue out
regex;(?:^|\s)(?::-O|:O)(?:\s|$):===:surprised
regex;(?:^|\s)(?::-/|:/)(?:\s|$):===:skeptical
regex;(?:^|\s)(?:>:-\(|>:\()(?:\s|$):===:angry
regex;(?:^|\s)(?::'\(|:'-\()(?:\s|$):===:crying
regex;(?:^|\s)(?::-\||:\|)(?:\s|$):===:neutral
regex;(?:^|\s)(?:8-\)|B-\))(?:\s|$):===:cool
regex;(?:^|\s)8-X(?:\s|$):===:skull and crossbones
regex;(?:^|\s)(?:X-X|x-x)(?:\s|$):===:knocked out
regex;(?:^|\s)(?::-X|:-x|:X|:x)(?:\s|$):===:lips sealed
regex;(?:^|\s)XD(?:\s|$):===:laughing hard
regex;(?:^|\s)\^_\^(?:\s|$):===:happy
regex;(?:^|\s)-_-(?:\s|$):===:annoyed
regex;(?:^|\s)o_O(?:\s|$):===:confused
regex;(?:^|\s)>_<(?:\s|$):===:frustrated
regex;(?:^|\s)\\o/(?:\s|$):===:hurray
regex;(?:^|\s)<3(?:\s|$):===:heart
regex;(?:^|\s)</3(?:\s|$):===:broken heart
regex;(?:^|\s)(?:Oo|oO)(?:\s|$):===:WTF?
regex;(?:^|\s)<{-.-}>(?:\s|$):===:Raves
regex;(?:^|\s)-\.-(?:\s|$):===:bugged
regex;(?:^|\s)>\.<(?:\s|$):===:laughing
regex;(?:^|\s)(?:>:\)|>:-\))(?:\s|$):===:evil smile
regex;(?:^|\s)\^\^(?:\s|$):===:enjoy smile
regex;(?:^|\s)->(?:\s|$):===:arrow right
regex;(?:^|\s)<-(?:\s|$):===:arrow left

View File

@ -46,28 +46,33 @@ _:===:subrayado
[customDict]
[emoticonDict]
# This dictionary uses regexp when prefixed with "regex;", so be sure to escape anything that would be parsed by regexp, e.g. *, ., ^, $, etc.
regex;[\s*|'|"][\s*|'|"]<{-.-}>:===:Raves
regex;[\s*|'|"][\s*|'|"]8-\):===:smile with sunglasses
regex;[\s*|'|"][\s*|'|"]:-/:===:confused
regex;[\s*|'|"][\s*|'|"]-\.-:===:bugged
regex;[\s*|'|"][\s*|'|"]>\.<:===:laughing
regex;[\s*|'|"][\s*|'|"]8-X:===:skull
regex;[\s*|'|"][\s*|'|"]>:\):===:evil smile
regex;[\s*|'|"][\s*|'|"]>:-\):===:evil smile
regex;[\s*|'|"][\s*|'|"]\\o/:===:Hurray
regex;[\s*|'|"][\s*|'|"]:/:===:confused
regex;[\s*|'|"][\s*|'|"]8\):===:smile with sunglasses
regex;[\s*|'|"]:D[\s*|'|"]:===:laugh
regex;[\s*|'|"];\)[\s*|'|"]:===:wink
regex;[\s*|'|"]XD[\s*|'|"]:===:LOL
regex;[\s*|'|"]:-\)[\s*|'|"]:===:smile
regex;[\s*|'|"]:\)[\s*|'|"]:===:smile
regex;[\s*|'|"]->[\s*|'|"]:===:arrow right
# example for arrow left
#(?:[ |^])(<-)(?:[ ,.!?$]):===:arrow left
# or
#([ |^])<-([ ,.!?$]):===:arrow left\2
regex;[\s*|'|"]<-[\s*|'|"]:===:arrow left
regex;[\s*|'|"][O|o][O|o][\s*|'|"]:===:WTF?
regex;[\s*|'|"]\^\^[\s*|'|"]:===:enjoy smile
regex;(?:^|\s)(?::-\)|:\))(?:\s|$):===:smile
regex;(?:^|\s)(?::-\(|:\()(?:\s|$):===:frown
regex;(?:^|\s)(?::-D|:D)(?:\s|$):===:big grin
regex;(?:^|\s)(?:;-\)|;\))(?:\s|$):===:wink
regex;(?:^|\s)(?::-P|:P)(?:\s|$):===:tongue out
regex;(?:^|\s)(?::-O|:O)(?:\s|$):===:surprised
regex;(?:^|\s)(?::-/|:/)(?:\s|$):===:skeptical
regex;(?:^|\s)(?:>:-\(|>:\()(?:\s|$):===:angry
regex;(?:^|\s)(?::'\(|:'-\()(?:\s|$):===:crying
regex;(?:^|\s)(?::-\||:\|)(?:\s|$):===:neutral
regex;(?:^|\s)(?:8-\)|B-\))(?:\s|$):===:cool
regex;(?:^|\s)8-X(?:\s|$):===:skull and crossbones
regex;(?:^|\s)(?:X-X|x-x)(?:\s|$):===:knocked out
regex;(?:^|\s)(?::-X|:-x|:X|:x)(?:\s|$):===:lips sealed
regex;(?:^|\s)XD(?:\s|$):===:laughing hard
regex;(?:^|\s)\^_\^(?:\s|$):===:happy
regex;(?:^|\s)-_-(?:\s|$):===:annoyed
regex;(?:^|\s)o_O(?:\s|$):===:confused
regex;(?:^|\s)>_<(?:\s|$):===:frustrated
regex;(?:^|\s)\\o/(?:\s|$):===:hurray
regex;(?:^|\s)<3(?:\s|$):===:heart
regex;(?:^|\s)</3(?:\s|$):===:broken heart
regex;(?:^|\s)(?:Oo|oO)(?:\s|$):===:WTF?
regex;(?:^|\s)<{-.-}>(?:\s|$):===:Raves
regex;(?:^|\s)-\.-(?:\s|$):===:bugged
regex;(?:^|\s)>\.<(?:\s|$):===:laughing
regex;(?:^|\s)(?:>:\)|>:-\))(?:\s|$):===:evil smile
regex;(?:^|\s)\^\^(?:\s|$):===:enjoy smile
regex;(?:^|\s)->(?:\s|$):===:arrow right
regex;(?:^|\s)<-(?:\s|$):===:arrow left

View File

@ -46,28 +46,33 @@ _:===:souligné
[customDict]
[emoticonDict]
# This dictionary uses regexp when prefixed with "regex;", so be sure to escape anything that would be parsed by regexp, e.g. *, ., ^, $, etc.
regex;[\s*|'|"][\s*|'|"]<{-.-}>:===:Raves
regex;[\s*|'|"][\s*|'|"]8-\):===:smile with sunglasses
regex;[\s*|'|"][\s*|'|"]:-/:===:confused
regex;[\s*|'|"][\s*|'|"]-\.-:===:bugged
regex;[\s*|'|"][\s*|'|"]>\.<:===:laughing
regex;[\s*|'|"][\s*|'|"]8-X:===:skull
regex;[\s*|'|"][\s*|'|"]>:\):===:evil smile
regex;[\s*|'|"][\s*|'|"]>:-\):===:evil smile
regex;[\s*|'|"][\s*|'|"]\\o/:===:Hurray
regex;[\s*|'|"][\s*|'|"]:/:===:confused
regex;[\s*|'|"][\s*|'|"]8\):===:smile with sunglasses
regex;[\s*|'|"]:D[\s*|'|"]:===:laugh
regex;[\s*|'|"];\)[\s*|'|"]:===:wink
regex;[\s*|'|"]XD[\s*|'|"]:===:LOL
regex;[\s*|'|"]:-\)[\s*|'|"]:===:smile
regex;[\s*|'|"]:\)[\s*|'|"]:===:smile
regex;[\s*|'|"]->[\s*|'|"]:===:arrow right
# example for arrow left
#(?:[ |^])(<-)(?:[ ,.!?$]):===:arrow left
# or
#([ |^])<-([ ,.!?$]):===:arrow left\2
regex;[\s*|'|"]<-[\s*|'|"]:===:arrow left
regex;[\s*|'|"][O|o][O|o][\s*|'|"]:===:WTF?
regex;[\s*|'|"]\^\^[\s*|'|"]:===:enjoy smile
regex;(?:^|\s)(?::-\)|:\))(?:\s|$):===:smile
regex;(?:^|\s)(?::-\(|:\()(?:\s|$):===:frown
regex;(?:^|\s)(?::-D|:D)(?:\s|$):===:big grin
regex;(?:^|\s)(?:;-\)|;\))(?:\s|$):===:wink
regex;(?:^|\s)(?::-P|:P)(?:\s|$):===:tongue out
regex;(?:^|\s)(?::-O|:O)(?:\s|$):===:surprised
regex;(?:^|\s)(?::-/|:/)(?:\s|$):===:skeptical
regex;(?:^|\s)(?:>:-\(|>:\()(?:\s|$):===:angry
regex;(?:^|\s)(?::'\(|:'-\()(?:\s|$):===:crying
regex;(?:^|\s)(?::-\||:\|)(?:\s|$):===:neutral
regex;(?:^|\s)(?:8-\)|B-\))(?:\s|$):===:cool
regex;(?:^|\s)8-X(?:\s|$):===:skull and crossbones
regex;(?:^|\s)(?:X-X|x-x)(?:\s|$):===:knocked out
regex;(?:^|\s)(?::-X|:-x|:X|:x)(?:\s|$):===:lips sealed
regex;(?:^|\s)XD(?:\s|$):===:laughing hard
regex;(?:^|\s)\^_\^(?:\s|$):===:happy
regex;(?:^|\s)-_-(?:\s|$):===:annoyed
regex;(?:^|\s)o_O(?:\s|$):===:confused
regex;(?:^|\s)>_<(?:\s|$):===:frustrated
regex;(?:^|\s)\\o/(?:\s|$):===:hurray
regex;(?:^|\s)<3(?:\s|$):===:heart
regex;(?:^|\s)</3(?:\s|$):===:broken heart
regex;(?:^|\s)(?:Oo|oO)(?:\s|$):===:WTF?
regex;(?:^|\s)<{-.-}>(?:\s|$):===:Raves
regex;(?:^|\s)-\.-(?:\s|$):===:bugged
regex;(?:^|\s)>\.<(?:\s|$):===:laughing
regex;(?:^|\s)(?:>:\)|>:-\))(?:\s|$):===:evil smile
regex;(?:^|\s)\^\^(?:\s|$):===:enjoy smile
regex;(?:^|\s)->(?:\s|$):===:arrow right
regex;(?:^|\s)<-(?:\s|$):===:arrow left

View File

@ -46,28 +46,33 @@ _:===:podkreślnik
[customDict]
[emoticonDict]
# This dictionary uses regexp when prefixed with "regex;", so be sure to escape anything that would be parsed by regexp, e.g. *, ., ^, $, etc.
regex;[\s*|'|"][\s*|'|"]<{-.-}>:===:Raves
regex;[\s*|'|"][\s*|'|"]8-\):===:smile with sunglasses
regex;[\s*|'|"][\s*|'|"]:-/:===:confused
regex;[\s*|'|"][\s*|'|"]-\.-:===:bugged
regex;[\s*|'|"][\s*|'|"]>\.<:===:laughing
regex;[\s*|'|"][\s*|'|"]8-X:===:skull
regex;[\s*|'|"][\s*|'|"]>:\):===:evil smile
regex;[\s*|'|"][\s*|'|"]>:-\):===:evil smile
regex;[\s*|'|"][\s*|'|"]\\o/:===:Hurray
regex;[\s*|'|"][\s*|'|"]:/:===:confused
regex;[\s*|'|"][\s*|'|"]8\):===:smile with sunglasses
regex;[\s*|'|"]:D[\s*|'|"]:===:laugh
regex;[\s*|'|"];\)[\s*|'|"]:===:wink
regex;[\s*|'|"]XD[\s*|'|"]:===:LOL
regex;[\s*|'|"]:-\)[\s*|'|"]:===:smile
regex;[\s*|'|"]:\)[\s*|'|"]:===:smile
regex;[\s*|'|"]->[\s*|'|"]:===:arrow right
# example for arrow left
#(?:[ |^])(<-)(?:[ ,.!?$]):===:arrow left
# or
#([ |^])<-([ ,.!?$]):===:arrow left\2
regex;[\s*|'|"]<-[\s*|'|"]:===:arrow left
regex;[\s*|'|"][O|o][O|o][\s*|'|"]:===:WTF?
regex;[\s*|'|"]\^\^[\s*|'|"]:===:enjoy smile
regex;(?:^|\s)(?::-\)|:\))(?:\s|$):===:smile
regex;(?:^|\s)(?::-\(|:\()(?:\s|$):===:frown
regex;(?:^|\s)(?::-D|:D)(?:\s|$):===:big grin
regex;(?:^|\s)(?:;-\)|;\))(?:\s|$):===:wink
regex;(?:^|\s)(?::-P|:P)(?:\s|$):===:tongue out
regex;(?:^|\s)(?::-O|:O)(?:\s|$):===:surprised
regex;(?:^|\s)(?::-/|:/)(?:\s|$):===:skeptical
regex;(?:^|\s)(?:>:-\(|>:\()(?:\s|$):===:angry
regex;(?:^|\s)(?::'\(|:'-\()(?:\s|$):===:crying
regex;(?:^|\s)(?::-\||:\|)(?:\s|$):===:neutral
regex;(?:^|\s)(?:8-\)|B-\))(?:\s|$):===:cool
regex;(?:^|\s)8-X(?:\s|$):===:skull and crossbones
regex;(?:^|\s)(?:X-X|x-x)(?:\s|$):===:knocked out
regex;(?:^|\s)(?::-X|:-x|:X|:x)(?:\s|$):===:lips sealed
regex;(?:^|\s)XD(?:\s|$):===:laughing hard
regex;(?:^|\s)\^_\^(?:\s|$):===:happy
regex;(?:^|\s)-_-(?:\s|$):===:annoyed
regex;(?:^|\s)o_O(?:\s|$):===:confused
regex;(?:^|\s)>_<(?:\s|$):===:frustrated
regex;(?:^|\s)\\o/(?:\s|$):===:hurray
regex;(?:^|\s)<3(?:\s|$):===:heart
regex;(?:^|\s)</3(?:\s|$):===:broken heart
regex;(?:^|\s)(?:Oo|oO)(?:\s|$):===:WTF?
regex;(?:^|\s)<{-.-}>(?:\s|$):===:Raves
regex;(?:^|\s)-\.-(?:\s|$):===:bugged
regex;(?:^|\s)>\.<(?:\s|$):===:laughing
regex;(?:^|\s)(?:>:\)|>:-\))(?:\s|$):===:evil smile
regex;(?:^|\s)\^\^(?:\s|$):===:enjoy smile
regex;(?:^|\s)->(?:\s|$):===:arrow right
regex;(?:^|\s)<-(?:\s|$):===:arrow left

View File

@ -52,27 +52,33 @@ regex;(?i)shit:===:shitt
regex;(?i)slither:===:slitther
[emoticonDict]
# This dictionary uses regexp when prefixed with "regex;", so be sure to escape anything that would be parsed by regexp, e.g. *, ., ^, $, etc.
regex;[\s*|'|"][\s*|'|"]<{-.-}>:===:Raves
regex;[\s*|'|"][\s*|'|"]8-\):===:smile with sunglasses
regex;[\s*|'|"][\s*|'|"]:-/:===:confused
regex;[\s*|'|"][\s*|'|"]-\.-:===:bugged
regex;[\s*|'|"][\s*|'|"]>\.<:===:laughing
regex;[\s*|'|"][\s*|'|"]8-X:===:skull
regex;[\s*|'|"][\s*|'|"]>:\):===:evil smile
regex;[\s*|'|"][\s*|'|"]>:-\):===:evil smile
regex;[\s*|'|"][\s*|'|"]\\o/:===:Hurray
regex;[\s*|'|"][\s*|'|"]:/:===:confused
regex;[\s*|'|"]:D[\s*|'|"]:===:laugh
regex;[\s*|'|"];\)[\s*|'|"]:===:wink
regex;[\s*|'|"]XD[\s*|'|"]:===:LOL
regex;[\s*|'|"]:-\)[\s*|'|"]:===:smile
regex;[\s*|'|"]:\)[\s*|'|"]:===:smile
regex;[\s*|'|"]->[\s*|'|"]:===:arrow right
# example for arrow left
#(?:[ |^])(<-)(?:[ ,.!?$]):===:arrow left
# or
#([ |^])<-([ ,.!?$]):===:arrow left\2
regex;[\s*|'|"]<-[\s*|'|"]:===:arrow left
regex;[\s+|'|"][O|o][O|o][\s+|'|"]:===:WTF?
regex;[\s*|'|"]\^\^[\s*|'|"]:===:enjoy smile
regex;(?:^|\s)(?::-\)|:\))(?:\s|$):===:smile
regex;(?:^|\s)(?::-\(|:\()(?:\s|$):===:frown
regex;(?:^|\s)(?::-D|:D)(?:\s|$):===:big grin
regex;(?:^|\s)(?:;-\)|;\))(?:\s|$):===:wink
regex;(?:^|\s)(?::-P|:P)(?:\s|$):===:tongue out
regex;(?:^|\s)(?::-O|:O)(?:\s|$):===:surprised
regex;(?:^|\s)(?::-/|:/)(?:\s|$):===:skeptical
regex;(?:^|\s)(?:>:-\(|>:\()(?:\s|$):===:angry
regex;(?:^|\s)(?::'\(|:'-\()(?:\s|$):===:crying
regex;(?:^|\s)(?::-\||:\|)(?:\s|$):===:neutral
regex;(?:^|\s)(?:8-\)|B-\))(?:\s|$):===:cool
regex;(?:^|\s)8-X(?:\s|$):===:skull and crossbones
regex;(?:^|\s)(?:X-X|x-x)(?:\s|$):===:knocked out
regex;(?:^|\s)(?::-X|:-x|:X|:x)(?:\s|$):===:lips sealed
regex;(?:^|\s)XD(?:\s|$):===:laughing hard
regex;(?:^|\s)\^_\^(?:\s|$):===:happy
regex;(?:^|\s)-_-(?:\s|$):===:annoyed
regex;(?:^|\s)o_O(?:\s|$):===:confused
regex;(?:^|\s)>_<(?:\s|$):===:frustrated
regex;(?:^|\s)\\o/(?:\s|$):===:hurray
regex;(?:^|\s)<3(?:\s|$):===:heart
regex;(?:^|\s)</3(?:\s|$):===:broken heart
regex;(?:^|\s)(?:Oo|oO)(?:\s|$):===:WTF?
regex;(?:^|\s)<{-.-}>(?:\s|$):===:Raves
regex;(?:^|\s)-\.-(?:\s|$):===:bugged
regex;(?:^|\s)>\.<(?:\s|$):===:laughing
regex;(?:^|\s)(?:>:\)|>:-\))(?:\s|$):===:evil smile
regex;(?:^|\s)\^\^(?:\s|$):===:enjoy smile
regex;(?:^|\s)->(?:\s|$):===:arrow right
regex;(?:^|\s)<-(?:\s|$):===:arrow left

View File

@ -33,14 +33,11 @@ genericFrequencyCommand=play -q -v fenrirVolume -n -c1 synth fenrirDuration sine
enabled=True
# Select speech driver, options are speechdDriver or genericDriver:
#driver=speechdDriver
driver=genericDriver
# server path for emacspeak
# serverPath=
driver=speechdDriver
#driver=genericDriver
# The rate selects how fast Fenrir will speak. Options range from 0, slowest, to 1.0, fastest.
rate=0.65
rate=0.5
# Pitch controls the pitch of the voice, select from 0, lowest, to 1.0, highest.
pitch=0.5

View File

@ -3,5 +3,6 @@ daemonize>=2.5.0
dbus-python>=1.2.8
pyudev>=0.21.0
pexpect
pyttsx3
ppyperclip
pyte>=0.7.0
rapidfuzz>=2.0.0

View File

@ -1,21 +1,29 @@
#!/usr/bin/env python3
#https://python-packaging.readthedocs.io/en/latest/minimal.html
import os, glob, sys
import os.path
from shutil import copyfile
from setuptools import find_packages
from setuptools import find_namespace_packages
from setuptools import setup
fenrirVersion = '1.9.9'
packageVersion = 'post1'
# handle flags for package manager like aurman and pacaur.
forceSettings = False
# Allow both environment variable and command line flag
forceSettingsFlag = (
"--force-settings" in sys.argv or
os.environ.get('FENRIR_FORCE_SETTINGS') == '1'
)
if "--force-settings" in sys.argv:
forceSettings = True
sys.argv.remove("--force-settings")
data_files = []
dataFiles = []
# Handle locale files
localeFiles = glob.glob('locale/*/LC_MESSAGES/*.mo')
for localeFile in localeFiles:
lang = localeFile.split(os.sep)[1]
destDir = f'/usr/share/locale/{lang}/LC_MESSAGES'
dataFiles.append((destDir, [localeFile]))
# Handle other configuration files
directories = glob.glob('config/*')
for directory in directories:
files = glob.glob(directory+'/*')
@ -26,25 +34,25 @@ for directory in directories:
destDir = '/etc/fenrirscreenreader/keyboard'
elif 'config/settings' in directory:
destDir = '/etc/fenrirscreenreader/settings'
if not forceSettings:
if not forceSettingsFlag:
try:
del(files[files.index('config/settings/settings.conf')])
files = [f for f in files if not f.endswith('settings.conf')]
except:
pass
elif 'config/scripts' in directory:
destDir = '/usr/share/fenrirscreenreader/scripts'
if destDir != '':
data_files.append((destDir, files))
dataFiles.append((destDir, files))
files = glob.glob('config/sound/default/*')
destDir = '/usr/share/sounds/fenrirscreenreader/default'
data_files.append((destDir, files))
dataFiles.append((destDir, files))
files = glob.glob('config/sound//template/*')
destDir = '/usr/share/sounds/fenrirscreenreader/template'
data_files.append((destDir, files))
dataFiles.append((destDir, files))
files = glob.glob('tools/*')
data_files.append(('/usr/share/fenrirscreenreader/tools', files))
data_files.append(('/usr/share/man/man1', ['docs/fenrir.1']))
dataFiles.append(('/usr/share/fenrirscreenreader/tools', files))
dataFiles.append(('/usr/share/man/man1', ['docs/fenrir.1']))
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
@ -52,15 +60,13 @@ def read(fname):
setup(
# Application name:
name="fenrir-screenreader",
# Version number:
version=fenrirVersion + '.' + packageVersion,
# description
description="A TTY Screen Reader for Linux.",
long_description=read('README.md'),
long_description_content_type="text/markdown",
keywords=['screenreader', 'a11y', 'accessibility', 'terminal', 'TTY', 'console'],
license="License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
url="https://git.stormux.org/storm/fenrir/",
download_url = 'https://git.stormux.org/storm/fenrir/archive/' + fenrirVersion + '.tar.gz',
classifiers=[
"Programming Language :: Python",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
@ -74,31 +80,35 @@ setup(
author_email="storm_dragon@stormux.org",
# Packages
packages=find_packages('src/'),
package_dir={'': 'src/'},
package_dir={'': 'src'},
packages=find_namespace_packages(
where='src',
include=['fenrirscreenreader*']
),
scripts=['src/fenrir'],
# Include additional files into the package
include_package_data=True,
zip_safe=False,
data_files=data_files,
data_files=dataFiles,
# Dependent packages (distributions)
python_requires='>=3.6',
install_requires=[
"evdev>=1.1.2",
"daemonize>=2.5.0",
"dbus-python>=1.2.8",
"pyperclip",
"pyudev>=0.21.0",
"rapidfuzz>=2.0.0",
"setuptools",
"pexpect",
"pyttsx3",
"pyte>=0.7.0",
],
)
if not forceSettings:
if not forceSettingsFlag:
print('')
# create settings file from example if not exist
if not os.path.isfile('/etc/fenrirscreenreader/settings/settings.conf'):

View File

@ -98,7 +98,7 @@ def main():
argumentParser.error(errorMsg)
sys.exit(1)
if cliArgs.foreground:
if cliArgs.foreground or cliArgs.emulated_pty:
# Run directly in foreground
run_fenrir()
else:

View File

@ -1,21 +1,21 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No description found'
def run(self):
pass
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No description found'
def run(self):
pass
def setCallback(self, callback):
pass

View File

@ -1,26 +1,26 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
# this command is just to initialize stuff.
# like init index lists in memoryManager
# it is not useful to execute it
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
# clipboard
self.env['runtime']['memoryManager'].addIndexList('clipboardHistory', self.env['runtime']['settingsManager'].getSettingAsInt('general', 'numberOfClipboards'))
def shutdown(self):
pass
def getDescription(self):
return 'No description found'
def run(self):
pass
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
# this command is just to initialize stuff.
# like init index lists in memoryManager
# it is not useful to execute it
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
# clipboard
self.env['runtime']['memoryManager'].addIndexList('clipboardHistory', self.env['runtime']['settingsManager'].getSettingAsInt('general', 'numberOfClipboards'))
def shutdown(self):
pass
def getDescription(self):
return 'No description found'
def run(self):
pass
def setCallback(self, callback):
pass

View File

@ -1,30 +1,30 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import screen_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Reads attributes of current cursor position')
def run(self):
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
try:
attributes = self.env['runtime']['attributeManager'].getAttributeByXY( cursorPos['x'], cursorPos['y'])
except Exception as e:
print(e)
attributeFormatString = self.env['runtime']['settingsManager'].getSetting('general', 'attributeFormatString')
attributeFormatString = self.env['runtime']['attributeManager'].formatAttributes(attributes, attributeFormatString)
self.env['runtime']['outputManager'].presentText(attributeFormatString, soundIcon='', interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import screen_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Reads attributes of current cursor position')
def run(self):
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
try:
attributes = self.env['runtime']['attributeManager'].getAttributeByXY( cursorPos['x'], cursorPos['y'])
except Exception as e:
print(e)
attributeFormatString = self.env['runtime']['settingsManager'].getSetting('general', 'attributeFormatString')
attributeFormatString = self.env['runtime']['attributeManager'].formatAttributes(attributes, attributeFormatString)
self.env['runtime']['outputManager'].presentText(attributeFormatString, soundIcon='', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,24 +1,24 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('clears the currently selected clipboard')
def run(self):
self.env['runtime']['memoryManager'].clearCurrentIndexList('clipboardHistory')
self.env['runtime']['outputManager'].presentText(_('clipboard cleared'), interrupt=True)
return
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('clears the currently selected clipboard')
def run(self):
self.env['runtime']['memoryManager'].clearCurrentIndexList('clipboardHistory')
self.env['runtime']['outputManager'].presentText(_('clipboard cleared'), interrupt=True)
return
def setCallback(self, callback):
pass

View File

@ -1,27 +1,27 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('speaks the contents of the currently selected clipboard')
def run(self):
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
self.env['runtime']['outputManager'].presentText(clipboard , interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('speaks the contents of the currently selected clipboard')
def run(self):
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
self.env['runtime']['outputManager'].presentText(clipboard , interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,26 +1,26 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('reads the contents of the current screen')
def run(self):
if self.env['screen']['newContentText'].isspace():
self.env['runtime']['outputManager'].presentText(_("screen is empty"), soundIcon='EmptyLine', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText(self.env['screen']['newContentText'],interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('reads the contents of the current screen')
def run(self):
if self.env['screen']['newContentText'].isspace():
self.env['runtime']['outputManager'].presentText(_("screen is empty"), soundIcon='EmptyLine', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText(self.env['screen']['newContentText'],interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,25 +1,25 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Column number for cursor')
def run(self):
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
self.env['runtime']['outputManager'].presentText(str(cursorPos['x'] + 1) , interrupt=True)
self.env['runtime']['outputManager'].announceActiveCursor()
self.env['runtime']['outputManager'].presentText(' column number' , interrupt=False)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Column number for cursor')
def run(self):
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
self.env['runtime']['outputManager'].presentText(str(cursorPos['x'] + 1) , interrupt=True)
self.env['runtime']['outputManager'].announceActiveCursor()
self.env['runtime']['outputManager'].presentText(' column number' , interrupt=False)
def setCallback(self, callback):
pass

View File

@ -1,25 +1,25 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Line number for cursor')
def run(self):
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
self.env['runtime']['outputManager'].presentText(str(cursorPos['y'] + 1), interrupt=True)
self.env['runtime']['outputManager'].announceActiveCursor()
self.env['runtime']['outputManager'].presentText(' line number' , interrupt=False)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Line number for cursor')
def run(self):
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
self.env['runtime']['outputManager'].presentText(str(cursorPos['y'] + 1), interrupt=True)
self.env['runtime']['outputManager'].announceActiveCursor()
self.env['runtime']['outputManager'].presentText(' line number' , interrupt=False)
def setCallback(self, callback):
pass

View File

@ -1,30 +1,30 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import datetime
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('presents the date')
def run(self):
dateFormat = self.env['runtime']['settingsManager'].getSetting('general', 'dateFormat')
# get the time formatted
dateString = datetime.datetime.strftime(datetime.datetime.now(), dateFormat)
# present the time via speak and braile, there is no soundicon, interrupt the current speech
self.env['runtime']['outputManager'].presentText(dateString , soundIcon='', interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import datetime
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('presents the date')
def run(self):
dateFormat = self.env['runtime']['settingsManager'].getSetting('general', 'dateFormat')
# get the time formatted
dateString = datetime.datetime.strftime(datetime.datetime.now(), dateFormat)
# present the time via speak and braile, there is no soundicon, interrupt the current speech
self.env['runtime']['outputManager'].presentText(dateString , soundIcon='', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,33 +1,33 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import math
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('decrease sound volume')
def run(self):
value = self.env['runtime']['settingsManager'].getSettingAsFloat('sound', 'volume')
value = round((math.ceil(10 * value) / 10) - 0.1, 2)
if value < 0.1:
value = 0.1
self.env['runtime']['settingsManager'].setSetting('sound', 'volume', str(value))
self.env['runtime']['outputManager'].presentText(_("{0} percent sound volume").format(int(value * 100)), soundIcon='SoundOff', interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import math
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('decrease sound volume')
def run(self):
value = self.env['runtime']['settingsManager'].getSettingAsFloat('sound', 'volume')
value = round((math.ceil(10 * value) / 10) - 0.1, 2)
if value < 0.1:
value = 0.1
self.env['runtime']['settingsManager'].setSetting('sound', 'volume', str(value))
self.env['runtime']['outputManager'].presentText(_("{0} percent sound volume").format(int(value * 100)), soundIcon='SoundOff', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,29 +1,29 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import math
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Decreases the pitch of the speech')
def run(self):
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'pitch')
value = round((math.ceil(10 * value) / 10) - 0.1, 2)
if value < 0.0:
value = 0.0
self.env['runtime']['settingsManager'].setSetting('speech', 'pitch', str(value))
self.env['runtime']['outputManager'].presentText(_('{0} percent speech pitch').format(int(value * 100)), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import math
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Decreases the pitch of the speech')
def run(self):
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'pitch')
value = round((math.ceil(10 * value) / 10) - 0.1, 2)
if value < 0.0:
value = 0.0
self.env['runtime']['settingsManager'].setSetting('speech', 'pitch', str(value))
self.env['runtime']['outputManager'].presentText(_('{0} percent speech pitch').format(int(value * 100)), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,30 +1,30 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import math
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Decreases the rate of the speech')
def run(self):
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'rate')
value = round((math.ceil(10 * value) / 10) - 0.1, 2)
if value < 0.0:
value = 0.0
self.env['runtime']['settingsManager'].setSetting('speech', 'rate', str(value))
self.env['runtime']['outputManager'].presentText(_("{0} percent speech rate").format(int(value * 100)), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import math
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Decreases the rate of the speech')
def run(self):
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'rate')
value = round((math.ceil(10 * value) / 10) - 0.1, 2)
if value < 0.0:
value = 0.0
self.env['runtime']['settingsManager'].setSetting('speech', 'rate', str(value))
self.env['runtime']['outputManager'].presentText(_("{0} percent speech rate").format(int(value * 100)), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,31 +1,31 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import math
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Decreases the volume of the speech')
def run(self):
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'volume')
value = round((math.ceil(10 * value) / 10) - 0.1, 2)
if value < 0.1:
value = 0.1
self.env['runtime']['settingsManager'].setSetting('speech', 'volume', str(value))
self.env['runtime']['outputManager'].presentText(_("{0} percent speech volume").format(int(value * 100)), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import math
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Decreases the volume of the speech')
def run(self):
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'volume')
value = round((math.ceil(10 * value) / 10) - 0.1, 2)
if value < 0.1:
value = 0.1
self.env['runtime']['settingsManager'].setSetting('speech', 'volume', str(value))
self.env['runtime']['outputManager'].presentText(_("{0} percent speech volume").format(int(value * 100)), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,28 +1,28 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('exits review mode')
def run(self):
if not self.env['runtime']['cursorManager'].isReviewMode():
self.env['runtime']['outputManager'].presentText(_("Not in Review Mode"), interrupt=True)
return
self.env['runtime']['cursorManager'].clearReviewCursor()
self.env['runtime']['outputManager'].presentText(_("Exiting Review Mode"), interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('exits review mode')
def run(self):
if not self.env['runtime']['cursorManager'].isReviewMode():
self.env['runtime']['outputManager'].presentText(_("Not in Review Mode"), interrupt=True)
return
self.env['runtime']['cursorManager'].clearReviewCursor()
self.env['runtime']['outputManager'].presentText(_("Exiting Review Mode"), interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,39 +1,39 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import os
class command():
def __init__(self):
pass
def initialize(self, environment, scriptPath=''):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('export the current fenrir clipboard to a file')
def run(self):
clipboardFilePath = self.env['runtime']['settingsManager'].getSetting('general', 'clipboardExportPath')
clipboardFilePath = clipboardFilePath.replace('$user',self.env['general']['currUser'])
clipboardFilePath = clipboardFilePath.replace('$USER',self.env['general']['currUser'])
clipboardFilePath = clipboardFilePath.replace('$User',self.env['general']['currUser'])
clipboardFile = open(clipboardFilePath,'w')
try:
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
clipboardFile.write(clipboard)
clipboardFile.close()
os.chmod(clipboardFilePath, 0o666)
self.env['runtime']['outputManager'].presentText(_('clipboard exported to file'), interrupt=True)
except Exception as e:
self.env['runtime']['debug'].writeDebugOut('export_clipboard_to_file:run: Filepath:'+ clipboardFile +' trace:' + str(e),debug.debugLevel.ERROR)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import os
class command():
def __init__(self):
pass
def initialize(self, environment, scriptPath=''):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('export the current fenrir clipboard to a file')
def run(self):
clipboardFilePath = self.env['runtime']['settingsManager'].getSetting('general', 'clipboardExportPath')
clipboardFilePath = clipboardFilePath.replace('$user',self.env['general']['currUser'])
clipboardFilePath = clipboardFilePath.replace('$USER',self.env['general']['currUser'])
clipboardFilePath = clipboardFilePath.replace('$User',self.env['general']['currUser'])
clipboardFile = open(clipboardFilePath,'w')
try:
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
clipboardFile.write(clipboard)
clipboardFile.close()
os.chmod(clipboardFilePath, 0o666)
self.env['runtime']['outputManager'].presentText(_('clipboard exported to file'), interrupt=True)
except Exception as e:
self.env['runtime']['debug'].writeDebugOut('export_clipboard_to_file:run: Filepath:'+ clipboardFile +' trace:' + str(e),debug.debugLevel.ERROR)
def setCallback(self, callback):
pass

View File

@ -1,77 +1,69 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import subprocess, os
from subprocess import Popen, PIPE
import _thread
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Export current fenrir clipboard to X or GUI clipboard')
def run(self):
_thread.start_new_thread(self._threadRun , ())
def _threadRun(self):
try:
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
user = self.env['general']['currUser']
# First try to find xclip in common locations
xclip_paths = [
'/usr/bin/xclip',
'/bin/xclip',
'/usr/local/bin/xclip'
]
xclip_path = None
for path in xclip_paths:
if os.path.isfile(path) and os.access(path, os.X_OK):
xclip_path = path
break
if not xclip_path:
self.env['runtime']['outputManager'].presentText(
'xclip not found in common locations',
interrupt=True
)
return
for display in range(10):
p = Popen(
['su', user, '-p', '-c', f"{xclip_path} -d :{display} -selection clipboard"],
stdin=PIPE, stdout=PIPE, stderr=PIPE, preexec_fn=os.setpgrp
)
stdout, stderr = p.communicate(input=clipboard.encode('utf-8'))
self.env['runtime']['outputManager'].interruptOutput()
stderr = stderr.decode('utf-8')
stdout = stdout.decode('utf-8')
if stderr == '':
break
if stderr != '':
self.env['runtime']['outputManager'].presentText(stderr, soundIcon='', interrupt=False)
else:
self.env['runtime']['outputManager'].presentText('exported to the X session.', interrupt=True)
except Exception as e:
self.env['runtime']['outputManager'].presentText(str(e), soundIcon='', interrupt=False)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import os
import _thread
import pyperclip
class command():
def __init__(self):
pass
def initialize(self, environment, scriptPath=''):
self.env = environment
self.scriptPath = scriptPath
def shutdown(self):
pass
def getDescription(self):
return _('Export current fenrir clipboard to X or GUI clipboard')
def run(self):
_thread.start_new_thread(self._threadRun , ())
def _threadRun(self):
try:
# Check if clipboard is empty
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
# Get current clipboard content
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
# Remember original display environment variable if it exists
originalDisplay = os.environ.get('DISPLAY', '')
success = False
# Try different display options
for i in range(10):
display = f":{i}"
try:
# Set display environment variable
os.environ['DISPLAY'] = display
# Attempt to set clipboard content
pyperclip.copy(clipboard)
# If we get here without exception, we found a working display
success = True
break
except Exception:
# Failed for this display, try next one
continue
# Restore original display setting
if originalDisplay:
os.environ['DISPLAY'] = originalDisplay
else:
os.environ.pop('DISPLAY', None)
# Notify the user of the result
if success:
self.env['runtime']['outputManager'].presentText(_('exported to the X session.'), interrupt=True)
else:
self.env['runtime']['outputManager'].presentText(_('failed to export to X clipboard. No available display found.'), interrupt=True)
except Exception as e:
self.env['runtime']['outputManager'].presentText(str(e), soundIcon='', interrupt=False)
def setCallback(self, callback):
pass

View File

@ -1,28 +1,28 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('selects the first clipboard')
def run(self):
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
self.env['runtime']['memoryManager'].setFirstIndex('clipboardHistory')
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
self.env['runtime']['outputManager'].presentText(clipboard, interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('selects the first clipboard')
def run(self):
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
self.env['runtime']['memoryManager'].setFirstIndex('clipboardHistory')
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
self.env['runtime']['outputManager'].presentText(clipboard, interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,24 +1,24 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('sends the following keypress to the terminal or application')
def run(self):
self.env['input']['keyForeward'] = 3
self.env['runtime']['outputManager'].presentText(_('Forward next keypress'), interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('sends the following keypress to the terminal or application')
def run(self):
self.env['input']['keyForeward'] = 3
self.env['runtime']['outputManager'].presentText(_('Forward next keypress'), interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,54 +1,62 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import subprocess, os
from subprocess import Popen, PIPE
import _thread
class command():
def __init__(self):
pass
def initialize(self, environment, scriptPath=''):
self.env = environment
self.scriptPath = scriptPath
def shutdown(self):
pass
def getDescription(self):
return _("imports the graphical clipboard to Fenrir's clipboard")
def run(self):
_thread.start_new_thread(self._threadRun , ())
def _threadRun(self):
try:
# Find xclip path
xclip_paths = ['/usr/bin/xclip', '/bin/xclip', '/usr/local/bin/xclip']
xclip_path = None
for path in xclip_paths:
if os.path.isfile(path) and os.access(path, os.X_OK):
xclip_path = path
break
if not xclip_path:
self.env['runtime']['outputManager'].presentText('xclip not found in common locations', interrupt=True)
return
xClipboard = ''
for display in range(10):
p = Popen('su ' + self.env['general']['currUser'] + ' -p -c "' + xclip_path + ' -d :' + str(display) + ' -o"', stdout=PIPE, stderr=PIPE, shell=True)
stdout, stderr = p.communicate()
self.env['runtime']['outputManager'].interruptOutput()
stderr = stderr.decode('utf-8')
xClipboard = stdout.decode('utf-8')
if (stderr == ''):
break
if stderr != '':
self.env['runtime']['outputManager'].presentText(stderr , soundIcon='', interrupt=False)
else:
self.env['runtime']['memoryManager'].addValueToFirstIndex('clipboardHistory', xClipboard)
self.env['runtime']['outputManager'].presentText('Import to Clipboard', soundIcon='CopyToClipboard', interrupt=True)
self.env['runtime']['outputManager'].presentText(xClipboard, soundIcon='', interrupt=False)
except Exception as e:
self.env['runtime']['outputManager'].presentText(e , soundIcon='', interrupt=False)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import _thread
import pyperclip
import os
class command():
def __init__(self):
pass
def initialize(self, environment, scriptPath=''):
self.env = environment
self.scriptPath = scriptPath
def shutdown(self):
pass
def getDescription(self):
return _("imports the graphical clipboard to Fenrir's clipboard")
def run(self):
_thread.start_new_thread(self._threadRun , ())
def _threadRun(self):
try:
# Remember original display environment variable if it exists
originalDisplay = os.environ.get('DISPLAY', '')
clipboardContent = None
# Try different display options
for i in range(10):
display = f":{i}"
try:
# Set display environment variable
os.environ['DISPLAY'] = display
# Attempt to get clipboard content
clipboardContent = pyperclip.paste()
# If we get here without exception, we found a working display
if clipboardContent:
break
except Exception:
# Failed for this display, try next one
continue
# Restore original display setting
if originalDisplay:
os.environ['DISPLAY'] = originalDisplay
else:
os.environ.pop('DISPLAY', None)
# Process the clipboard content if we found any
if clipboardContent and isinstance(clipboardContent, str):
self.env['runtime']['memoryManager'].addValueToFirstIndex('clipboardHistory', clipboardContent)
self.env['runtime']['outputManager'].presentText('Import to Clipboard', soundIcon='CopyToClipboard', interrupt=True)
self.env['runtime']['outputManager'].presentText(clipboardContent, soundIcon='', interrupt=False)
else:
self.env['runtime']['outputManager'].presentText('No text found in clipboard or no accessible display', interrupt=True)
except Exception as e:
self.env['runtime']['outputManager'].presentText(str(e), soundIcon='', interrupt=False)
def setCallback(self, callback):
pass

View File

@ -1,32 +1,32 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import math
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('adjusts the volume for in coming sounds')
def run(self):
value = self.env['runtime']['settingsManager'].getSettingAsFloat('sound', 'volume')
value = round((math.ceil(10 * value) / 10) + 0.1, 2)
if value > 1.0:
value = 1.0
self.env['runtime']['settingsManager'].setSetting('sound', 'volume', str(value))
self.env['runtime']['outputManager'].presentText(_("{0} percent sound volume").format(int(value * 100)), soundIcon='SoundOn', interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import math
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('adjusts the volume for in coming sounds')
def run(self):
value = self.env['runtime']['settingsManager'].getSettingAsFloat('sound', 'volume')
value = round((math.ceil(10 * value) / 10) + 0.1, 2)
if value > 1.0:
value = 1.0
self.env['runtime']['settingsManager'].setSetting('sound', 'volume', str(value))
self.env['runtime']['outputManager'].presentText(_("{0} percent sound volume").format(int(value * 100)), soundIcon='SoundOn', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,30 +1,30 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import math
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Increases the pitch of the speech')
def run(self):
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'pitch')
value = round((math.ceil(10 * value) / 10) + 0.1, 2)
if value > 1.0:
value = 1.0
self.env['runtime']['settingsManager'].setSetting('speech', 'pitch', str(value))
self.env['runtime']['outputManager'].presentText(_("{0} percent speech pitch").format(int(value * 100)), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import math
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Increases the pitch of the speech')
def run(self):
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'pitch')
value = round((math.ceil(10 * value) / 10) + 0.1, 2)
if value > 1.0:
value = 1.0
self.env['runtime']['settingsManager'].setSetting('speech', 'pitch', str(value))
self.env['runtime']['outputManager'].presentText(_("{0} percent speech pitch").format(int(value * 100)), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,30 +1,30 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import math
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Increase the speech rate')
def run(self):
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'rate')
value = round((math.ceil(10 * value) / 10) + 0.1, 2)
if value > 1.0:
value = 1.0
self.env['runtime']['settingsManager'].setSetting('speech', 'rate', str(value))
self.env['runtime']['outputManager'].presentText(_("{0} percent speech rate").format(int(value * 100)), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import math
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Increase the speech rate')
def run(self):
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'rate')
value = round((math.ceil(10 * value) / 10) + 0.1, 2)
if value > 1.0:
value = 1.0
self.env['runtime']['settingsManager'].setSetting('speech', 'rate', str(value))
self.env['runtime']['outputManager'].presentText(_("{0} percent speech rate").format(int(value * 100)), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,30 +1,30 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import math
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Increase the speech volume')
def run(self):
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'volume')
value = round((math.ceil(10 * value) / 10) + 0.1, 2)
if value > 1.0:
value = 1.0
self.env['runtime']['settingsManager'].setSetting('speech', 'volume', str(value))
self.env['runtime']['outputManager'].presentText(_("{0} percent speech volume").format(int(value * 100)), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import math
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Increase the speech volume')
def run(self):
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'volume')
value = round((math.ceil(10 * value) / 10) + 0.1, 2)
if value > 1.0:
value = 1.0
self.env['runtime']['settingsManager'].setSetting('speech', 'volume', str(value))
self.env['runtime']['outputManager'].presentText(_("{0} percent speech volume").format(int(value * 100)), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,28 +1,28 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('selects the last clipboard')
def run(self):
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
self.env['runtime']['memoryManager'].setLastIndex('clipboardHistory')
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
self.env['runtime']['outputManager'].presentText(clipboard, interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('selects the last clipboard')
def run(self):
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
self.env['runtime']['memoryManager'].setLastIndex('clipboardHistory')
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
self.env['runtime']['outputManager'].presentText(clipboard, interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,23 +1,23 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Presents the text which was last received')
def run(self):
self.env['runtime']['outputManager'].presentText(self.env['screen']['newDelta'], interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Presents the text which was last received')
def run(self):
self.env['runtime']['outputManager'].presentText(self.env['screen']['newDelta'], interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,36 +1,36 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('selects the next clipboard')
def run(self):
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
self.env['runtime']['memoryManager'].getNextIndex('clipboardHistory')
isFirst = self.env['runtime']['memoryManager'].isFirstIndex('clipboardHistory')
isLast = self.env['runtime']['memoryManager'].isLastIndex('clipboardHistory')
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
if isFirst:
self.env['runtime']['outputManager'].presentText(_('First clipboard '), interrupt=True)
if isLast:
self.env['runtime']['outputManager'].presentText(_('Last clipboard '), interrupt=True)
speechInterrupt = not(isLast or isFirst)
self.env['runtime']['outputManager'].presentText(clipboard, interrupt = speechInterrupt)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('selects the next clipboard')
def run(self):
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
self.env['runtime']['memoryManager'].getNextIndex('clipboardHistory')
isFirst = self.env['runtime']['memoryManager'].isFirstIndex('clipboardHistory')
isLast = self.env['runtime']['memoryManager'].isLastIndex('clipboardHistory')
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
if isFirst:
self.env['runtime']['outputManager'].presentText(_('First clipboard '), interrupt=True)
if isLast:
self.env['runtime']['outputManager'].presentText(_('Last clipboard '), interrupt=True)
speechInterrupt = not(isLast or isFirst)
self.env['runtime']['outputManager'].presentText(clipboard, interrupt = speechInterrupt)
def setCallback(self, callback):
pass

View File

@ -1,30 +1,30 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import time
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
self.env['runtime']['memoryManager'].addIndexList('clipboardHistory', self.env['runtime']['settingsManager'].getSettingAsInt('general', 'numberOfClipboards'))
def shutdown(self):
pass
def getDescription(self):
return _('pastes the text from the currently selected clipboard')
def run(self):
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
self.env['runtime']['outputManager'].presentText('paste clipboard', soundIcon='PasteClipboardOnScreen', interrupt=True)
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
self.env['runtime']['screenManager'].injectTextToScreen(clipboard)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import time
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
self.env['runtime']['memoryManager'].addIndexList('clipboardHistory', self.env['runtime']['settingsManager'].getSettingAsInt('general', 'numberOfClipboards'))
def shutdown(self):
pass
def getDescription(self):
return _('pastes the text from the currently selected clipboard')
def run(self):
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
self.env['runtime']['outputManager'].presentText('paste clipboard', soundIcon='PasteClipboardOnScreen', interrupt=True)
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
self.env['runtime']['screenManager'].injectTextToScreen(clipboard)
def setCallback(self, callback):
pass

View File

@ -1,35 +1,35 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('selects the previous clipboard')
def run(self):
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
self.env['runtime']['memoryManager'].setPrefIndex('clipboardHistory')
isFirst = self.env['runtime']['memoryManager'].isFirstIndex('clipboardHistory')
isLast = self.env['runtime']['memoryManager'].isLastIndex('clipboardHistory')
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
if isFirst:
self.env['runtime']['outputManager'].presentText(_('First clipboard '), interrupt=True)
if isLast:
self.env['runtime']['outputManager'].presentText(_('Last clipboard '), interrupt=True)
speechInterrupt = not(isLast or isFirst)
self.env['runtime']['outputManager'].presentText(clipboard, interrupt = speechInterrupt)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('selects the previous clipboard')
def run(self):
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
return
self.env['runtime']['memoryManager'].setPrefIndex('clipboardHistory')
isFirst = self.env['runtime']['memoryManager'].isFirstIndex('clipboardHistory')
isLast = self.env['runtime']['memoryManager'].isLastIndex('clipboardHistory')
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
if isFirst:
self.env['runtime']['outputManager'].presentText(_('First clipboard '), interrupt=True)
if isLast:
self.env['runtime']['outputManager'].presentText(_('Last clipboard '), interrupt=True)
speechInterrupt = not(isLast or isFirst)
self.env['runtime']['outputManager'].presentText(clipboard, interrupt = speechInterrupt)
def setCallback(self, callback):
pass

View File

@ -1,24 +1,24 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('exits Fenrir')
def run(self):
self.env['runtime']['eventManager'].stopMainEventLoop()
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('exits Fenrir')
def run(self):
self.env['runtime']['eventManager'].stopMainEventLoop()
def setCallback(self, callback):
pass

View File

@ -1,32 +1,32 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import line_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('current line')
def run(self):
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], currLine = \
line_utils.getCurrentLine(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
if currLine.isspace():
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
else:
self.env['runtime']['outputManager'].presentText(currLine, interrupt=True, flush=False)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import line_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('current line')
def run(self):
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], currLine = \
line_utils.getCurrentLine(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
if currLine.isspace():
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
else:
self.env['runtime']['outputManager'].presentText(currLine, interrupt=True, flush=False)
def setCallback(self, callback):
pass

View File

@ -1,37 +1,37 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import word_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('current word.')
def run(self):
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], currWord, endOfScreen, lineBreak = \
word_utils.getCurrentWord(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
if currWord.isspace():
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
else:
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
if lineBreak:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import word_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('current word.')
def run(self):
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], currWord, endOfScreen, lineBreak = \
word_utils.getCurrentWord(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
if currWord.isspace():
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
else:
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
if lineBreak:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
def setCallback(self, callback):
pass

View File

@ -1,41 +1,41 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import word_utils
from fenrirscreenreader.utils import char_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Phonetically spells the current word')
def run(self):
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], currWord, endOfScreen, lineBreak = \
word_utils.getCurrentWord(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
if currWord.isspace():
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
else:
firstSequence = True
for c in currWord:
currChar = char_utils.getPhonetic(c)
self.env['runtime']['outputManager'].presentText(currChar, interrupt=firstSequence, announceCapital=True, flush=False)
firstSequence = False
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
if lineBreak:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import word_utils
from fenrirscreenreader.utils import char_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Phonetically spells the current word')
def run(self):
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], currWord, endOfScreen, lineBreak = \
word_utils.getCurrentWord(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
if currWord.isspace():
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
else:
firstSequence = True
for c in currWord:
currChar = char_utils.getPhonetic(c)
self.env['runtime']['outputManager'].presentText(currChar, interrupt=firstSequence, announceCapital=True, flush=False)
firstSequence = False
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
if lineBreak:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
def setCallback(self, callback):
pass

View File

@ -1,36 +1,36 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import line_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('moves review to the next line ')
def run(self):
self.env['screen']['oldCursorReview'] = self.env['screen']['newCursorReview']
if not self.env['screen']['newCursorReview']:
self.env['screen']['newCursorReview'] = self.env['screen']['newCursor'].copy()
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], nextLine, endOfScreen = \
line_utils.getNextLine(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
if nextLine.isspace():
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
else:
self.env['runtime']['outputManager'].presentText(nextLine, interrupt=True, flush=False)
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import line_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('moves review to the next line ')
def run(self):
self.env['screen']['oldCursorReview'] = self.env['screen']['newCursorReview']
if not self.env['screen']['newCursorReview']:
self.env['screen']['newCursorReview'] = self.env['screen']['newCursor'].copy()
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], nextLine, endOfScreen = \
line_utils.getNextLine(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
if nextLine.isspace():
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
else:
self.env['runtime']['outputManager'].presentText(nextLine, interrupt=True, flush=False)
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
def setCallback(self, callback):
pass

View File

@ -1,39 +1,39 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import word_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('moves review to the next word ')
def run(self):
self.env['screen']['oldCursorReview'] = self.env['screen']['newCursorReview']
if self.env['screen']['newCursorReview'] == None:
self.env['screen']['newCursorReview'] = self.env['screen']['newCursor'].copy()
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], nextWord, endOfScreen, lineBreak = \
word_utils.getNextWord(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
if nextWord.isspace():
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
else:
self.env['runtime']['outputManager'].presentText(nextWord, interrupt=True, flush=False)
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
if lineBreak:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import word_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('moves review to the next word ')
def run(self):
self.env['screen']['oldCursorReview'] = self.env['screen']['newCursorReview']
if self.env['screen']['newCursorReview'] == None:
self.env['screen']['newCursorReview'] = self.env['screen']['newCursor'].copy()
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], nextWord, endOfScreen, lineBreak = \
word_utils.getNextWord(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
if nextWord.isspace():
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
else:
self.env['runtime']['outputManager'].presentText(nextWord, interrupt=True, flush=False)
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
if lineBreak:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
def setCallback(self, callback):
pass

View File

@ -1,41 +1,41 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import word_utils
from fenrirscreenreader.utils import char_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Phonetically spells the next word and moves review to it')
def run(self):
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], nextWord, endOfScreen, lineBreak = \
word_utils.getNextWord(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
if nextWord.isspace():
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
else:
firstSequence = True
for c in nextWord:
currChar = char_utils.getPhonetic(c)
self.env['runtime']['outputManager'].presentText(currChar, interrupt=firstSequence, announceCapital=True, flush=False)
firstSequence = False
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
if lineBreak:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import word_utils
from fenrirscreenreader.utils import char_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Phonetically spells the next word and moves review to it')
def run(self):
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], nextWord, endOfScreen, lineBreak = \
word_utils.getNextWord(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
if nextWord.isspace():
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
else:
firstSequence = True
for c in nextWord:
currChar = char_utils.getPhonetic(c)
self.env['runtime']['outputManager'].presentText(currChar, interrupt=firstSequence, announceCapital=True, flush=False)
firstSequence = False
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
if lineBreak:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
def setCallback(self, callback):
pass

View File

@ -1,35 +1,35 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import line_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('moves review to the previous line ')
def run(self):
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], prevLine, endOfScreen = \
line_utils.getPrevLine(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
if prevLine.isspace():
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
else:
self.env['runtime']['outputManager'].presentText(prevLine, interrupt=True, flush=False)
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import line_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('moves review to the previous line ')
def run(self):
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], prevLine, endOfScreen = \
line_utils.getPrevLine(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
if prevLine.isspace():
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
else:
self.env['runtime']['outputManager'].presentText(prevLine, interrupt=True, flush=False)
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
def setCallback(self, callback):
pass

View File

@ -1,37 +1,37 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import word_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('moves review focus to the previous word ')
def run(self):
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], prevWord, endOfScreen, lineBreak = \
word_utils.getPrevWord(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
if prevWord.isspace():
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
else:
self.env['runtime']['outputManager'].presentText(prevWord, interrupt=True, flush=False)
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=False, soundIcon='EndOfScreen')
if lineBreak:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import word_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('moves review focus to the previous word ')
def run(self):
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], prevWord, endOfScreen, lineBreak = \
word_utils.getPrevWord(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
if prevWord.isspace():
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
else:
self.env['runtime']['outputManager'].presentText(prevWord, interrupt=True, flush=False)
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=False, soundIcon='EndOfScreen')
if lineBreak:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
def setCallback(self, callback):
pass

View File

@ -1,41 +1,41 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import word_utils
from fenrirscreenreader.utils import char_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Phonetically spells the previous word and moves review to it')
def run(self):
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], prevWord, endOfScreen, lineBreak = \
word_utils.getPrevWord(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
if prevWord.isspace():
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
else:
firstSequence = True
for c in prevWord:
currChar = char_utils.getPhonetic(c)
self.env['runtime']['outputManager'].presentText(currChar, interrupt=firstSequence, announceCapital=True, flush=False)
firstSequence = False
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
if lineBreak:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import word_utils
from fenrirscreenreader.utils import char_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Phonetically spells the previous word and moves review to it')
def run(self):
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], prevWord, endOfScreen, lineBreak = \
word_utils.getPrevWord(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
if prevWord.isspace():
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
else:
firstSequence = True
for c in prevWord:
currChar = char_utils.getPhonetic(c)
self.env['runtime']['outputManager'].presentText(currChar, interrupt=firstSequence, announceCapital=True, flush=False)
firstSequence = False
if endOfScreen:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
if lineBreak:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
def setCallback(self, callback):
pass

View File

@ -1,24 +1,24 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.core import settingsManager
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Saves your current Fenrir settings so they are the default.')
def run(self):
settingsFile = self.env['runtime']['settingsManager'].getSettingsFile()
self.env['runtime']['settingsManager'].saveSettings(settingsFile)
self.env['runtime']['outputManager'].presentText(_("Settings saved."), interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.core import settingsManager
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Saves your current Fenrir settings so they are the default.')
def run(self):
settingsFile = self.env['runtime']['settingsManager'].getSettingsFile()
self.env['runtime']['settingsManager'].saveSettings(settingsFile)
self.env['runtime']['outputManager'].presentText(_("Settings saved."), interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,23 +1,23 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Interrupts the current presentation')
def run(self):
if len(self.env['input']['prevDeepestInput']) > len(self.env['input']['currInput']):
return
self.env['runtime']['outputManager'].interruptOutput()
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Interrupts the current presentation')
def run(self):
if len(self.env['input']['prevDeepestInput']) > len(self.env['input']['currInput']):
return
self.env['runtime']['outputManager'].interruptOutput()
def setCallback(self, callback):
pass

View File

@ -1,50 +1,50 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import subprocess, os
from subprocess import Popen, PIPE
import _thread
class command():
def __init__(self):
pass
def initialize(self, environment, scriptPath=''):
self.env = environment
self.scriptPath = scriptPath
def shutdown(self):
pass
def getDescription(self):
return _('script: {0} fullpath: {1}').format(os.path.basename(self.scriptPath), self.scriptPath)
def run(self):
if not os.path.exists(self.scriptPath):
self.env['runtime']['outputManager'].presentText(_('Script file not found'), soundIcon='', interrupt=False)
return
if not os.path.isfile(self.scriptPath):
self.env['runtime']['outputManager'].presentText(_('Script source is not a valid file'), soundIcon='', interrupt=False)
return
if not os.access(self.scriptPath, os.X_OK):
self.env['runtime']['outputManager'].presentText(_('Script file is not executable'), soundIcon='', interrupt=False)
return
_thread.start_new_thread(self._threadRun , ())
def _threadRun(self):
try:
callstring = self.scriptPath + ' ' + self.env['general']['currUser']
p = Popen(callstring , stdout=PIPE, stderr=PIPE, shell=True)
stdout, stderr = p.communicate()
stdout = stdout.decode('utf-8')
stderr = stderr.decode('utf-8')
self.env['runtime']['outputManager'].interruptOutput()
if stderr != '':
self.env['runtime']['outputManager'].presentText(str(stderr) , soundIcon='', interrupt=False)
if stdout != '':
self.env['runtime']['outputManager'].presentText(str(stdout) , soundIcon='', interrupt=False)
except Exception as e:
self.env['runtime']['outputManager'].presentText(e , soundIcon='', interrupt=False)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import subprocess, os
from subprocess import Popen, PIPE
import _thread
class command():
def __init__(self):
pass
def initialize(self, environment, scriptPath=''):
self.env = environment
self.scriptPath = scriptPath
def shutdown(self):
pass
def getDescription(self):
return _('script: {0} fullpath: {1}').format(os.path.basename(self.scriptPath), self.scriptPath)
def run(self):
if not os.path.exists(self.scriptPath):
self.env['runtime']['outputManager'].presentText(_('Script file not found'), soundIcon='', interrupt=False)
return
if not os.path.isfile(self.scriptPath):
self.env['runtime']['outputManager'].presentText(_('Script source is not a valid file'), soundIcon='', interrupt=False)
return
if not os.access(self.scriptPath, os.X_OK):
self.env['runtime']['outputManager'].presentText(_('Script file is not executable'), soundIcon='', interrupt=False)
return
_thread.start_new_thread(self._threadRun , ())
def _threadRun(self):
try:
callstring = self.scriptPath + ' ' + self.env['general']['currUser']
p = Popen(callstring , stdout=PIPE, stderr=PIPE, shell=True)
stdout, stderr = p.communicate()
stdout = stdout.decode('utf-8')
stderr = stderr.decode('utf-8')
self.env['runtime']['outputManager'].interruptOutput()
if stderr != '':
self.env['runtime']['outputManager'].presentText(str(stderr) , soundIcon='', interrupt=False)
if stdout != '':
self.env['runtime']['outputManager'].presentText(str(stdout) , soundIcon='', interrupt=False)
except Exception as e:
self.env['runtime']['outputManager'].presentText(e , soundIcon='', interrupt=False)
def setCallback(self, callback):
pass

View File

@ -1,23 +1,23 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('disables speech until next keypress')
def run(self):
self.env['runtime']['outputManager'].tempDisableSpeech()
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('disables speech until next keypress')
def run(self):
self.env['runtime']['outputManager'].tempDisableSpeech()
def setCallback(self, callback):
pass

View File

@ -1,30 +1,30 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import datetime
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('presents the time')
def run(self):
timeFormat = self.env['runtime']['settingsManager'].getSetting('general', 'timeFormat')
# get the time formatted
timeString = datetime.datetime.strftime(datetime.datetime.now(), timeFormat)
# present the time via speak and braile, there is no soundicon, interrupt the current speech
self.env['runtime']['outputManager'].presentText(timeString , soundIcon='', interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import datetime
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('presents the time')
def run(self):
timeFormat = self.env['runtime']['settingsManager'].getSetting('general', 'timeFormat')
# get the time formatted
timeString = datetime.datetime.strftime(datetime.datetime.now(), timeFormat)
# present the time via speak and braile, there is no soundicon, interrupt the current speech
self.env['runtime']['outputManager'].presentText(timeString , soundIcon='', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,26 +1,26 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('enables or disables automatic reading of indentation level changes')
def run(self):
self.env['runtime']['settingsManager'].setSetting('general', 'autoPresentIndent', str(not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent')))
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'):
self.env['runtime']['outputManager'].presentText(_("autoindent enabled"), soundIcon='', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText(_("autoindent disabled"), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('enables or disables automatic reading of indentation level changes')
def run(self):
self.env['runtime']['settingsManager'].setSetting('general', 'autoPresentIndent', str(not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent')))
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'):
self.env['runtime']['outputManager'].presentText(_("autoindent enabled"), soundIcon='', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText(_("autoindent disabled"), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,26 +1,26 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('enables or disables automatic reading of new text as it appears')
def run(self):
self.env['runtime']['settingsManager'].setSetting('speech', 'autoReadIncoming', str(not self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'autoReadIncoming')))
if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'autoReadIncoming'):
self.env['runtime']['outputManager'].presentText(_("autoread enabled"), soundIcon='', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText(_("autoread disabled"), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('enables or disables automatic reading of new text as it appears')
def run(self):
self.env['runtime']['settingsManager'].setSetting('speech', 'autoReadIncoming', str(not self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'autoReadIncoming')))
if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'autoReadIncoming'):
self.env['runtime']['outputManager'].presentText(_("autoread enabled"), soundIcon='', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText(_("autoread disabled"), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,27 +1,27 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('enables or disables automatic spell checking')
def run(self):
self.env['runtime']['settingsManager'].setSetting('general', 'autoSpellCheck', str(not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoSpellCheck')))
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoSpellCheck'):
self.env['runtime']['outputManager'].presentText(_("auto spellcheck enabled"), soundIcon='', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText(_("auto spellcheck disabled"), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('enables or disables automatic spell checking')
def run(self):
self.env['runtime']['settingsManager'].setSetting('general', 'autoSpellCheck', str(not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoSpellCheck')))
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoSpellCheck'):
self.env['runtime']['outputManager'].presentText(_("auto spellcheck enabled"), soundIcon='', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText(_("auto spellcheck disabled"), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,26 +1,26 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Enables or disables automatic reading of time after specified intervals')
def run(self):
self.env['runtime']['settingsManager'].setSetting('time', 'enabled', str(not self.env['runtime']['settingsManager'].getSettingAsBool('time', 'enabled')))
if self.env['runtime']['settingsManager'].getSettingAsBool('time', 'enabled'):
self.env['runtime']['outputManager'].presentText(_("Automatic time announcement enabled"), soundIcon='', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText(_("Automatic time announcement disabled"), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Enables or disables automatic reading of time after specified intervals')
def run(self):
self.env['runtime']['settingsManager'].setSetting('time', 'enabled', str(not self.env['runtime']['settingsManager'].getSettingAsBool('time', 'enabled')))
if self.env['runtime']['settingsManager'].getSettingAsBool('time', 'enabled'):
self.env['runtime']['outputManager'].presentText(_("Automatic time announcement enabled"), soundIcon='', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText(_("Automatic time announcement disabled"), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,26 +1,26 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('enables or disables the barrier mode')
def run(self):
self.env['runtime']['settingsManager'].setSetting('barrier', 'enabled', str(not self.env['runtime']['settingsManager'].getSettingAsBool('barrier', 'enabled')))
if self.env['runtime']['settingsManager'].getSettingAsBool('barrier', 'enabled'):
self.env['runtime']['outputManager'].presentText(_("barrier mode enabled"), soundIcon='', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText(_("barrier mode disabled"), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('enables or disables the barrier mode')
def run(self):
self.env['runtime']['settingsManager'].setSetting('barrier', 'enabled', str(not self.env['runtime']['settingsManager'].getSettingAsBool('barrier', 'enabled')))
if self.env['runtime']['settingsManager'].getSettingAsBool('barrier', 'enabled'):
self.env['runtime']['outputManager'].presentText(_("barrier mode enabled"), soundIcon='', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText(_("barrier mode disabled"), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,26 +1,26 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('enables or disables announcement of emoticons instead of chars')
def run(self):
self.env['runtime']['settingsManager'].setSetting('general', 'emoticons', str(not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'emoticons')))
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'emoticons'):
self.env['runtime']['outputManager'].presentText(_('emoticons enabled'), soundIcon='', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText(_('emoticons disabled'), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('enables or disables announcement of emoticons instead of chars')
def run(self):
self.env['runtime']['settingsManager'].setSetting('general', 'emoticons', str(not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'emoticons')))
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'emoticons'):
self.env['runtime']['outputManager'].presentText(_('emoticons enabled'), soundIcon='', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText(_('emoticons disabled'), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,26 +1,26 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('enables or disables the announcement of attributes')
def run(self):
self.env['runtime']['settingsManager'].setSetting('general', 'hasAttributes', str(not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes')))
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes'):
self.env['runtime']['outputManager'].presentText(_("announcement of attributes enabled"), soundIcon='', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText(_("announcement of attributes disabled"), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('enables or disables the announcement of attributes')
def run(self):
self.env['runtime']['settingsManager'].setSetting('general', 'hasAttributes', str(not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes')))
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes'):
self.env['runtime']['outputManager'].presentText(_("announcement of attributes enabled"), soundIcon='', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText(_("announcement of attributes disabled"), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,29 +1,29 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('enables or disables tracking of highlighted text')
def run(self):
currMode = self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'highlight')
self.env['runtime']['settingsManager'].setSetting('focus', 'highlight', str(not currMode))
self.env['runtime']['settingsManager'].setSetting('focus', 'cursor', str(currMode))
if self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'highlight'):
self.env['runtime']['outputManager'].presentText(_('highlight tracking'), soundIcon='', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText(_('cursor tracking'), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('enables or disables tracking of highlighted text')
def run(self):
currMode = self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'highlight')
self.env['runtime']['settingsManager'].setSetting('focus', 'highlight', str(not currMode))
self.env['runtime']['settingsManager'].setSetting('focus', 'cursor', str(currMode))
if self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'highlight'):
self.env['runtime']['outputManager'].presentText(_('highlight tracking'), soundIcon='', interrupt=True)
else:
self.env['runtime']['outputManager'].presentText(_('cursor tracking'), soundIcon='', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,27 +1,27 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('enables or disables sound')
def run(self):
if self.env['runtime']['settingsManager'].getSettingAsBool('sound', 'enabled'):
self.env['runtime']['outputManager'].presentText(_('sound disabled'), soundIcon='SoundOff', interrupt=True)
self.env['runtime']['settingsManager'].setSetting('sound', 'enabled', str(not self.env['runtime']['settingsManager'].getSettingAsBool('sound', 'enabled')))
if self.env['runtime']['settingsManager'].getSettingAsBool('sound', 'enabled'):
self.env['runtime']['outputManager'].presentText(_('sound enabled'), soundIcon='SoundOn', interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('enables or disables sound')
def run(self):
if self.env['runtime']['settingsManager'].getSettingAsBool('sound', 'enabled'):
self.env['runtime']['outputManager'].presentText(_('sound disabled'), soundIcon='SoundOff', interrupt=True)
self.env['runtime']['settingsManager'].setSetting('sound', 'enabled', str(not self.env['runtime']['settingsManager'].getSettingAsBool('sound', 'enabled')))
if self.env['runtime']['settingsManager'].getSettingAsBool('sound', 'enabled'):
self.env['runtime']['outputManager'].presentText(_('sound enabled'), soundIcon='SoundOn', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,28 +1,28 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('enables or disables speech')
def run(self):
if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled'):
self.env['runtime']['outputManager'].interruptOutput()
self.env['runtime']['outputManager'].presentText(_('speech disabled'), soundIcon='SpeechOff', interrupt=True)
self.env['runtime']['settingsManager'].setSetting('speech', 'enabled', str(not self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled')))
if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled'):
self.env['runtime']['outputManager'].presentText(_('speech enabled'), soundIcon='SpeechOn', interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('enables or disables speech')
def run(self):
if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled'):
self.env['runtime']['outputManager'].interruptOutput()
self.env['runtime']['outputManager'].presentText(_('speech disabled'), soundIcon='SpeechOff', interrupt=True)
self.env['runtime']['settingsManager'].setSetting('speech', 'enabled', str(not self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled')))
if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled'):
self.env['runtime']['outputManager'].presentText(_('speech enabled'), soundIcon='SpeechOn', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,25 +0,0 @@
#!/bi[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]/py[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]ho[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]
# -*- [['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]odi[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]g: u[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]f-8 -*-
# F[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]i[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']] TTY [['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']] [['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]d[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]
# By Ch[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]y[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']], S[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]o[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]m [['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]go[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']], [['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]d [['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]o[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]ibu[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']].
f[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]om [['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]o[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']] impo[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']] d[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]bug
[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]l[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']] [['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]omm[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]d():
d[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]f __i[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]i[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]__([['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]lf):
p[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]
d[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]f i[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]i[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]i[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]liz[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]([['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]lf, [['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]vi[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]o[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]m[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]):
[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]lf.[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]v = [['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]vi[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]o[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]m[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]
d[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]f [['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]hu[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]dow[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]([['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]lf):
p[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]
d[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]f g[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]ip[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]io[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]([['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]lf):
[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]u[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']] [['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]No d[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]ip[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]io[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']] fou[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]d[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]
d[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]f [['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]u[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]([['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]lf):
#p[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]i[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]([['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]w [['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']], [['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]lf.[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]v[[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]][[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]wAppli[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]io[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]])
#p[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]i[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]([['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]old [['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']], [['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]lf.[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]v[[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]][[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]oldAppli[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]io[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]])
#p[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]i[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]([['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]-----------[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']])
p[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]
d[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]f [['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]C[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]llb[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]k([['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]lf, [['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]llb[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]k):
p[['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']][['screen']['screen']['screen']['screen']['screen']['screen']['screen']['screen']]

View File

@ -1,33 +1,33 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return ''
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'interruptOnKeyPress'):
return
if self.env['runtime']['screenManager'].isScreenChange():
return
# if the filter is set
#if self.env['runtime']['settingsManager'].getSetting('keyboard', 'interruptOnKeyPressFilter').strip() != '':
# filterList = self.env['runtime']['settingsManager'].getSetting('keyboard', 'interruptOnKeyPressFilter').split(',')
# for currInput in self.env['input']['currInput']:
# if not currInput in filterList:
# return
self.env['runtime']['outputManager'].interruptOutput()
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return ''
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'interruptOnKeyPress'):
return
if self.env['runtime']['screenManager'].isScreenChange():
return
# if the filter is set
#if self.env['runtime']['settingsManager'].getSetting('keyboard', 'interruptOnKeyPressFilter').strip() != '':
# filterList = self.env['runtime']['settingsManager'].getSetting('keyboard', 'interruptOnKeyPressFilter').split(',')
# for currInput in self.env['input']['currInput']:
# if not currInput in filterList:
# return
self.env['runtime']['outputManager'].interruptOutput()
def setCallback(self, callback):
pass

View File

@ -1,27 +1,27 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('disables speech until next keypress')
def run(self):
if not self.env['commandBuffer']['enableSpeechOnKeypress']:
return
self.env['runtime']['settingsManager'].setSetting('speech', 'enabled', str(self.env['commandBuffer']['enableSpeechOnKeypress']))
self.env['commandBuffer']['enableSpeechOnKeypress'] = False
self.env['runtime']['outputManager'].presentText(_("speech enabled"), soundIcon='SpeechOn', interrupt=True)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('disables speech until next keypress')
def run(self):
if not self.env['commandBuffer']['enableSpeechOnKeypress']:
return
self.env['runtime']['settingsManager'].setSetting('speech', 'enabled', str(self.env['commandBuffer']['enableSpeechOnKeypress']))
self.env['commandBuffer']['enableSpeechOnKeypress'] = False
self.env['runtime']['outputManager'].presentText(_("speech enabled"), soundIcon='SpeechOn', interrupt=True)
def setCallback(self, callback):
pass

View File

@ -1,55 +1,55 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
# enabled?
active = self.env['runtime']['settingsManager'].getSettingAsInt('keyboard', 'charEchoMode')
# 0 = off
if active == 0:
return
# 2 = caps only
if active == 2:
if not self.env['input']['newCapsLock']:
return
# big changes are no char (but the value is bigger than one maybe the differ needs longer than you can type, so a little strange random buffer for now)
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
if xMove > 3:
return
if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']:
if self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_TAB']]:
return
elif self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']:
if self.env['runtime']['byteManager'].getLastByteKey() in [b' ', b'\t']:
return
# detect deletion or chilling
if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']:
return
# is there any change?
if not self.env['runtime']['screenManager'].isDelta():
return
# filter unneded space on word begin
currDelta = self.env['screen']['newDelta']
if len(currDelta.strip()) != len(currDelta) and \
currDelta.strip() != '':
currDelta = currDelta.strip()
self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
print(currDelta)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
# enabled?
active = self.env['runtime']['settingsManager'].getSettingAsInt('keyboard', 'charEchoMode')
# 0 = off
if active == 0:
return
# 2 = caps only
if active == 2:
if not self.env['input']['newCapsLock']:
return
# big changes are no char (but the value is bigger than one maybe the differ needs longer than you can type, so a little strange random buffer for now)
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
if xMove > 3:
return
if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']:
if self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_TAB']]:
return
elif self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']:
if self.env['runtime']['byteManager'].getLastByteKey() in [b' ', b'\t']:
return
# detect deletion or chilling
if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']:
return
# is there any change?
if not self.env['runtime']['screenManager'].isDelta():
return
# filter unneded space on word begin
currDelta = self.env['screen']['newDelta']
if len(currDelta.strip()) != len(currDelta) and \
currDelta.strip() != '':
currDelta = currDelta.strip()
self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
print(currDelta)
def setCallback(self, callback):
pass

View File

@ -1,58 +1,58 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import word_utils
import string
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
# is it enabled?
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'):
return
# is naviation?
if self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'] != 1:
return
# just when cursor move worddetection is needed
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
return
# for now no new line
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
return
# currently writing
if self.env['runtime']['screenManager'].isDelta():
return
# get the word
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
x, y, currWord, endOfScreen, lineBreak = \
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
# is there a word?
if currWord == '':
return
# at the end of a word
if not newContent[self.env['screen']['newCursor']['x']].isspace():
return
# at the end of a word
if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \
(x + len(currWord) != self.env['screen']['newCursor']['x']-1):
return
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import word_utils
import string
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
# is it enabled?
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'):
return
# is naviation?
if self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'] != 1:
return
# just when cursor move worddetection is needed
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
return
# for now no new line
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
return
# currently writing
if self.env['runtime']['screenManager'].isDelta():
return
# get the word
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
x, y, currWord, endOfScreen, lineBreak = \
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
# is there a word?
if currWord == '':
return
# at the end of a word
if not newContent[self.env['screen']['newCursor']['x']].isspace():
return
# at the end of a word
if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \
(x + len(currWord) != self.env['screen']['newCursor']['x']-1):
return
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
def setCallback(self, callback):
pass

View File

@ -1,46 +1,46 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charDeleteEcho'):
return
# detect typing or chilling
if self.env['screen']['newCursor']['x'] >= self.env['screen']['oldCursor']['x']:
return
# More than just a deletion happend
if self.env['runtime']['screenManager'].isDelta(ignoreSpace=True):
return
# no deletion
if not self.env['runtime']['screenManager'].isNegativeDelta():
return
# too much for a single backspace...
# word begin produce a diff wiht len == 2 |a | others with 1 |a|
if len(self.env['screen']['newNegativeDelta']) > 2:
return
currNegativeDelta = self.env['screen']['newNegativeDelta']
if len(currNegativeDelta.strip()) != len(currNegativeDelta) and \
currNegativeDelta.strip() != '':
currNegativeDelta = currNegativeDelta.strip()
self.env['runtime']['outputManager'].presentText(currNegativeDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charDeleteEcho'):
return
# detect typing or chilling
if self.env['screen']['newCursor']['x'] >= self.env['screen']['oldCursor']['x']:
return
# More than just a deletion happend
if self.env['runtime']['screenManager'].isDelta(ignoreSpace=True):
return
# no deletion
if not self.env['runtime']['screenManager'].isNegativeDelta():
return
# too much for a single backspace...
# word begin produce a diff wiht len == 2 |a | others with 1 |a|
if len(self.env['screen']['newNegativeDelta']) > 2:
return
currNegativeDelta = self.env['screen']['newNegativeDelta']
if len(currNegativeDelta.strip()) != len(currNegativeDelta) and \
currNegativeDelta.strip() != '':
currNegativeDelta = currNegativeDelta.strip()
self.env['runtime']['outputManager'].presentText(currNegativeDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
def setCallback(self, callback):
pass

View File

@ -1,51 +1,51 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import char_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return ''
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
return
if self.env['runtime']['screenManager'].isScreenChange():
return
# detect an change on the screen, we just want to cursor arround, so no change should appear
if self.env['runtime']['screenManager'].isDelta():
return
if self.env['runtime']['screenManager'].isNegativeDelta():
return
# is a vertical change?
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
return
# is it a horizontal change?
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
return
# echo word insteed of char
if self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'):
if abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) != 1:
# get the word
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
x, y, currWord, endOfScreen, lineBreak = \
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
if self.env['screen']['newCursor']['x'] == x:
return
x, y, currChar = char_utils.getCurrentChar(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
if not currChar.isspace():
self.env['runtime']['outputManager'].presentText(currChar, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import char_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return ''
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
return
if self.env['runtime']['screenManager'].isScreenChange():
return
# detect an change on the screen, we just want to cursor arround, so no change should appear
if self.env['runtime']['screenManager'].isDelta():
return
if self.env['runtime']['screenManager'].isNegativeDelta():
return
# is a vertical change?
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
return
# is it a horizontal change?
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
return
# echo word insteed of char
if self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'):
if abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) != 1:
# get the word
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
x, y, currWord, endOfScreen, lineBreak = \
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
if self.env['screen']['newCursor']['x'] == x:
return
x, y, currChar = char_utils.getCurrentChar(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
if not currChar.isspace():
self.env['runtime']['outputManager'].presentText(currChar, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
def setCallback(self, callback):
pass

View File

@ -1,49 +1,49 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
# try to detect the tab completion by cursor change
xMove = self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x']
if xMove <= 0:
return
if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']:
if not (self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_TAB']]):
if xMove < 5:
return
elif self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']:
found = False
for currByte in self.env['runtime']['byteManager'].getLastByteKey():
if currByte == 9:
found = True
if not found:
if xMove < 5:
return
# is there any change?
if not self.env['runtime']['screenManager'].isDelta():
return
if not xMove == len(self.env['screen']['newDelta']):
return
# filter unneded space on word begin
currDelta = self.env['screen']['newDelta']
if len(currDelta.strip()) != len(currDelta) and \
currDelta.strip() != '':
currDelta = currDelta.strip()
self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, announceCapital=True, flush=False)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
# try to detect the tab completion by cursor change
xMove = self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x']
if xMove <= 0:
return
if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']:
if not (self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_TAB']]):
if xMove < 5:
return
elif self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']:
found = False
for currByte in self.env['runtime']['byteManager'].getLastByteKey():
if currByte == 9:
found = True
if not found:
if xMove < 5:
return
# is there any change?
if not self.env['runtime']['screenManager'].isDelta():
return
if not xMove == len(self.env['screen']['newDelta']):
return
# filter unneded space on word begin
currDelta = self.env['screen']['newDelta']
if len(currDelta.strip()) != len(currDelta) and \
currDelta.strip() != '':
currDelta = currDelta.strip()
self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, announceCapital=True, flush=False)
def setCallback(self, callback):
pass

View File

@ -1,54 +1,54 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import word_utils
import string
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
# is navigation?
if not abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) > 1:
return
# just when cursor move worddetection is needed
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
return
# for now no new line
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
return
# currently writing
if self.env['runtime']['screenManager'].isDelta():
return
# get the word
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
x, y, currWord, endOfScreen, lineBreak = \
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
# is there a word?
if currWord == '':
return
# at the start of a word
if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \
(self.env['screen']['newCursor']['x'] != x):
return
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import word_utils
import string
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
# is navigation?
if not abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) > 1:
return
# just when cursor move worddetection is needed
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
return
# for now no new line
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
return
# currently writing
if self.env['runtime']['screenManager'].isDelta():
return
# get the word
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
x, y, currWord, endOfScreen, lineBreak = \
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
# is there a word?
if currWord == '':
return
# at the start of a word
if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \
(self.env['screen']['newCursor']['x'] != x):
return
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
def setCallback(self, callback):
pass

View File

@ -1,62 +1,62 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import line_utils
from fenrirscreenreader.utils import word_utils
class command():
def __init__(self):
self.lastIdent = -1
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return ''
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
return
if self.env['runtime']['screenManager'].isScreenChange():
self.lastIdent = 0
return
# this leads to problems in vim -> status line change -> no announcement, so we do check the lengh as hack
if self.env['runtime']['screenManager'].isDelta():
return
# is a vertical change?
if not self.env['runtime']['cursorManager'].isCursorVerticalMove():
return
x, y, currLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
if currLine.isspace():
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
else:
# ident
currIdent = len(currLine) - len(currLine.lstrip())
if self.lastIdent == -1:
self.lastIdent = currIdent
doInterrupt = True
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'):
if self.env['runtime']['settingsManager'].getSettingAsInt('general', 'autoPresentIndentMode') in [0,1]:
self.env['runtime']['outputManager'].playFrequence(currIdent * 50, 0.1, interrupt=doInterrupt)
if self.env['runtime']['settingsManager'].getSettingAsInt('general', 'autoPresentIndentMode') in [0,2]:
if self.lastIdent != currIdent:
self.env['runtime']['outputManager'].presentText(_('indented ') + str(currIdent) + ' ', interrupt=doInterrupt, flush=False)
doInterrupt = False
# barrier
sayLine = currLine
if self.env['runtime']['settingsManager'].getSettingAsBool('barrier','enabled'):
isBarrier, barrierLine = self.env['runtime']['barrierManager'].handleLineBarrier(self.env['screen']['newContentText'].split('\n'), self.env['screen']['newCursor']['x'],self.env['screen']['newCursor']['y'])
if isBarrier:
sayLine = barrierLine
# output
self.env['runtime']['outputManager'].presentText(sayLine, interrupt=doInterrupt, flush=False)
self.lastIdent = currIdent
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import line_utils
from fenrirscreenreader.utils import word_utils
class command():
def __init__(self):
self.lastIdent = -1
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return ''
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
return
if self.env['runtime']['screenManager'].isScreenChange():
self.lastIdent = 0
return
# this leads to problems in vim -> status line change -> no announcement, so we do check the lengh as hack
if self.env['runtime']['screenManager'].isDelta():
return
# is a vertical change?
if not self.env['runtime']['cursorManager'].isCursorVerticalMove():
return
x, y, currLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
if currLine.isspace():
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
else:
# ident
currIdent = len(currLine) - len(currLine.lstrip())
if self.lastIdent == -1:
self.lastIdent = currIdent
doInterrupt = True
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'):
if self.env['runtime']['settingsManager'].getSettingAsInt('general', 'autoPresentIndentMode') in [0,1]:
self.env['runtime']['outputManager'].playFrequence(currIdent * 50, 0.1, interrupt=doInterrupt)
if self.env['runtime']['settingsManager'].getSettingAsInt('general', 'autoPresentIndentMode') in [0,2]:
if self.lastIdent != currIdent:
self.env['runtime']['outputManager'].presentText(_('indented ') + str(currIdent) + ' ', interrupt=doInterrupt, flush=False)
doInterrupt = False
# barrier
sayLine = currLine
if self.env['runtime']['settingsManager'].getSettingAsBool('barrier','enabled'):
isBarrier, barrierLine = self.env['runtime']['barrierManager'].handleLineBarrier(self.env['screen']['newContentText'].split('\n'), self.env['screen']['newCursor']['x'],self.env['screen']['newCursor']['y'])
if isBarrier:
sayLine = barrierLine
# output
self.env['runtime']['outputManager'].presentText(sayLine, interrupt=doInterrupt, flush=False)
self.lastIdent = currIdent
def setCallback(self, callback):
pass

View File

@ -1,57 +1,57 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import line_utils
from fenrirscreenreader.utils import word_utils
class command():
def __init__(self):
self.lastIdent = -1
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return ''
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
return
if self.env['runtime']['screenManager'].isScreenChange():
self.lastIdent = 0
return
# is a vertical change?
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
return
x, y, currLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
currIdent = self.env['screen']['newCursor']['x']
if not currLine.isspace():
# ident
lastIdent, lastY, lastLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['oldContentText'])
if currLine.strip() != lastLine.strip():
return
if len(currLine.lstrip()) == len(lastLine.lstrip()):
return
currIdent = len(currLine) - len(currLine.lstrip())
if self.lastIdent == -1:
self.lastIdent = currIdent
if currIdent <= 0:
return
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'):
if self.env['runtime']['settingsManager'].getSettingAsInt('general', 'autoPresentIndentMode') in [0,1]:
self.env['runtime']['outputManager'].playFrequence(currIdent * 50, 0.1, interrupt=False)
if self.env['runtime']['settingsManager'].getSettingAsInt('general', 'autoPresentIndentMode') in [0,2]:
if self.lastIdent != currIdent:
self.env['runtime']['outputManager'].presentText(_('indented ') + str(currIdent) + ' ', interrupt=False, flush=False)
self.lastIdent = currIdent
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import line_utils
from fenrirscreenreader.utils import word_utils
class command():
def __init__(self):
self.lastIdent = -1
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return ''
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
return
if self.env['runtime']['screenManager'].isScreenChange():
self.lastIdent = 0
return
# is a vertical change?
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
return
x, y, currLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
currIdent = self.env['screen']['newCursor']['x']
if not currLine.isspace():
# ident
lastIdent, lastY, lastLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['oldContentText'])
if currLine.strip() != lastLine.strip():
return
if len(currLine.lstrip()) == len(lastLine.lstrip()):
return
currIdent = len(currLine) - len(currLine.lstrip())
if self.lastIdent == -1:
self.lastIdent = currIdent
if currIdent <= 0:
return
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'):
if self.env['runtime']['settingsManager'].getSettingAsInt('general', 'autoPresentIndentMode') in [0,1]:
self.env['runtime']['outputManager'].playFrequence(currIdent * 50, 0.1, interrupt=False)
if self.env['runtime']['settingsManager'].getSettingAsInt('general', 'autoPresentIndentMode') in [0,2]:
if self.lastIdent != currIdent:
self.env['runtime']['outputManager'].presentText(_('indented ') + str(currIdent) + ' ', interrupt=False, flush=False)
self.lastIdent = currIdent
def setCallback(self, callback):
pass

View File

@ -1,34 +1,34 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import screen_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Reads attributes of current cursor position')
def run(self):
# is it enabled?
if not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes'):
return
# is a vertical change?
if not (self.env['runtime']['cursorManager'].isCursorVerticalMove() or\
self.env['runtime']['cursorManager'].isCursorHorizontalMove()):
return
cursorPos = self.env['screen']['newCursor']
if not self.env['runtime']['attributeManager'].hasAttributes(cursorPos):
return
self.env['runtime']['outputManager'].presentText('has attribute', soundIcon='HasAttributes', interrupt=False)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import screen_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Reads attributes of current cursor position')
def run(self):
# is it enabled?
if not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes'):
return
# is a vertical change?
if not (self.env['runtime']['cursorManager'].isCursorVerticalMove() or\
self.env['runtime']['cursorManager'].isCursorHorizontalMove()):
return
cursorPos = self.env['screen']['newCursor']
if not self.env['runtime']['attributeManager'].hasAttributes(cursorPos):
return
self.env['runtime']['outputManager'].presentText('has attribute', soundIcon='HasAttributes', interrupt=False)
def setCallback(self, callback):
pass

View File

@ -1,26 +1,26 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('exits review mode')
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('review', 'leaveReviewOnCursorChange'):
return
if self.env['runtime']['cursorManager'].isReviewMode():
self.env['runtime']['cursorManager'].clearReviewCursor()
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('exits review mode')
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('review', 'leaveReviewOnCursorChange'):
return
if self.env['runtime']['cursorManager'].isReviewMode():
self.env['runtime']['cursorManager'].clearReviewCursor()
def setCallback(self, callback):
pass

View File

@ -1,42 +1,42 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
# big changes are no char (but the value is bigger than one maybe the differ needs longer than you can type, so a little strange random buffer for now)
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
if xMove > 1:
return
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charEcho'):
return
# detect deletion or chilling
if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']:
return
# is there any change?
if not self.env['runtime']['screenManager'].isDelta():
return
# filter unneded space on word begin
currDelta = self.env['screen']['newDelta']
if len(currDelta.strip()) != len(currDelta) and \
currDelta.strip() != '':
currDelta = currDelta.strip()
self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
# big changes are no char (but the value is bigger than one maybe the differ needs longer than you can type, so a little strange random buffer for now)
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
if xMove > 1:
return
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charEcho'):
return
# detect deletion or chilling
if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']:
return
# is there any change?
if not self.env['runtime']['screenManager'].isDelta():
return
# filter unneded space on word begin
currDelta = self.env['screen']['newDelta']
if len(currDelta.strip()) != len(currDelta) and \
currDelta.strip() != '':
currDelta = currDelta.strip()
self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
def setCallback(self, callback):
pass

View File

@ -1,42 +1,42 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
# try to detect the tab completion by cursor change
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
if xMove == 1:
return
# is there any change?
if not self.env['runtime']['screenManager'].isDelta():
return
if not( (xMove > 1) and xMove == len(self.env['screen']['newDelta'])):
return
# detect deletion or chilling
if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']:
return
# filter unneded space on word begin
currDelta = self.env['screen']['newDelta']
if len(currDelta.strip()) != len(currDelta) and \
currDelta.strip() != '':
currDelta = currDelta.strip()
self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, announceCapital=True, flush=False)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
# try to detect the tab completion by cursor change
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
if xMove == 1:
return
# is there any change?
if not self.env['runtime']['screenManager'].isDelta():
return
if not( (xMove > 1) and xMove == len(self.env['screen']['newDelta'])):
return
# detect deletion or chilling
if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']:
return
# filter unneded space on word begin
currDelta = self.env['screen']['newDelta']
if len(currDelta.strip()) != len(currDelta) and \
currDelta.strip() != '':
currDelta = currDelta.strip()
self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, announceCapital=True, flush=False)
def setCallback(self, callback):
pass

View File

@ -1,51 +1,51 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import char_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return ''
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
return
if self.env['runtime']['screenManager'].isScreenChange():
return
# detect an change on the screen, we just want to cursor arround, so no change should appear
if self.env['runtime']['screenManager'].isDelta():
return
if self.env['runtime']['screenManager'].isNegativeDelta():
return
# is a vertical change?
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
return
# is it a horizontal change?
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
return
# echo word insteed of char
if self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'):
if abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) != 1:
# get the word
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
x, y, currWord, endOfScreen, lineBreak = \
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
if self.env['screen']['newCursor']['x'] == x:
return
x, y, currChar = char_utils.getCurrentChar(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
if not currChar.isspace():
self.env['runtime']['outputManager'].presentText(currChar, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import char_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return ''
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
return
if self.env['runtime']['screenManager'].isScreenChange():
return
# detect an change on the screen, we just want to cursor arround, so no change should appear
if self.env['runtime']['screenManager'].isDelta():
return
if self.env['runtime']['screenManager'].isNegativeDelta():
return
# is a vertical change?
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
return
# is it a horizontal change?
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
return
# echo word insteed of char
if self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'):
if abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) != 1:
# get the word
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
x, y, currWord, endOfScreen, lineBreak = \
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
if self.env['screen']['newCursor']['x'] == x:
return
x, y, currChar = char_utils.getCurrentChar(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
if not currChar.isspace():
self.env['runtime']['outputManager'].presentText(currChar, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
def setCallback(self, callback):
pass

View File

@ -1,59 +1,59 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import line_utils
from fenrirscreenreader.utils import word_utils
class command():
def __init__(self):
self.lastIdent = -1
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return ''
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
return
if self.env['runtime']['screenManager'].isScreenChange():
self.lastIdent = 0
return
# this leads to problems in vim -> status line change -> no announcement, so we do check the lengh as hack
if self.env['runtime']['screenManager'].isDelta():
return
# is a vertical change?
if not self.env['runtime']['cursorManager'].isCursorVerticalMove():
return
x, y, currLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
if currLine.isspace():
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
else:
# ident
currIdent = len(currLine) - len(currLine.lstrip())
if self.lastIdent == -1:
self.lastIdent = currIdent
doInterrupt = True
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'):
if self.lastIdent != currIdent:
self.env['runtime']['outputManager'].presentText(_('indented ') + str(currIdent) + ' ', interrupt=doInterrupt, flush=False)
doInterrupt = False
# barrier
sayLine = currLine
if self.env['runtime']['settingsManager'].getSettingAsBool('barrier','enabled'):
isBarrier, barrierLine = self.env['runtime']['barrierManager'].handleLineBarrier(self.env['screen']['newContentText'].split('\n'), self.env['screen']['newCursor']['x'],self.env['screen']['newCursor']['y'])
if isBarrier:
sayLine = barrierLine
# output
self.env['runtime']['outputManager'].presentText(sayLine, interrupt=doInterrupt, flush=False)
self.lastIdent = currIdent
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import line_utils
from fenrirscreenreader.utils import word_utils
class command():
def __init__(self):
self.lastIdent = -1
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return ''
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
return
if self.env['runtime']['screenManager'].isScreenChange():
self.lastIdent = 0
return
# this leads to problems in vim -> status line change -> no announcement, so we do check the lengh as hack
if self.env['runtime']['screenManager'].isDelta():
return
# is a vertical change?
if not self.env['runtime']['cursorManager'].isCursorVerticalMove():
return
x, y, currLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
if currLine.isspace():
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
else:
# ident
currIdent = len(currLine) - len(currLine.lstrip())
if self.lastIdent == -1:
self.lastIdent = currIdent
doInterrupt = True
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'):
if self.lastIdent != currIdent:
self.env['runtime']['outputManager'].presentText(_('indented ') + str(currIdent) + ' ', interrupt=doInterrupt, flush=False)
doInterrupt = False
# barrier
sayLine = currLine
if self.env['runtime']['settingsManager'].getSettingAsBool('barrier','enabled'):
isBarrier, barrierLine = self.env['runtime']['barrierManager'].handleLineBarrier(self.env['screen']['newContentText'].split('\n'), self.env['screen']['newCursor']['x'],self.env['screen']['newCursor']['y'])
if isBarrier:
sayLine = barrierLine
# output
self.env['runtime']['outputManager'].presentText(sayLine, interrupt=doInterrupt, flush=False)
self.lastIdent = currIdent
def setCallback(self, callback):
pass

View File

@ -1,58 +1,58 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import word_utils
import string
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
# is it enabled?
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'):
return
# is naviation?
if self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'] != 1:
return
# just when cursor move worddetection is needed
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
return
# for now no new line
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
return
# currently writing
if self.env['runtime']['screenManager'].isDelta():
return
# get the word
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
x, y, currWord, endOfScreen, lineBreak = \
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
# is there a word?
if currWord == '':
return
# at the end of a word
if not newContent[self.env['screen']['newCursor']['x']].isspace():
return
# at the end of a word
if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \
(x + len(currWord) != self.env['screen']['newCursor']['x']-1):
return
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import word_utils
import string
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
# is it enabled?
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'):
return
# is naviation?
if self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'] != 1:
return
# just when cursor move worddetection is needed
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
return
# for now no new line
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
return
# currently writing
if self.env['runtime']['screenManager'].isDelta():
return
# get the word
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
x, y, currWord, endOfScreen, lineBreak = \
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
# is there a word?
if currWord == '':
return
# at the end of a word
if not newContent[self.env['screen']['newCursor']['x']].isspace():
return
# at the end of a word
if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \
(x + len(currWord) != self.env['screen']['newCursor']['x']-1):
return
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
def setCallback(self, callback):
pass

View File

@ -1,54 +1,54 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import word_utils
import string
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
# is navigation?
if not abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) > 1:
return
# just when cursor move worddetection is needed
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
return
# for now no new line
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
return
# currently writing
if self.env['runtime']['screenManager'].isDelta():
return
# get the word
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
x, y, currWord, endOfScreen, lineBreak = \
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
# is there a word?
if currWord == '':
return
# at the start of a word
if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \
(self.env['screen']['newCursor']['x'] != x):
return
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import word_utils
import string
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
# is navigation?
if not abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) > 1:
return
# just when cursor move worddetection is needed
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
return
# for now no new line
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
return
# currently writing
if self.env['runtime']['screenManager'].isDelta():
return
# get the word
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
x, y, currWord, endOfScreen, lineBreak = \
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
# is there a word?
if currWord == '':
return
# at the start of a word
if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \
(self.env['screen']['newCursor']['x'] != x):
return
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
def setCallback(self, callback):
pass

View File

@ -1,46 +1,46 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charDeleteEcho'):
return
# detect typing or chilling
if self.env['screen']['newCursor']['x'] >= self.env['screen']['oldCursor']['x']:
return
# More than just a deletion happend
if self.env['runtime']['screenManager'].isDelta(ignoreSpace=True):
return
# no deletion
if not self.env['runtime']['screenManager'].isNegativeDelta():
return
# too much for a single backspace...
# word begin produce a diff wiht len == 2 |a | others with 1 |a|
if len(self.env['screen']['newNegativeDelta']) > 2:
return
currNegativeDelta = self.env['screen']['newNegativeDelta']
if len(currNegativeDelta.strip()) != len(currNegativeDelta) and \
currNegativeDelta.strip() != '':
currNegativeDelta = currNegativeDelta.strip()
self.env['runtime']['outputManager'].presentText(currNegativeDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charDeleteEcho'):
return
# detect typing or chilling
if self.env['screen']['newCursor']['x'] >= self.env['screen']['oldCursor']['x']:
return
# More than just a deletion happend
if self.env['runtime']['screenManager'].isDelta(ignoreSpace=True):
return
# no deletion
if not self.env['runtime']['screenManager'].isNegativeDelta():
return
# too much for a single backspace...
# word begin produce a diff wiht len == 2 |a | others with 1 |a|
if len(self.env['screen']['newNegativeDelta']) > 2:
return
currNegativeDelta = self.env['screen']['newNegativeDelta']
if len(currNegativeDelta.strip()) != len(currNegativeDelta) and \
currNegativeDelta.strip() != '':
currNegativeDelta = currNegativeDelta.strip()
self.env['runtime']['outputManager'].presentText(currNegativeDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
def setCallback(self, callback):
pass

View File

@ -1,26 +1,26 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('exits review mode')
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('review', 'leaveReviewOnCursorChange'):
return
if self.env['runtime']['cursorManager'].isReviewMode():
self.env['runtime']['cursorManager'].clearReviewCursor()
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('exits review mode')
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('review', 'leaveReviewOnCursorChange'):
return
if self.env['runtime']['cursorManager'].isReviewMode():
self.env['runtime']['cursorManager'].clearReviewCursor()
def setCallback(self, callback):
pass

View File

@ -1,34 +1,34 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import screen_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Reads attributes of current cursor position')
def run(self):
# is it enabled?
if not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes'):
return
# is a vertical change?
if not (self.env['runtime']['cursorManager'].isCursorVerticalMove() or\
self.env['runtime']['cursorManager'].isCursorHorizontalMove()):
return
cursorPos = self.env['screen']['newCursor']
if not self.env['runtime']['attributeManager'].hasAttributes(cursorPos):
return
self.env['runtime']['outputManager'].presentText('has attribute', soundIcon='HasAttributes', interrupt=False)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import screen_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Reads attributes of current cursor position')
def run(self):
# is it enabled?
if not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes'):
return
# is a vertical change?
if not (self.env['runtime']['cursorManager'].isCursorVerticalMove() or\
self.env['runtime']['cursorManager'].isCursorHorizontalMove()):
return
cursorPos = self.env['screen']['newCursor']
if not self.env['runtime']['attributeManager'].hasAttributes(cursorPos):
return
self.env['runtime']['outputManager'].presentText('has attribute', soundIcon='HasAttributes', interrupt=False)
def setCallback(self, callback):
pass

View File

@ -1,42 +1,42 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
# big changes are no char (but the value is bigger than one maybe the differ needs longer than you can type, so a little strange random buffer for now)
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
if xMove > 1:
return
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charEcho'):
return
# detect deletion or chilling
if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']:
return
# is there any change?
if not self.env['runtime']['screenManager'].isDelta():
return
# filter unneded space on word begin
currDelta = self.env['screen']['newDelta']
if len(currDelta.strip()) != len(currDelta) and \
currDelta.strip() != '':
currDelta = currDelta.strip()
self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
# big changes are no char (but the value is bigger than one maybe the differ needs longer than you can type, so a little strange random buffer for now)
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
if xMove > 1:
return
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charEcho'):
return
# detect deletion or chilling
if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']:
return
# is there any change?
if not self.env['runtime']['screenManager'].isDelta():
return
# filter unneded space on word begin
currDelta = self.env['screen']['newDelta']
if len(currDelta.strip()) != len(currDelta) and \
currDelta.strip() != '':
currDelta = currDelta.strip()
self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
def setCallback(self, callback):
pass

View File

@ -1,58 +1,58 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import word_utils
import string
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
# is it enabled?
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'):
return
# is naviation?
if self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'] != 1:
return
# just when cursor move worddetection is needed
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
return
# for now no new line
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
return
# currently writing
if self.env['runtime']['screenManager'].isDelta():
return
# get the word
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
x, y, currWord, endOfScreen, lineBreak = \
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
# is there a word?
if currWord == '':
return
# at the end of a word
if not newContent[self.env['screen']['newCursor']['x']].isspace():
return
# at the end of a word
if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \
(x + len(currWord) != self.env['screen']['newCursor']['x']-1):
return
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import word_utils
import string
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
# is it enabled?
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'):
return
# is naviation?
if self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'] != 1:
return
# just when cursor move worddetection is needed
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
return
# for now no new line
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
return
# currently writing
if self.env['runtime']['screenManager'].isDelta():
return
# get the word
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
x, y, currWord, endOfScreen, lineBreak = \
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
# is there a word?
if currWord == '':
return
# at the end of a word
if not newContent[self.env['screen']['newCursor']['x']].isspace():
return
# at the end of a word
if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \
(x + len(currWord) != self.env['screen']['newCursor']['x']-1):
return
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
def setCallback(self, callback):
pass

View File

@ -1,46 +1,46 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charDeleteEcho'):
return
# detect typing or chilling
if self.env['screen']['newCursor']['x'] >= self.env['screen']['oldCursor']['x']:
return
# More than just a deletion happend
if self.env['runtime']['screenManager'].isDelta(ignoreSpace=True):
return
# no deletion
if not self.env['runtime']['screenManager'].isNegativeDelta():
return
# too much for a single backspace...
# word begin produce a diff wiht len == 2 |a | others with 1 |a|
if len(self.env['screen']['newNegativeDelta']) > 2:
return
currNegativeDelta = self.env['screen']['newNegativeDelta']
if len(currNegativeDelta.strip()) != len(currNegativeDelta) and \
currNegativeDelta.strip() != '':
currNegativeDelta = currNegativeDelta.strip()
self.env['runtime']['outputManager'].presentText(currNegativeDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charDeleteEcho'):
return
# detect typing or chilling
if self.env['screen']['newCursor']['x'] >= self.env['screen']['oldCursor']['x']:
return
# More than just a deletion happend
if self.env['runtime']['screenManager'].isDelta(ignoreSpace=True):
return
# no deletion
if not self.env['runtime']['screenManager'].isNegativeDelta():
return
# too much for a single backspace...
# word begin produce a diff wiht len == 2 |a | others with 1 |a|
if len(self.env['screen']['newNegativeDelta']) > 2:
return
currNegativeDelta = self.env['screen']['newNegativeDelta']
if len(currNegativeDelta.strip()) != len(currNegativeDelta) and \
currNegativeDelta.strip() != '':
currNegativeDelta = currNegativeDelta.strip()
self.env['runtime']['outputManager'].presentText(currNegativeDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
def setCallback(self, callback):
pass

View File

@ -1,51 +1,51 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import char_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return ''
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
return
if self.env['runtime']['screenManager'].isScreenChange():
return
# detect an change on the screen, we just want to cursor arround, so no change should appear
if self.env['runtime']['screenManager'].isDelta():
return
if self.env['runtime']['screenManager'].isNegativeDelta():
return
# is a vertical change?
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
return
# is it a horizontal change?
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
return
# echo word insteed of char
if self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'):
if abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) != 1:
# get the word
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
x, y, currWord, endOfScreen, lineBreak = \
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
if self.env['screen']['newCursor']['x'] == x:
return
x, y, currChar = char_utils.getCurrentChar(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
if not currChar.isspace():
self.env['runtime']['outputManager'].presentText(currChar, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import char_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return ''
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
return
if self.env['runtime']['screenManager'].isScreenChange():
return
# detect an change on the screen, we just want to cursor arround, so no change should appear
if self.env['runtime']['screenManager'].isDelta():
return
if self.env['runtime']['screenManager'].isNegativeDelta():
return
# is a vertical change?
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
return
# is it a horizontal change?
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
return
# echo word insteed of char
if self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'):
if abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) != 1:
# get the word
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
x, y, currWord, endOfScreen, lineBreak = \
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
if self.env['screen']['newCursor']['x'] == x:
return
x, y, currChar = char_utils.getCurrentChar(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
if not currChar.isspace():
self.env['runtime']['outputManager'].presentText(currChar, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
def setCallback(self, callback):
pass

View File

@ -1,42 +1,42 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
# try to detect the tab completion by cursor change
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
if xMove == 1:
return
# is there any change?
if not self.env['runtime']['screenManager'].isDelta():
return
if not( (xMove > 1) and xMove == len(self.env['screen']['newDelta'])):
return
# detect deletion or chilling
if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']:
return
# filter unneded space on word begin
currDelta = self.env['screen']['newDelta']
if len(currDelta.strip()) != len(currDelta) and \
currDelta.strip() != '':
currDelta = currDelta.strip()
self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, announceCapital=True, flush=False)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
# try to detect the tab completion by cursor change
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
if xMove == 1:
return
# is there any change?
if not self.env['runtime']['screenManager'].isDelta():
return
if not( (xMove > 1) and xMove == len(self.env['screen']['newDelta'])):
return
# detect deletion or chilling
if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']:
return
# filter unneded space on word begin
currDelta = self.env['screen']['newDelta']
if len(currDelta.strip()) != len(currDelta) and \
currDelta.strip() != '':
currDelta = currDelta.strip()
self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, announceCapital=True, flush=False)
def setCallback(self, callback):
pass

View File

@ -1,54 +1,54 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import word_utils
import string
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
# is navigation?
if not abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) > 1:
return
# just when cursor move worddetection is needed
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
return
# for now no new line
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
return
# currently writing
if self.env['runtime']['screenManager'].isDelta():
return
# get the word
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
x, y, currWord, endOfScreen, lineBreak = \
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
# is there a word?
if currWord == '':
return
# at the start of a word
if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \
(self.env['screen']['newCursor']['x'] != x):
return
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import word_utils
import string
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
# is navigation?
if not abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) > 1:
return
# just when cursor move worddetection is needed
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
return
# for now no new line
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
return
# currently writing
if self.env['runtime']['screenManager'].isDelta():
return
# get the word
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
x, y, currWord, endOfScreen, lineBreak = \
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
# is there a word?
if currWord == '':
return
# at the start of a word
if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \
(self.env['screen']['newCursor']['x'] != x):
return
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
def setCallback(self, callback):
pass

View File

@ -1,59 +1,59 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import line_utils
from fenrirscreenreader.utils import word_utils
class command():
def __init__(self):
self.lastIdent = -1
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return ''
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
return
if self.env['runtime']['screenManager'].isScreenChange():
self.lastIdent = 0
return
# this leads to problems in vim -> status line change -> no announcement, so we do check the lengh as hack
if self.env['runtime']['screenManager'].isDelta():
return
# is a vertical change?
if not self.env['runtime']['cursorManager'].isCursorVerticalMove():
return
x, y, currLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
if currLine.isspace():
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
else:
# ident
currIdent = len(currLine) - len(currLine.lstrip())
if self.lastIdent == -1:
self.lastIdent = currIdent
doInterrupt = True
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'):
if self.lastIdent != currIdent:
self.env['runtime']['outputManager'].presentText(_('indented ') + str(currIdent) + ' ', interrupt=doInterrupt, flush=False)
doInterrupt = False
# barrier
sayLine = currLine
if self.env['runtime']['settingsManager'].getSettingAsBool('barrier','enabled'):
isBarrier, barrierLine = self.env['runtime']['barrierManager'].handleLineBarrier(self.env['screen']['newContentText'].split('\n'), self.env['screen']['newCursor']['x'],self.env['screen']['newCursor']['y'])
if isBarrier:
sayLine = barrierLine
# output
self.env['runtime']['outputManager'].presentText(sayLine, interrupt=doInterrupt, flush=False)
self.lastIdent = currIdent
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import line_utils
from fenrirscreenreader.utils import word_utils
class command():
def __init__(self):
self.lastIdent = -1
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return ''
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
return
if self.env['runtime']['screenManager'].isScreenChange():
self.lastIdent = 0
return
# this leads to problems in vim -> status line change -> no announcement, so we do check the lengh as hack
if self.env['runtime']['screenManager'].isDelta():
return
# is a vertical change?
if not self.env['runtime']['cursorManager'].isCursorVerticalMove():
return
x, y, currLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
if currLine.isspace():
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
else:
# ident
currIdent = len(currLine) - len(currLine.lstrip())
if self.lastIdent == -1:
self.lastIdent = currIdent
doInterrupt = True
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'):
if self.lastIdent != currIdent:
self.env['runtime']['outputManager'].presentText(_('indented ') + str(currIdent) + ' ', interrupt=doInterrupt, flush=False)
doInterrupt = False
# barrier
sayLine = currLine
if self.env['runtime']['settingsManager'].getSettingAsBool('barrier','enabled'):
isBarrier, barrierLine = self.env['runtime']['barrierManager'].handleLineBarrier(self.env['screen']['newContentText'].split('\n'), self.env['screen']['newCursor']['x'],self.env['screen']['newCursor']['y'])
if isBarrier:
sayLine = barrierLine
# output
self.env['runtime']['outputManager'].presentText(sayLine, interrupt=doInterrupt, flush=False)
self.lastIdent = currIdent
def setCallback(self, callback):
pass

View File

@ -1,34 +1,34 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import screen_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Reads attributes of current cursor position')
def run(self):
# is it enabled?
if not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes'):
return
# is a vertical change?
if not (self.env['runtime']['cursorManager'].isCursorVerticalMove() or\
self.env['runtime']['cursorManager'].isCursorHorizontalMove()):
return
cursorPos = self.env['screen']['newCursor']
if not self.env['runtime']['attributeManager'].hasAttributes(cursorPos):
return
self.env['runtime']['outputManager'].presentText('has attribute', soundIcon='HasAttributes', interrupt=False)
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import screen_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Reads attributes of current cursor position')
def run(self):
# is it enabled?
if not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes'):
return
# is a vertical change?
if not (self.env['runtime']['cursorManager'].isCursorVerticalMove() or\
self.env['runtime']['cursorManager'].isCursorHorizontalMove()):
return
cursorPos = self.env['screen']['newCursor']
if not self.env['runtime']['attributeManager'].hasAttributes(cursorPos):
return
self.env['runtime']['outputManager'].presentText('has attribute', soundIcon='HasAttributes', interrupt=False)
def setCallback(self, callback):
pass

View File

@ -1,26 +1,26 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('exits review mode')
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('review', 'leaveReviewOnCursorChange'):
return
if self.env['runtime']['cursorManager'].isReviewMode():
self.env['runtime']['cursorManager'].clearReviewCursor()
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('exits review mode')
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('review', 'leaveReviewOnCursorChange'):
return
if self.env['runtime']['cursorManager'].isReviewMode():
self.env['runtime']['cursorManager'].clearReviewCursor()
def setCallback(self, callback):
pass

View File

@ -1,29 +1,29 @@
#!/usr/bin/env python3
import time
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import time
import datetime
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
self.lastTime = datetime.datetime.now()
self.lastDateString = ''
self.lastTimeString = ''
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
self.env['runtime']['screenDriver'].getSessionInformation()
def setCallback(self, callback):
pass
#!/usr/bin/env python3
import time
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import time
import datetime
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
self.lastTime = datetime.datetime.now()
self.lastDateString = ''
self.lastTimeString = ''
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
self.env['runtime']['screenDriver'].getSessionInformation()
def setCallback(self, callback):
pass

View File

@ -1,85 +1,85 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import time
import datetime
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
self.lastTime = datetime.datetime.now()
self.lastDateString = ''
self.lastTimeString = ''
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('time', 'enabled'):
return
onMinutes = self.env['runtime']['settingsManager'].getSetting('time', 'onMinutes')
delaySec = self.env['runtime']['settingsManager'].getSettingAsInt('time', 'delaySec')
# no need
if onMinutes == '' and delaySec <= 0:
return
onMinutes = onMinutes.split(',')
now = datetime.datetime.now()
# ignore onMinutes if there is a delaySec
if delaySec > 0:
if int((now - self.lastTime).total_seconds()) < delaySec:
return
else:
# should announce?
if not str(now.minute).zfill(2) in onMinutes:
return
# already announced?
if now.hour == self.lastTime.hour:
if now.minute == self.lastTime.minute:
return
dateFormat = self.env['runtime']['settingsManager'].getSetting('general', 'dateFormat')
dateString = datetime.datetime.strftime(now, dateFormat)
presentDate = self.env['runtime']['settingsManager'].getSettingAsBool('time', 'presentDate') and \
self.lastDateString != dateString
presentTime = self.env['runtime']['settingsManager'].getSettingAsBool('time', 'presentTime')
# no changed value to announce
if not (presentDate or presentTime):
return
timeFormat = self.env['runtime']['settingsManager'].getSetting('general', 'timeFormat')
timeString = datetime.datetime.strftime(now, timeFormat)
if self.env['runtime']['settingsManager'].getSettingAsBool('time', 'interrupt'):
self.env['runtime']['outputManager'].interruptOutput()
if self.env['runtime']['settingsManager'].getSettingAsBool('time', 'announce'):
self.env['runtime']['outputManager'].playSoundIcon('announce')
if presentTime:
# present the time
self.env['runtime']['outputManager'].presentText(_("It's {0}").format(timeString.replace(':00', " O'clock ").lstrip('0')), soundIcon='', interrupt=False)
# Check if it's 12:00 AM
if now.hour == 0 and now.minute == 0:
# present the date
self.env['runtime']['outputManager'].presentText(dateString, soundIcon='', interrupt=False)
self.lastTime = datetime.datetime.now()
self.lastTimeString = timeString
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import time
import datetime
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
self.lastTime = datetime.datetime.now()
self.lastDateString = ''
self.lastTimeString = ''
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('time', 'enabled'):
return
onMinutes = self.env['runtime']['settingsManager'].getSetting('time', 'onMinutes')
delaySec = self.env['runtime']['settingsManager'].getSettingAsInt('time', 'delaySec')
# no need
if onMinutes == '' and delaySec <= 0:
return
onMinutes = onMinutes.split(',')
now = datetime.datetime.now()
# ignore onMinutes if there is a delaySec
if delaySec > 0:
if int((now - self.lastTime).total_seconds()) < delaySec:
return
else:
# should announce?
if not str(now.minute).zfill(2) in onMinutes:
return
# already announced?
if now.hour == self.lastTime.hour:
if now.minute == self.lastTime.minute:
return
dateFormat = self.env['runtime']['settingsManager'].getSetting('general', 'dateFormat')
dateString = datetime.datetime.strftime(now, dateFormat)
presentDate = self.env['runtime']['settingsManager'].getSettingAsBool('time', 'presentDate') and \
self.lastDateString != dateString
presentTime = self.env['runtime']['settingsManager'].getSettingAsBool('time', 'presentTime')
# no changed value to announce
if not (presentDate or presentTime):
return
timeFormat = self.env['runtime']['settingsManager'].getSetting('general', 'timeFormat')
timeString = datetime.datetime.strftime(now, timeFormat)
if self.env['runtime']['settingsManager'].getSettingAsBool('time', 'interrupt'):
self.env['runtime']['outputManager'].interruptOutput()
if self.env['runtime']['settingsManager'].getSettingAsBool('time', 'announce'):
self.env['runtime']['outputManager'].playSoundIcon('announce')
if presentTime:
# present the time
self.env['runtime']['outputManager'].presentText(_("It's {0}").format(timeString.replace(':00', " O'clock ").lstrip('0')), soundIcon='', interrupt=False)
# Check if it's 12:00 AM
if now.hour == 0 and now.minute == 0:
# present the date
self.env['runtime']['outputManager'].presentText(dateString, soundIcon='', interrupt=False)
self.lastTime = datetime.datetime.now()
self.lastTimeString = timeString
def setCallback(self, callback):
pass

View File

@ -1,26 +1,26 @@
#!/usr/bin/env python3
import time
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import time
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
print(time.time())
def setCallback(self, callback):
pass
#!/usr/bin/env python3
import time
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import time
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No Description found'
def run(self):
print(time.time())
def setCallback(self, callback):
pass

View File

@ -1,37 +1,37 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return ''
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'interruptOnKeyPress'):
return
if self.env['runtime']['inputManager'].noKeyPressed():
return
if self.env['runtime']['screenManager'].isScreenChange():
return
if len(self.env['input']['currInput']) <= len(self.env['input']['prevInput']):
return
# if the filter is set
if self.env['runtime']['settingsManager'].getSetting('keyboard', 'interruptOnKeyPressFilter').strip() != '':
filterList = self.env['runtime']['settingsManager'].getSetting('keyboard', 'interruptOnKeyPressFilter').split(',')
for currInput in self.env['input']['currInput']:
if not currInput in filterList:
return
self.env['runtime']['outputManager'].interruptOutput()
def setCallback(self, callback):
pass
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return ''
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'interruptOnKeyPress'):
return
if self.env['runtime']['inputManager'].noKeyPressed():
return
if self.env['runtime']['screenManager'].isScreenChange():
return
if len(self.env['input']['currInput']) <= len(self.env['input']['prevInput']):
return
# if the filter is set
if self.env['runtime']['settingsManager'].getSetting('keyboard', 'interruptOnKeyPressFilter').strip() != '':
filterList = self.env['runtime']['settingsManager'].getSetting('keyboard', 'interruptOnKeyPressFilter').split(',')
for currInput in self.env['input']['currInput']:
if not currInput in filterList:
return
self.env['runtime']['outputManager'].interruptOutput()
def setCallback(self, callback):
pass

Some files were not shown because too many files have changed in this diff Show More