This commit is contained in:
chrys
2018-03-25 15:54:12 +02:00
parent 3a76217d7b
commit f01583b13c
3 changed files with 12 additions and 11 deletions

View File

@ -334,13 +334,13 @@ class settingsManager():
environment['runtime']['eventManager'] = eventManager.eventManager()
environment['runtime']['eventManager'].initialize(environment)
environment['runtime']['processManager'] = processManager.processManager()
environment['runtime']['processManager'].initialize(environment)
environment['runtime']['processManager'].initialize(environment)
environment['runtime']['commandManager'] = commandManager.commandManager()
environment['runtime']['commandManager'].initialize(environment)
environment['runtime']['inputManager'] = inputManager.inputManager()
environment['runtime']['inputManager'].initialize(environment)
environment['runtime']['outputManager'] = outputManager.outputManager()
environment['runtime']['outputManager'].initialize(environment)
environment['runtime']['commandManager'] = commandManager.commandManager()
environment['runtime']['commandManager'].initialize(environment)
environment['runtime']['inputManager'] = inputManager.inputManager()
environment['runtime']['inputManager'].initialize(environment)
environment['runtime']['punctuationManager'] = punctuationManager.punctuationManager()
environment['runtime']['punctuationManager'].initialize(environment)
environment['runtime']['cursorManager'] = cursorManager.cursorManager()

View File

@ -4,7 +4,7 @@
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
import os, struct, sys, pty, tty, termios, shlex, signal, select, pyte, time, fcntl
import os, struct, sys, pty, tty, termios, shlex, signal, select, pyte, time, fcntl ,getpass
from fenrirscreenreader.core import debug
from fenrirscreenreader.core.eventData import fenrirEventType
from fenrirscreenreader.core.screenDriver import screenDriver
@ -62,13 +62,14 @@ class driver(screenDriver):
self.env['screen']['oldTTY'] = '1'
self.env['screen']['newTTY'] = '1'
def injectTextToScreen(self, text, screen = None):
def injectTextToScreen(self, msgBytes, screen = None):
#os.write(p_out.fileno(), msgBytes)
pass
def getSessionInformation(self):
self.env['screen']['autoIgnoreScreens'] = []
self.env['general']['prevUser'] = 'chrys'
self.env['general']['currUser'] = 'chrys'
self.env['general']['prevUser'] = getpass.getuser()
self.env['general']['currUser'] = getpass.getuser()
def readAll(self,fd):
bytes = os.read(fd, 65536)
if bytes == b'':
@ -114,7 +115,7 @@ class driver(screenDriver):
terminal, p_pid, p_out = self.openTerminal(columns, lines)
std_out = os.fdopen(sys.stdout.fileno(), "w+b", 0)
while active:
while active.value:
r, w, x = select.select([sys.stdin, p_out, self.signalPipe[0]],[],[],1)
# none
if r == []: