def main():
    term.empty_lines()
    term.header(True, "Nickname setup")
    print("Enter your new nickname.")
    nickname = term.prompt("Nickname", 1, 5)
    if (len(nickname) >= 1):
        confirm(nickname)
def show_app(app,category):
	term.empty_lines()
	term.header(True, "Installer - %s"%app['name'])
	items=["Install app %s"%app['name'], "Go back"]
	option=term.menu("Installer %s %s"%(app['name'],app['description']), items)
	if option==0:
		install_app(app)
	else:
		return
	gc.collect()
def main():
    term.empty_lines()
    items = ["Scan for networks", "Manual SSID entry", "Return to main menu"]
    callbacks = [scan, manual, home]
    callbacks[term.menu("WiFi setup", items)]()
Esempio n. 4
0
        info_file = "%s/%s/metadata.json" % (install_path, app)
        print("Reading " + info_file + "...")
        with open(info_file) as f:
            information = f.read()
        return ujson.loads(information)
    except BaseException as e:
        print("[ERROR] Can not read metadata for app " + app)
        sys.print_exception(e)
        information = {"name": app, "title": "---", "category": ""}
        return information


def expandhome(s):
    if "~/" in s:
        h = os.getenv("HOME")
        s = s.replace("~/", h + "/")
    return s


term.empty_lines()
term.header("Loading application list...")
populate_apps()
populate_category()

currentListTitles.append("< Back to the main menu")
selected = term.menu("Application launcher", currentListTitles)
if selected == len(currentListTitles) - 1:
    system.home()
else:
    system.start(currentListTargets[selected]['file'])