sync
This commit is contained in:
parent
3a76217d7b
commit
f01583b13c
@ -77,7 +77,7 @@ Driver (screen, input):
|
|||||||
[X] detect colum/ lines
|
[X] detect colum/ lines
|
||||||
[X] resize on colum / line change
|
[X] resize on colum / line change
|
||||||
[W] make shell command configurable (or detect it)
|
[W] make shell command configurable (or detect it)
|
||||||
[W] stop emulation properly
|
[X] stop emulation properly
|
||||||
[] make pasteing text work again
|
[] make pasteing text work again
|
||||||
https://docs.python.org/3.2/library/pty.html
|
https://docs.python.org/3.2/library/pty.html
|
||||||
http://sqizit.bartletts.id.au/2011/02/14/pseudo-terminals-in-python/
|
http://sqizit.bartletts.id.au/2011/02/14/pseudo-terminals-in-python/
|
||||||
|
@ -334,13 +334,13 @@ class settingsManager():
|
|||||||
environment['runtime']['eventManager'] = eventManager.eventManager()
|
environment['runtime']['eventManager'] = eventManager.eventManager()
|
||||||
environment['runtime']['eventManager'].initialize(environment)
|
environment['runtime']['eventManager'].initialize(environment)
|
||||||
environment['runtime']['processManager'] = processManager.processManager()
|
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'] = outputManager.outputManager()
|
||||||
environment['runtime']['outputManager'].initialize(environment)
|
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'] = punctuationManager.punctuationManager()
|
||||||
environment['runtime']['punctuationManager'].initialize(environment)
|
environment['runtime']['punctuationManager'].initialize(environment)
|
||||||
environment['runtime']['cursorManager'] = cursorManager.cursorManager()
|
environment['runtime']['cursorManager'] = cursorManager.cursorManager()
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# Fenrir TTY screen reader
|
# Fenrir TTY screen reader
|
||||||
# By Chrys, Storm Dragon, and contributers.
|
# 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 import debug
|
||||||
from fenrirscreenreader.core.eventData import fenrirEventType
|
from fenrirscreenreader.core.eventData import fenrirEventType
|
||||||
from fenrirscreenreader.core.screenDriver import screenDriver
|
from fenrirscreenreader.core.screenDriver import screenDriver
|
||||||
@ -62,13 +62,14 @@ class driver(screenDriver):
|
|||||||
self.env['screen']['oldTTY'] = '1'
|
self.env['screen']['oldTTY'] = '1'
|
||||||
self.env['screen']['newTTY'] = '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
|
pass
|
||||||
|
|
||||||
def getSessionInformation(self):
|
def getSessionInformation(self):
|
||||||
self.env['screen']['autoIgnoreScreens'] = []
|
self.env['screen']['autoIgnoreScreens'] = []
|
||||||
self.env['general']['prevUser'] = 'chrys'
|
self.env['general']['prevUser'] = getpass.getuser()
|
||||||
self.env['general']['currUser'] = 'chrys'
|
self.env['general']['currUser'] = getpass.getuser()
|
||||||
def readAll(self,fd):
|
def readAll(self,fd):
|
||||||
bytes = os.read(fd, 65536)
|
bytes = os.read(fd, 65536)
|
||||||
if bytes == b'':
|
if bytes == b'':
|
||||||
@ -114,7 +115,7 @@ class driver(screenDriver):
|
|||||||
terminal, p_pid, p_out = self.openTerminal(columns, lines)
|
terminal, p_pid, p_out = self.openTerminal(columns, lines)
|
||||||
std_out = os.fdopen(sys.stdout.fileno(), "w+b", 0)
|
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)
|
r, w, x = select.select([sys.stdin, p_out, self.signalPipe[0]],[],[],1)
|
||||||
# none
|
# none
|
||||||
if r == []:
|
if r == []:
|
||||||
|
Loading…
Reference in New Issue
Block a user