fix mistakes

This commit is contained in:
chrys 2016-09-20 18:00:22 +02:00
parent cd58d24a74
commit 4fd69bfe2d
2 changed files with 25 additions and 25 deletions

View File

@ -38,7 +38,7 @@ class fenrir():
if not timeout:
self.prepareCommand()
if not (self.environment['runtime']['inputManager'].isConsumeInput(self.environment) or \
self.environment['runtime']['inputManager'].isFenrirKeyPressed(self.environment) and
self.environment['runtime']['inputManager'].isFenrirKeyPressed(self.environment)) and \
not self.environment['runtime']['commandManager'].isCommandQueued(self.environment):
self.environment['runtime']['inputManager'].writeEventBuffer(self.environment)
elif self.environment['runtime']['inputManager'].noKeyPressed(self.environment):

View File

@ -28,21 +28,7 @@ class driver():
environment['runtime']['debug'].writeDebugOut(environment,str(e),debug.debugLevel.ERROR)
return currScreen
def getIgnoreScreens(self):
xlist = []
try:
x = subprocess.Popen('ps a -o tty,comm | grep Xorg', shell=True, stdout=subprocess.PIPE).stdout.read().decode()[:-1].split('\n')
except Exception as e:
print(e)
return xlist
for i in x:
if not "grep" in i and \
if not "ps" in i:
if (i[:3].lower() == 'tty'):
xlist.append(i[3])
return xlist
def getCurrApplication(self, screen):
def getCurrApplication(self, screen):
apps = []
appList = []
try:
@ -63,6 +49,21 @@ def getCurrApplication(self, screen):
appList.append(i[0])
return appList
def getIgnoreScreens(self):
xlist = []
try:
x = subprocess.Popen('ps a -o tty,comm | grep Xorg', shell=True, stdout=subprocess.PIPE).stdout.read().decode()[:-1].split('\n')
except Exception as e:
print(e)
return xlist
for i in x:
if not "grep" in i and \
not "ps" in i:
if (i[:3].lower() == 'tty'):
xlist.append(i[3])
return xlist
def update(self, environment, trigger='updateScreen'):
newTTY = ''
newContentBytes = b''
@ -138,4 +139,3 @@ def getCurrApplication(self, screen):
environment['screenData']['newDelta'] = ''.join(x[2:] for x in diffList if x.startswith('+ '))
environment['screenData']['newNegativeDelta'] = ''.join(x[2:] for x in diffList if x.startswith('- '))