예제 #1
0
파일: focus.py 프로젝트: tronje/dotfiles
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
파일: focus.py 프로젝트: southqaw/dotfiles
def destroy_tmp(tmp_id):
    i3.kill(con_id=tmp_id)
예제 #8
0
파일: quickswitch.py 프로젝트: mandus/cfg
def kill(window):
    '''Kill the given window.'''
    return i3.kill(id=window)