fix application detection, remove debugging print
This commit is contained in:
parent
1c2d0caa56
commit
90129d4161
@ -26,10 +26,10 @@ KEY_FENRIR,KEY_KPDOT=exit_review
|
||||
#KEY_FENRIR,KEY_KP5=curr_screen
|
||||
KEY_FENRIR,KEY_KP8=curr_screen_before_cursor
|
||||
KEY_FENRIR,KEY_KP2=curr_screen_after_cursor
|
||||
KEY_FENRIR,KEY_1=set_window_application
|
||||
KEY_FENRIR,KEY_3=clear_window_application
|
||||
#KEY_FENRIR,KEY_3=clear_bookmark_1
|
||||
#KEY_FENRIR,KEY_1=set_bookmark_1
|
||||
#KEY_FENRIR,KEY_1=set_window_application
|
||||
#KEY_FENRIR,KEY_3=clear_window_application
|
||||
KEY_FENRIR,KEY_3=clear_bookmark_1
|
||||
KEY_FENRIR,KEY_1=set_bookmark_1
|
||||
KEY_FENRIR,KEY_2=bookmark_1
|
||||
KEY_KPPLUS=last_incoming
|
||||
KEY_FENRIR,KEY_F2=toggle_braille
|
||||
|
@ -57,7 +57,7 @@ module=espeak
|
||||
voice=
|
||||
|
||||
# Select the language you want fenrir to use.
|
||||
language=english-us
|
||||
language=de
|
||||
|
||||
# Read new text as it happens?
|
||||
autoReadIncoming=True
|
||||
@ -82,7 +82,7 @@ device=AUTO
|
||||
grabDevices=True
|
||||
ignoreShortcuts=False
|
||||
# the current shortcut layout located in /etc/fenrir/keyboard
|
||||
keyboardLayout=desktop
|
||||
keyboardLayout=test
|
||||
# echo chars while typing.
|
||||
charEcho=False
|
||||
# echo deleted chars
|
||||
@ -95,7 +95,7 @@ interruptOnKeyPress=False
|
||||
doubleTapDelay=0.2
|
||||
|
||||
[general]
|
||||
debugLevel=3
|
||||
debugLevel=0
|
||||
punctuationLevel=Some
|
||||
numberOfClipboards=10
|
||||
# define the current fenrir key
|
||||
|
@ -29,7 +29,7 @@ class command():
|
||||
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
|
||||
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||
return
|
||||
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
|
||||
|
||||
# set marks
|
||||
marked = ''
|
||||
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()
|
||||
|
@ -29,7 +29,7 @@ class command():
|
||||
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
|
||||
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||
return
|
||||
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
|
||||
|
||||
# set marks
|
||||
marked = ''
|
||||
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()
|
||||
|
@ -29,7 +29,7 @@ class command():
|
||||
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
|
||||
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||
return
|
||||
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
|
||||
|
||||
# set marks
|
||||
marked = ''
|
||||
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()
|
||||
|
@ -29,7 +29,7 @@ class command():
|
||||
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
|
||||
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||
return
|
||||
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
|
||||
|
||||
# set marks
|
||||
marked = ''
|
||||
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()
|
||||
|
@ -29,7 +29,7 @@ class command():
|
||||
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
|
||||
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||
return
|
||||
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
|
||||
|
||||
# set marks
|
||||
marked = ''
|
||||
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()
|
||||
|
@ -29,7 +29,7 @@ class command():
|
||||
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
|
||||
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||
return
|
||||
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
|
||||
|
||||
# set marks
|
||||
marked = ''
|
||||
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()
|
||||
|
@ -29,7 +29,7 @@ class command():
|
||||
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
|
||||
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||
return
|
||||
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
|
||||
|
||||
# set marks
|
||||
marked = ''
|
||||
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()
|
||||
|
@ -29,7 +29,7 @@ class command():
|
||||
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
|
||||
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||
return
|
||||
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
|
||||
|
||||
# set marks
|
||||
marked = ''
|
||||
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()
|
||||
|
@ -29,7 +29,7 @@ class command():
|
||||
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
|
||||
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||
return
|
||||
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
|
||||
|
||||
# set marks
|
||||
marked = ''
|
||||
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()
|
||||
|
@ -29,7 +29,7 @@ class command():
|
||||
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
|
||||
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||
return
|
||||
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
|
||||
|
||||
# set marks
|
||||
marked = ''
|
||||
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()
|
||||
|
@ -18,7 +18,7 @@ class command():
|
||||
|
||||
def run(self):
|
||||
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||
|
||||
|
||||
del self.env['commandBuffer']['bookMarks'][self.ID][currApp]
|
||||
|
||||
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " removed for application " + currApp, interrupt=True)
|
||||
|
@ -25,7 +25,7 @@ class screenManager():
|
||||
self.env['runtime']['screenDriver'].getCurrScreen()
|
||||
if not self.isSuspendingScreen():
|
||||
if trigger == 'onUpdate':
|
||||
self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||
self.env['runtime']['screenDriver'].getCurrApplication()
|
||||
self.env['runtime']['screenDriver'].update(trigger)
|
||||
self.env['screenData']['lastScreenUpdate'] = time.time()
|
||||
|
||||
|
@ -34,8 +34,8 @@ class driver():
|
||||
currScreen = self.env['screenData']['newTTY']
|
||||
apps = subprocess.Popen('ps -t tty' + currScreen + ' -o comm,tty,stat', shell=True, stdout=subprocess.PIPE).stdout.read().decode()[:-1].split('\n')
|
||||
except Exception as e:
|
||||
return ''
|
||||
|
||||
print(e)
|
||||
return
|
||||
try:
|
||||
for i in apps:
|
||||
i = i.upper()
|
||||
@ -48,13 +48,14 @@ class driver():
|
||||
not "SH" == i[0] and \
|
||||
not "PS" == i[0]:
|
||||
if "TTY"+currScreen in i[1]:
|
||||
if self.env['runtime']['applicationManager'].isApplicationChange():
|
||||
if self.env['screenData']['newApplication'] != i[0]:
|
||||
self.env['screenData']['oldApplication'] = self.env['screenData']['newApplication']
|
||||
self.env['screenData']['newApplication'] = i[0]
|
||||
return
|
||||
except:
|
||||
return ''
|
||||
return ''
|
||||
return
|
||||
except Exception as e:
|
||||
print(e)
|
||||
return
|
||||
return
|
||||
|
||||
def getIgnoreScreens(self):
|
||||
xlist = []
|
||||
|
Loading…
Reference in New Issue
Block a user