Esempio n. 1
0
KEYS = _configuration.get('keys', [])
KEY_TRANSLATIONS = _configuration.get('key_translations', {})
MODIFIERS = _configuration.get('modifiers', {})

CONNECT_RETRY_COOLDOWN = _configuration.get('connect_retry_cooldown', 5)

STALE_CONTEXT_DELTA = _configuration.get('stale_context_delta', 0.025)

CONNECT_TIMEOUT = _configuration.get('connect_timeout', 0.1)
COMMAND_TIMEOUT = _configuration.get('command_timeout', 2)

SECURITY_TOKEN = _configuration['security_token']

if _configuration.get('restrict_proxy_to_aenea_client', True):
    proxy_enable_context = dragonfly.AppContext(
        executable="python", title="Aenea client - Dictation capturing")
else:

    def _scoped():
        class AlwaysContext(dragonfly.Context):
            def matches(self, windows_executable, windows_title,
                        windows_handle):
                return True

        return AlwaysContext()

    proxy_enable_context = _scoped()

_last_foreground_time = 0
_last_foreground = None
 def build(self, call_info):
     executable = _get_single_anon_string(call_info.arguments,
                                          "Executable context")
     return dragonfly.AppContext(executable=executable)
 def build(self, call_info):
     title = _get_single_anon_string(call_info.arguments,
                                     "Title context")
     return dragonfly.AppContext(title=title)
Esempio n. 4
0
    'fold one': esc + fly.Text('zm'),
    'visual': fly.Key('V'),
    'ask': fly.Key('escape'),
    'search <text>': esc + fly.Text('/%(text)s'),
    'sem | semi | some': fly.Text(';'),
    #'indent [<n>]':                     Key('>:%(n)d')
    #'unindent [<n>]':                   Key('<:%(n)d')
}
vim_mapping.update(key_mapping)
vim_mapping.update(symbol_mapping)
vim_mapping.update(vim_nav)
vim_mapping.update(vim_other)
vim_mapping.update(vim_leader)
vim_mapping.update(vim_commands)

vim_context = fly.AppContext(executable="gvim")

#key_mapping = {
#    '(A. | a | alpha)'        : 'a',
#    '(B. | bravo) '           : 'b',
#    '(C. | charlie) '         : 'c',
#    '(D. | delta) '           : 'd',
#    '(E. | echo) '            : 'e',
#    '(F. | foxtrot) '         : 'f',
#    '(G. | golf) '            : 'g',
#    '(H. | hotel) '           : 'h',
#    '(I. | india | indigo) '  : 'i',
#    '(J. | juliet) '          : 'j',
#    '(K. | kilo) '            : 'k',
#    '(L. | lima) '            : 'l',
#    '(M. | mike) '            : 'm',