예제 #1
0
def setup():
    porcupine.add_action(find,
                         "Edit/Find and Replace", ("Ctrl+F", '<Control-f>'),
                         tabtypes=[porcupine.tabs.FileTab])
    tab_manager = porcupine.get_tab_manager()
    tab_manager.bind("<<NewTab>>", on_new_tab, add=True)
    tab_manager.bind("<<CurrentTabChanged>>", on_tab_changed, add=True)
예제 #2
0
def setup():
    # it's possible to run full X11 on a Mac, so this is better than
    # e.g. platform.system()
    if get_tab_manager().tk.call('tk', 'windowingsystem') != 'x11':
        # TODO: more noob-friendly "u have the wrong os lel" message?
        messagebox.showerror(
            "Unsupported windowing system",
            "Sorry, the terminal plugin only works on X11 :(")
        return

    add_action(start_xterm, "Tools/Terminal", ('Ctrl+Shift+T', '<Control-T>'))
예제 #3
0
def setup():
    porcupine.add_action(play_tetris, 'Games/Tetris')
예제 #4
0
def setup():
    open_prompt = functools.partial(run, None)
    porcupine.add_action(run_this_file, "Run/Run File", ("F5", "<F5>"),
                         [tabs.FileTab])
    porcupine.add_action(open_prompt, "Run/Interactive Prompt",
                         ("Ctrl+I", "<Control-i>"))
예제 #5
0
def setup():
    porcupine.add_action(on_click, "Tools/autopep8", tabtypes=[tabs.FileTab])
예제 #6
0
def setup():
    porcupine.add_action(gotoline, 'Edit/Go to Line',
                         ('Ctrl+L', '<Control-l>'), tabtypes=[tabs.FileTab])