Пример #1
0
def main():
    windows = scratchpad_windows()
    # search for focused window among scratchpad windows
    if i3.filter(windows, focused=True):
        # move that window back to scratchpad
        i3.move('scratchpad')
    # show the next scratchpad window
    i3.scratchpad('show')
Пример #2
0
def main():
    windows = scratchpad_windows()
    # search for focused window among scratchpad windows
    if i3.filter(windows, focused=True):
        # move that window back to scratchpad
        i3.move('scratchpad')
    # show the next scratchpad window
    i3.scratchpad('show')
Пример #3
0
def positionWindow():
    i3.scratchpad("show", instance="metask")
    workspace = [ws for ws in i3.get_workspaces() if ws['focused']][0]
    screen_w =str(workspace['rect']['width'])
    screen_h =str(workspace['rect']['height'])

    targetheight = str(workspace['rect']['height']/3)

    current = i3.filter(nodes=[], focused=True)

    i3.command("move","absolute","position","0",str(barHeight))
    i3.command("resize","shrink","width",screen_w);
    i3.command("resize","shrink","height",screen_h);
    i3.command("resize","grow","width",screen_w);
    i3.command("resize","grow","height",targetheight);
Пример #4
0
def main(argv1):
    currentLang = os.popen(
        "~/softwares/xkblayout-state/xkblayout-state print %n").read()

    if currentLang == "Hebrew":
        if argv1 == "whats-app":
            argv1 = "slack"
        else:
            argv1 = "whats-app"
    os.system("setxkbmap us")
    apps = ["slack", "whats-app"]
    if isAppInFocus(argv1):
        i3.focus(instance=argv1)
        i3.move('scratchpad')
        for app in apps:
            if isAppInFocus(app):
                i3.move('scratchpad')
    else:
        if argv1 == "whats-app":
            os.system("setxkbmap il")

        i3.scratchpad('show', instance=argv1 + ".*")
Пример #5
0
def get_scratchpad_window(window):
    '''Does `scratchpad show` on the specified window.'''
    return i3.scratchpad("show", id=window)
Пример #6
0
def get_scratchpad_window(window):
    '''Does `scratchpad show` on the specified window.'''
    return i3.scratchpad("show", id=window)
Пример #7
0
def show_VM():
    i3.scratchpad('show', title='^.*Oracle VM.*$')
#!/usr/bin/env python
import i3
import os
import subprocess
import sys
from lib import dmenu, dmenu_cmd


if __name__ == '__main__':
    scratchpad = i3.filter(name="__i3_scratch")[0]
    nodes = scratchpad["floating_nodes"]
    windows = [i for i in i3.filter(tree=nodes, nodes=[])]
    window_titles = ['%s #%s' % (i.get('name'), i.get('window')) for i in windows]
    answer = dmenu(window_titles, dmenu_cmd('select window: '))
    if answer:
        i3.scratchpad("show", id=answer.split('#')[-1])
        if len(sys.argv) > 1 and sys.argv[1] == '1':
            # floating mode, do nothing
            pass
        else:
            i3.floating('disable')

Пример #9
0
#!/usr/bin/env python3

import i3

scratch = i3.filter(name="__i3_scratch")[0]

if scratch["floating_nodes"]:
	i3.scratchpad("show")
else:
	i3.move("scratchpad")