Пример #1
0
def destroy_tmp(tmp_id):
    """Kill the window with the given id.

    We only use it to kill the tmp window.
    """

    i3.kill(con_id=tmp_id)
Пример #2
0
def run(num):
    # current workspace
    current = [ws for ws in i3.get_workspaces() if ws['focused']][0]
    # switch to workspace named 'fibonacci'
    i3.workspace('fibonacci')
    i3.layout('default')
    fibonacci(num)
    time.sleep(3)
    # close all opened terminals
    for n in range(num):
        i3.kill()
        time.sleep(0.5)
    i3.workspace(current['name'])
Пример #3
0
def run(num):
    # current workspace
    current = [ws for ws in i3.get_workspaces() if ws['focused']][0]
    # switch to workspace named 'fibonacci'
    i3.workspace('fibonacci')
    i3.layout('default')
    fibonacci(num)
    time.sleep(3)
    # close all opened terminals
    for n in range(num):
        i3.kill()
        time.sleep(0.5)
    i3.workspace(current['name'])
Пример #4
0
def cycle():
    # get currently focused windows
    current = i3.filter(nodes=[], focused=True)
    # get unfocused windows
    other = i3.filter(nodes=[], focused=False)
    # focus each previously unfocused window for 0.5 seconds
    for window in other:
        i3.focus(con_id=window['id'])
        i3.kill()
    # focus the original windows
    for window in current:
        i3.focus(con_id=window['id'])
        i3.kill()
Пример #5
0
def run(num):
    # current workspace
    current = [ws for ws in i3.get_workspaces() if ws["focused"]][0]
    # switch to workspace named 'fibonacci'
    i3.workspace("fibonacci")
    i3.layout("default")
    fibonacci(num)
    time.sleep(3)
    # close all opened terminals
    for n in range(num):
        i3.kill()
        time.sleep(0.5)
    i3.workspace(current["name"])
Пример #6
0
def destroy_tmp(tmp_id):
    i3.kill(con_id=tmp_id)
Пример #7
0
def destroy_tmp(tmp_id):
    i3.kill(con_id=tmp_id)
Пример #8
0
def kill(window):
    '''Kill the given window.'''
    return i3.kill(id=window)