def open_app(workspace):
    home = expanduser('~')
    cache = (home + '/.cache/dmenu_run')
    check_new_programs(home, cache)
    applications = open(cache)
    dmenu_run = subprocess.Popen(['dmenu', '-b'], stdout=subprocess.PIPE, stdin=applications)
    output = dmenu_run.communicate()[0].decode().strip()
    subprocess.Popen(['i3-msg', ((('workspace ' + workspace) + '; exec ') + output)], stdout=subprocess.PIPE)
def open_app(workspace):
    home = expanduser('~')
    cache = (home + '/.cache/dmenu_run')
    check_new_programs(home, cache)
    applications = open(cache)
    dmenu_run = subprocess.Popen(['dmenu', '-b'], stdout=subprocess.PIPE, stdin=applications)
    output = dmenu_run.communicate()[0].decode().strip()
    subprocess.Popen(['i3-msg', ((('workspace ' + workspace) + '; exec ') + output)], stdout=subprocess.PIPE)