improve app detection
This commit is contained in:
parent
94317eefac
commit
0b7f58b654
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -23,6 +23,7 @@ class screenManager():
|
||||
|
||||
def update(self, trigger='onUpdate'):
|
||||
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:
|
||||
|
@ -65,6 +65,7 @@ class fenrir():
|
||||
|
||||
self.handleCommands()
|
||||
#print(time.time()-startTime)
|
||||
self.env['screenData']['oldApplication'] = self.env['screenData']['newApplication']
|
||||
|
||||
def prepareCommand(self):
|
||||
if self.environment['runtime']['screenManager'].isSuspendingScreen():
|
||||
|
@ -49,7 +49,6 @@ 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
|
||||
except Exception as e:
|
||||
|
Loading…
Reference in New Issue
Block a user