Пример #1
0
def get_clipboard_contents(keys):
    clipboard_contents = baseutils.get_clipboard_contents()
    api.send_string(keys)
    time.sleep(.1)
    new_contents = baseutils.get_clipboard_contents()
    baseutils.set_clipboard_contents(clipboard_contents)
    return new_contents
Пример #2
0
def get_clipboard_contents(keys):
    clipboard_contents = baseutils.get_clipboard_contents()
    api.send_string(keys)
    time.sleep(.1)
    new_contents = baseutils.get_clipboard_contents()
    baseutils.set_clipboard_contents(clipboard_contents)
    return new_contents
Пример #3
0
def open_shell():
    clipboard_contents = baseutils.get_clipboard_contents()
    api.send_string("{escape}:let @+ = expand('%:p'){enter}")
    subprocess.call(['x-terminal-emulator'])
    time.sleep(1)
    api.send_string(
        'cd {}'.format(os.path.dirname(baseutils.get_clipboard_contents())) +
        '{enter}')
    baseutils.set_clipboard_contents(clipboard_contents)
    time.sleep(.2)
Пример #4
0
 def debug(self, words):
     api.send_string('{ctrl+s}')
     clipboard_contents = baseutils.get_clipboard_contents()
     api.send_string(au.OTHER['filePathToClipboard'])
     subprocess.call(['x-terminal-emulator'])
     time.sleep(1)
     api.send_string('python3 {ctrl+shift+v}{enter}')
     baseutils.set_clipboard_contents(clipboard_contents)
Пример #5
0
 def debug(self, words):
     api.send_string('{ctrl+s}')
     clipboard_contents = baseutils.get_clipboard_contents()
     api.send_string(au.OTHER['filePathToClipboard'])
     subprocess.call(['x-terminal-emulator'])
     time.sleep(1)
     api.send_string('python3 {ctrl+shift+v}{enter}')
     baseutils.set_clipboard_contents(clipboard_contents)
Пример #6
0
 def debug(self, words):
     api.send_string('zz')
     clipboard_contents = baseutils.get_clipboard_contents()
     api.send_string("{escape}:let @+ = expand('%:p'){enter}")
     subprocess.call(['x-terminal-emulator'])
     time.sleep(1)
     api.send_string('python3 {ctrl+shift+v}{enter}')
     baseutils.set_clipboard_contents(clipboard_contents)
Пример #7
0
 def debug(self, words):
     api.send_string('zz')
     clipboard_contents = baseutils.get_clipboard_contents()
     api.send_string("{escape}:let @+ = expand('%:p'){enter}")
     subprocess.call(['x-terminal-emulator'])
     time.sleep(1)
     api.send_string('python3 {ctrl+shift+v}{enter}')
     baseutils.set_clipboard_contents(clipboard_contents)
Пример #8
0
 def paste(self, words):
     if len(words) > 1 and words[1] == 'strip':
         contents = baseutils.get_clipboard_contents().strip()
         baseutils.set_clipboard_contents(contents)
         del words[1]
     if len(words) == 1:
         api.send_string('{ctrl+v}')
         return
     if len(words) > 1 and words[1].isdigit():
         api.send_string('{{escape}}{}gg'.format(words[-1]))
     api.send_string('p')