make vmenu path configurable

This commit is contained in:
chrys 2019-02-12 20:04:46 +01:00
parent 20ff9e1296
commit 58208beb3a
10 changed files with 59 additions and 2 deletions

View File

@ -219,6 +219,9 @@ enabled=True
inactiveTimeoutSec=120
list=
[menu]
vmenuPath=
[time]
enabled=False
presentTime=True

View File

@ -229,6 +229,9 @@ enabled=True
inactiveTimeoutSec=120
list=
[menu]
vmenuPath=
[time]
# automatic time anouncement
enabled=False

View File

@ -229,6 +229,9 @@ enabled=True
inactiveTimeoutSec=120
list=
[menu]
vmenuPath=
[time]
# automatic time anouncement
enabled=False

View File

@ -229,6 +229,9 @@ enabled=True
inactiveTimeoutSec=120
list=
[menu]
vmenuPath=
[time]
# automatic time anouncement
enabled=False

View File

@ -230,6 +230,9 @@ enabled=True
inactiveTimeoutSec=120
list=
[menu]
vmenuPath=
[time]
# automatic time anouncement
enabled=False

View File

@ -175,6 +175,9 @@ enabled=True
inactiveTimeoutSec=120
list=
[menu]
vmenuPath=
[time]
# automatic time anouncement
enabled=False

View File

@ -229,6 +229,9 @@ enabled=True
inactiveTimeoutSec=120
list=
[menu]
vmenuPath=
[time]
# automatic time anouncement
enabled=False

View File

@ -0,0 +1,25 @@
#!/bin/python
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
self.keyMakro = [[1, 'KEY_LEFTCTRL'], [1, 'KEY_G'], [0.05,'sleep'] ,[0, 'KEY_G'], [0, 'KEY_LEFTCTRL']]
def shutdown(self):
pass
def getDescription(self):
return 'No description found'
def run(self):
self.env['runtime']['inputManager'].sendKeys(self.keyMakro)
def setCallback(self, callback):
pass

View File

@ -99,6 +99,9 @@ settingsData = {
'leaveReviewOnCursorChange': True,
'leaveReviewOnScreenChange': True,
},
'menu':{
'vmenuPath': '',
},
'promote':{
'enabled': True,
'inactiveTimeoutSec': 120,

View File

@ -21,7 +21,15 @@ class vmenuManager():
self.lastSearchTime = time.time()
def initialize(self, environment):
self.env = environment
# use default path
self.defaultVMenuPath = fenrirPath+ "/commands/vmenu-profiles/" + self.env['runtime']['inputManager'].getShortcutType()
# if there is no user configuration
if self.env['runtime']['settingsManager'].getSetting('menu', 'vmenuPath') != '':
self.defaultVMenuPath = self.env['runtime']['settingsManager'].getSetting('menu', 'vmenuPath')
if not self.defaultVMenuPath.endswith('/'):
self.defaultVMenuPath += '/'
self.defaultVMenuPath += self.env['runtime']['inputManager'].getShortcutType()
self.createMenuTree()
self.closeAfterAction = False
def shutdown(self):
@ -37,9 +45,9 @@ class vmenuManager():
while True:
entry = self.getCurrentEntry()
if entry.startswith(self.searchText):
return True
return True
if not self.nextIndex():
return False
return False
if True:
return False
def setCurrMenu(self, currMenu = ''):