From 103186cacd8d4534a92e000d0c076ec473d4f1ce Mon Sep 17 00:00:00 2001 From: chrys87 Date: Thu, 7 Jun 2018 18:16:12 +0200 Subject: [PATCH 1/8] only update charmap when needed - speedup --- src/fenrirscreenreader/screenDriver/vcsaDriver.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fenrirscreenreader/screenDriver/vcsaDriver.py b/src/fenrirscreenreader/screenDriver/vcsaDriver.py index 4aa65d75..a5c823d3 100644 --- a/src/fenrirscreenreader/screenDriver/vcsaDriver.py +++ b/src/fenrirscreenreader/screenDriver/vcsaDriver.py @@ -106,6 +106,7 @@ class driver(screenDriver): tty = open('/sys/devices/virtual/tty/tty0/active','r') currScreen = str(tty.read()[3:-1]) oldScreen = currScreen + self.updateCharMap(currScreen) watchdog = select.epoll() watchdog.register(vcsa[currScreen], select.POLLPRI | select.POLLERR) watchdog.register(tty, select.POLLPRI | select.POLLERR) @@ -127,6 +128,7 @@ class driver(screenDriver): watchdog.register(vcsa[ currScreen ], select.POLLPRI | select.POLLERR) except: pass + self.updateCharMap(currScreen) oldScreen = currScreen try: vcsa[currScreen].seek(0) @@ -157,7 +159,6 @@ class driver(screenDriver): def createScreenEventData(self, screen, content): - self.updateCharMap(screen) eventData = { 'bytes': content, 'lines': int( content[0]), From cbf27278b95529255a6933e3ad11f3118d7058e3 Mon Sep 17 00:00:00 2001 From: chrys Date: Thu, 7 Jun 2018 23:59:19 +0200 Subject: [PATCH 2/8] remove enchant --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index da0bc9fe..dab34004 100755 --- a/setup.py +++ b/setup.py @@ -90,7 +90,6 @@ setup( "evdev", "daemonize", "dbus-python", - "pyenchant", "pyudev", "setuptools", "pexpect", From 93ddccf40e043609494b3ae1053d70ede8dfebfa Mon Sep 17 00:00:00 2001 From: chrys Date: Fri, 8 Jun 2018 00:07:09 +0200 Subject: [PATCH 3/8] sync --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index dab34004..e92de971 100755 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ from shutil import copyfile from setuptools import find_packages from setuptools import setup -fenrirVersion = '1.8' +fenrirVersion = '1.7' packageVersion = 'post1' # handle flags for package manager like yaourt and pacaur. From e0448e70aab44a9916d9570bbaadd4e845bd9eca Mon Sep 17 00:00:00 2001 From: chrys Date: Fri, 8 Jun 2018 00:07:58 +0200 Subject: [PATCH 4/8] sync --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e92de971..8a5ba0cf 100755 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ from setuptools import find_packages from setuptools import setup fenrirVersion = '1.7' -packageVersion = 'post1' +packageVersion = 'post2' # handle flags for package manager like yaourt and pacaur. forceSettings = False From 2f39ae9a3ddbe0550059579b5140bea519d25411 Mon Sep 17 00:00:00 2001 From: chrys Date: Fri, 8 Jun 2018 00:13:27 +0200 Subject: [PATCH 5/8] sync --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 8a5ba0cf..a1629837 100755 --- a/setup.py +++ b/setup.py @@ -6,8 +6,8 @@ from shutil import copyfile from setuptools import find_packages from setuptools import setup -fenrirVersion = '1.7' -packageVersion = 'post2' +fenrirVersion = '1.9' +packageVersion = 'post1' # handle flags for package manager like yaourt and pacaur. forceSettings = False From 85ec5d22eace1991c9d39d4a2e91cf7048902152 Mon Sep 17 00:00:00 2001 From: chrys87 Date: Fri, 8 Jun 2018 10:41:32 +0200 Subject: [PATCH 6/8] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7da2fa6c..fe1de38c 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ This software is licensed under the LGPL v3. 3. "dummyDriver" just a dummy # Speech Drivers: -1. "genericDriver" (default) sound driver for sound as subprocess: +1. "genericDriver" (default) speech driver for sound as subprocess: - espeak or espeak-ng 2. "espeakDriver" speech driver for Espeak or Espeak-NG: - python-espeak From 9a0ce7723654a8b7027513ff45f2b2c8761cc758 Mon Sep 17 00:00:00 2001 From: chrys Date: Fri, 8 Jun 2018 20:43:25 +0200 Subject: [PATCH 7/8] improve output for pdmenu --- setup.py | 2 ++ .../commands/onScreenUpdate/60000-history.py | 3 +++ src/fenrirscreenreader/core/screenManager.py | 8 ++++++++ 3 files changed, 13 insertions(+) diff --git a/setup.py b/setup.py index a1629837..5050d899 100755 --- a/setup.py +++ b/setup.py @@ -26,8 +26,10 @@ for directory in directories: destDir = '/etc/fenrirscreenreader/keyboard' elif 'config/settings' in directory: destDir = '/etc/fenrirscreenreader/settings' + print(forceSettings) if not forceSettings: try: + print('delete') del(files[files.index('config/settings/settings.conf')]) except: pass diff --git a/src/fenrirscreenreader/commands/onScreenUpdate/60000-history.py b/src/fenrirscreenreader/commands/onScreenUpdate/60000-history.py index 5d5d2d0b..dd97d9b2 100644 --- a/src/fenrirscreenreader/commands/onScreenUpdate/60000-history.py +++ b/src/fenrirscreenreader/commands/onScreenUpdate/60000-history.py @@ -22,6 +22,9 @@ class command(): return if self.env['runtime']['cursorManager'].isCursorVerticalMove(): return + if self.env['screen']['newCursor']['x'] == == self.env['runtime']['screenManager'].getColums() - 1 and\ + self.env['screen']['newCursor']['y'] == self.env['runtime']['screenManager'].getRows() - 1): + return if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']: if not (self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_UP'],['KEY_DOWN']]): return diff --git a/src/fenrirscreenreader/core/screenManager.py b/src/fenrirscreenreader/core/screenManager.py index 6c5d6aa9..28a97774 100644 --- a/src/fenrirscreenreader/core/screenManager.py +++ b/src/fenrirscreenreader/core/screenManager.py @@ -15,6 +15,12 @@ class screenManager(): self.prevScreenIgnored = False self.prevScreenText = '' self.currScreenText = '' + self.colums = None + self.rows = None + def getRows(self): + return self.rows + def getColumns(self): + return self.colums def initialize(self, environment): self.env = environment self.env['runtime']['settingsManager'].loadDriver(\ @@ -97,6 +103,8 @@ class screenManager(): # get metadata like cursor or screensize self.env['screen']['lines'] = int( eventData['lines']) self.env['screen']['columns'] = int( eventData['columns']) + self.colums = int( eventData['columns']) + self.rows = int( eventData['lines']) self.env['screen']['newCursor']['x'] = int( eventData['textCursor']['x']) self.env['screen']['newCursor']['y'] = int( eventData['textCursor']['y']) self.env['screen']['newTTY'] = eventData['screen'] From cded3aa44c80dae281f582ba8f8884fff8c67a69 Mon Sep 17 00:00:00 2001 From: chrys Date: Fri, 8 Jun 2018 20:44:33 +0200 Subject: [PATCH 8/8] improve output for pdmenu --- setup.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 5050d899..fa468de5 100755 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ from setuptools import find_packages from setuptools import setup fenrirVersion = '1.9' -packageVersion = 'post1' +packageVersion = 'post2' # handle flags for package manager like yaourt and pacaur. forceSettings = False @@ -26,10 +26,8 @@ for directory in directories: destDir = '/etc/fenrirscreenreader/keyboard' elif 'config/settings' in directory: destDir = '/etc/fenrirscreenreader/settings' - print(forceSettings) if not forceSettings: try: - print('delete') del(files[files.index('config/settings/settings.conf')]) except: pass