diff --git a/src/fenrir-package/commands/onSwitchApplicationProfile/deactive/agetty.py b/src/fenrir-package/commands/onSwitchApplicationProfile/deactive/agetty.py deleted file mode 100644 index 6981dffb..00000000 --- a/src/fenrir-package/commands/onSwitchApplicationProfile/deactive/agetty.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/python -# -*- coding: utf-8 -*- - -# Fenrir TTY screen reader -# By Chrys, Storm Dragon, and contributers. - -from 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 load(self): - print('--------------') - print('agetty') - print('load old',self.env['screenData']['oldApplication']) - print('load new',self.env['screenData']['newApplication']) - print('--------------') - - def unload(self): - print('--------------') - print('agetty') - print('unload old',self.env['screenData']['oldApplication']) - print('unload new',self.env['screenData']['newApplication']) - print('--------------') - - def setCallback(self, callback): - pass diff --git a/src/fenrir-package/commands/onSwitchApplicationProfile/deactive/bash.py b/src/fenrir-package/commands/onSwitchApplicationProfile/deactive/bash.py deleted file mode 100644 index 3cd9d8d0..00000000 --- a/src/fenrir-package/commands/onSwitchApplicationProfile/deactive/bash.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/python -# -*- coding: utf-8 -*- - -# Fenrir TTY screen reader -# By Chrys, Storm Dragon, and contributers. - -from 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 load(self): - print('--------------') - print('bash') - print('load old',self.env['screenData']['oldApplication']) - print('load new',self.env['screenData']['newApplication']) - print('--------------') - - def unload(self): - print('--------------') - print('bash') - print('unload old',self.env['screenData']['oldApplication']) - print('unload new',self.env['screenData']['newApplication']) - print('--------------') - - def setCallback(self, callback): - pass diff --git a/src/fenrir-package/commands/onSwitchApplicationProfile/deactive/default.py b/src/fenrir-package/commands/onSwitchApplicationProfile/deactive/default.py deleted file mode 100644 index 87326f4f..00000000 --- a/src/fenrir-package/commands/onSwitchApplicationProfile/deactive/default.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/python -# -*- coding: utf-8 -*- - -# Fenrir TTY screen reader -# By Chrys, Storm Dragon, and contributers. - -from 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 load(self): - print('--------------') - print('default') - print('load old',self.env['screenData']['oldApplication']) - print('load new',self.env['screenData']['newApplication']) - print('--------------') - - def unload(self): - print('--------------') - print('default') - print('unload old',self.env['screenData']['oldApplication']) - print('unload new',self.env['screenData']['newApplication']) - print('--------------') - - def setCallback(self, callback): - pass diff --git a/src/fenrir-package/commands/onSwitchApplicationProfile/deactive/vim.py b/src/fenrir-package/commands/onSwitchApplicationProfile/deactive/vim.py deleted file mode 100644 index 3f8563e4..00000000 --- a/src/fenrir-package/commands/onSwitchApplicationProfile/deactive/vim.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/python -# -*- coding: utf-8 -*- - -# Fenrir TTY screen reader -# By Chrys, Storm Dragon, and contributers. - -from 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 load(self): - print('--------------') - print('vim') - print('load old',self.env['screenData']['oldApplication']) - print('load new',self.env['screenData']['newApplication']) - print('--------------') - - def unload(self): - print('--------------') - print('vim') - print('unload old',self.env['screenData']['oldApplication']) - print('unload new',self.env['screenData']['newApplication']) - print('--------------') - - def setCallback(self, callback): - pass diff --git a/src/fenrir-package/core/screenManager.py b/src/fenrir-package/core/screenManager.py index a7b0d278..6cd09207 100644 --- a/src/fenrir-package/core/screenManager.py +++ b/src/fenrir-package/core/screenManager.py @@ -22,7 +22,8 @@ class screenManager(): self.env['runtime']['settingsManager'].shutdownDriver('screenDriver') def update(self, trigger='onUpdate'): - self.env['runtime']['screenDriver'].getCurrScreen() + self.env['runtime']['screenDriver'].getCurrScreen() + self.env['screenData']['oldApplication'] = self.env['screenData']['newApplication'] if not self.isSuspendingScreen(): self.env['runtime']['screenDriver'].update(trigger) if trigger == 'onUpdate' or self.isScreenChange() or len(self.env['screenData']['newDelta']) > 6: diff --git a/src/fenrir-package/fenrir.py b/src/fenrir-package/fenrir.py index daf3bfb6..7c41ba97 100755 --- a/src/fenrir-package/fenrir.py +++ b/src/fenrir-package/fenrir.py @@ -64,7 +64,8 @@ class fenrir(): self.environment['runtime']['commandManager'].executeDefaultTrigger('onScreenUpdate') self.handleCommands() - #print(time.time()-startTime) + #print(time.time()-startTime) + self.env['screenData']['oldApplication'] = self.env['screenData']['newApplication'] def prepareCommand(self): if self.environment['runtime']['screenManager'].isSuspendingScreen(): diff --git a/src/fenrir-package/screenDriver/linux.py b/src/fenrir-package/screenDriver/linux.py index c0048dfb..1a9fd966 100644 --- a/src/fenrir-package/screenDriver/linux.py +++ b/src/fenrir-package/screenDriver/linux.py @@ -49,9 +49,8 @@ class driver(): not "PS" == i[0]: if "TTY"+currScreen in i[1]: if self.env['screenData']['newApplication'] != i[0]: - self.env['screenData']['oldApplication'] = self.env['screenData']['newApplication'] - self.env['screenData']['newApplication'] = i[0] - return + self.env['screenData']['newApplication'] = i[0] + return except Exception as e: print(e) return