merge master
This commit is contained in:
commit
3d3a0f8296
@ -54,8 +54,11 @@ Driver:
|
|||||||
https://docs.python.org/3.2/library/pty.html
|
https://docs.python.org/3.2/library/pty.html
|
||||||
- implement PTY Input driver
|
- implement PTY Input driver
|
||||||
- ATK input driver (don't grab on graphical interface)
|
- ATK input driver (don't grab on graphical interface)
|
||||||
|
https://git.linux-a11y.org/AIT/pyatspi2/src/master/examples/keypress.py
|
||||||
- try to autodetect encoding (Easy for contribution)
|
- try to autodetect encoding (Easy for contribution)
|
||||||
https://stackoverflow.com/questions/6396659/how-do-you-get-the-encoding-of-the-terminal-from-within-a-python-script
|
https://stackoverflow.com/questions/6396659/how-do-you-get-the-encoding-of-the-terminal-from-within-a-python-script
|
||||||
|
- Dectalk SpeechDriver
|
||||||
|
https://github.com/tvraman/emacspeak/blob/master/servers/obsolete/python/dectalk.py
|
||||||
|
|
||||||
Settings:
|
Settings:
|
||||||
- configuration should be overwritable with parameter and alternative paths (Easy for contribution)
|
- configuration should be overwritable with parameter and alternative paths (Easy for contribution)
|
||||||
|
@ -65,31 +65,35 @@ class driver():
|
|||||||
self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR)
|
self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR)
|
||||||
|
|
||||||
def getSessionInformation(self):
|
def getSessionInformation(self):
|
||||||
bus = dbus.SystemBus()
|
try:
|
||||||
if not self.ListSessions:
|
bus = dbus.SystemBus()
|
||||||
obj = bus.get_object('org.freedesktop.login1', '/org/freedesktop/login1')
|
if not self.ListSessions:
|
||||||
inf = dbus.Interface(obj, 'org.freedesktop.login1.Manager')
|
obj = bus.get_object('org.freedesktop.login1', '/org/freedesktop/login1')
|
||||||
self.ListSessions = inf.get_dbus_method('ListSessions')
|
inf = dbus.Interface(obj, 'org.freedesktop.login1.Manager')
|
||||||
|
self.ListSessions = inf.get_dbus_method('ListSessions')
|
||||||
sessions = self.ListSessions()
|
|
||||||
self.env['screen']['autoIgnoreScreens'] = []
|
sessions = self.ListSessions()
|
||||||
for session in sessions:
|
self.env['screenData']['autoIgnoreScreens'] = []
|
||||||
obj = bus.get_object('org.freedesktop.login1', session[4])
|
for session in sessions:
|
||||||
inf = dbus.Interface(obj, 'org.freedesktop.DBus.Properties')
|
obj = bus.get_object('org.freedesktop.login1', session[4])
|
||||||
sessionType = inf.Get('org.freedesktop.login1.Session', 'Type')
|
inf = dbus.Interface(obj, 'org.freedesktop.DBus.Properties')
|
||||||
screen = str(inf.Get('org.freedesktop.login1.Session', 'VTNr'))
|
sessionType = inf.Get('org.freedesktop.login1.Session', 'Type')
|
||||||
if screen == '':
|
screen = str(inf.Get('org.freedesktop.login1.Session', 'VTNr'))
|
||||||
screen = str(inf.Get('org.freedesktop.login1.Session', 'TTY'))
|
if screen == '':
|
||||||
screen = screen[screen.upper().find('TTY') + 3:]
|
screen = str(inf.Get('org.freedesktop.login1.Session', 'TTY'))
|
||||||
if screen == '':
|
screen = screen[screen.upper().find('TTY') + 3:]
|
||||||
self.env['runtime']['debug'].writeDebugOut('No TTY found for session:' + session[4],debug.debugLevel.ERROR)
|
if screen == '':
|
||||||
return
|
self.env['runtime']['debug'].writeDebugOut('No TTY found for session:' + session[4],debug.debugLevel.ERROR)
|
||||||
if sessionType.upper() == 'X11':
|
return
|
||||||
self.env['screen']['autoIgnoreScreens'].append(screen)
|
if sessionType.upper() == 'X11':
|
||||||
if screen == self.env['screen']['newTTY'] :
|
self.env['screenData']['autoIgnoreScreens'].append(screen)
|
||||||
if self.env['general']['currUser'] != session[2]:
|
if screen == self.env['screenData']['newTTY'] :
|
||||||
self.env['general']['prevUser'] = self.env['general']['currUser']
|
if self.env['generalInformation']['currUser'] != session[2]:
|
||||||
self.env['general']['currUser'] = session[2]
|
self.env['generalInformation']['prevUser'] = self.env['generalInformation']['currUser']
|
||||||
|
self.env['generalInformation']['currUser'] = session[2]
|
||||||
|
except Exception as e:
|
||||||
|
self.env['runtime']['debug'].writeDebugOut('getSessionInformation: Maybe no LoginD:' + str(e),debug.debugLevel.ERROR)
|
||||||
|
self.env['screenData']['autoIgnoreScreens'] = []
|
||||||
|
|
||||||
def update(self, trigger='onUpdate'):
|
def update(self, trigger='onUpdate'):
|
||||||
newContentBytes = b''
|
newContentBytes = b''
|
||||||
|
Loading…
Reference in New Issue
Block a user