Update linux.py

This commit is contained in:
chrys87 2016-09-13 12:58:47 +02:00 committed by GitHub
parent ddf84d8dfc
commit d7c65c32c9

View File

@ -27,6 +27,17 @@ class screen():
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 -e irssi | grep -v "grep -e irssi"', shell=True, stdout=subprocess.PIPE).stdout.read().decode()[:-1].split('\n')
except:
return xlist
for i in x:
if x[:3].upper() == 'TTY':
xlist.append(i[4])
return xlist
def update(self, environment, trigger='updateScreen'):
newTTY = ''