make X autodetect working, cleanups, remove unecressary returns, shotdown of the drivers in the managers

This commit is contained in:
chrys
2016-09-17 01:04:03 +02:00
parent 52fbef639c
commit 7d7c021774
12 changed files with 93 additions and 225 deletions

View File

@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
import difflib
import subprocess
from utils import debug
class driver():
@ -31,12 +32,13 @@ class driver():
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:
x = subprocess.Popen('ps a -o tty,comm | grep -e Xorg | grep -v "grep -e 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 x[:3].upper() == 'TTY':
xlist.append(i[4])
if i[:3].upper() == 'TTY':
xlist.append(i[3])
return xlist
def update(self, environment, trigger='updateScreen'):