Exemplo n.º 1
0
def qtile_reload_barcolor(color):
    c = command.Client()
    q = QSh(c)
    q.do_cd("bar")
    q.do_cd("top")
    print("set color:{}".format(color))
    cmd = "eval(\"self.background=\'{0}\'\")".format(color)
    q.process_command(cmd)
    return True
Exemplo n.º 2
0
def test_do_cd(qtile):
    client = ipc.Client(qtile.sockfile)
    command = IPCCommandInterface(client)
    sh = QSh(command)
    assert sh.do_cd("layout") == 'layout'
    assert sh.do_cd("0") == 'layout[0]'
    assert sh.do_cd("..") == '/'
    assert sh.do_cd("layout") == 'layout'
    assert sh.do_cd("0/wibble") == 'No such path.'
Exemplo n.º 3
0
def test_ls(qtile):
    client = ipc.Client(qtile.sockfile)
    command = IPCCommandInterface(client)
    sh = QSh(command)
    assert sh.do_ls("") == "bar/     group/   layout/  screen/  widget/  window/"
    assert sh.do_ls("layout") == "group/   window/  screen/  0/     "

    assert sh.do_cd("layout") == "layout"
    assert sh.do_ls("") == "group/   window/  screen/  0/     "
    assert sh.do_ls("screen") == "layout/  window/  bar/   "
Exemplo n.º 4
0
def test_ls(manager):
    client = ipc.Client(manager.sockfile)
    command = IPCCommandInterface(client)
    sh = QSh(command)
    assert sh.do_ls(None) == "bar/     group/   layout/  screen/  widget/  window/"
    assert sh.do_ls("") == "bar/     group/   layout/  screen/  widget/  window/"
    assert sh.do_ls("layout") == "layout/group/   layout/window/  layout/screen/  layout[0]/    "

    assert sh.do_cd("layout") == "layout"
    assert sh.do_ls(None) == "group/   window/  screen/"
    assert sh.do_ls("screen") == "screen/layout/  screen/window/  screen/bar/   "
Exemplo n.º 5
0
def test_do_cd(manager):
    client = ipc.Client(manager.sockfile)
    command = IPCCommandInterface(client)
    sh = QSh(command)
    assert sh.do_cd("layout") == 'layout'
    assert sh.do_cd("../layout/0") == 'layout[0]'
    assert sh.do_cd("..") == '/'
    assert sh.do_cd("layout") == 'layout'
    assert sh.do_cd("../layout0/wibble") == 'No such path.'
    assert sh.do_cd(None) == '/'