()
| 2004 | # Main |
| 2005 | # ---------------------------- |
| 2006 | def main() -> None: |
| 2007 | cfg = load_config() |
| 2008 | if not ensure_termux_deps(cfg): |
| 2009 | return |
| 2010 | |
| 2011 | while True: |
| 2012 | print("\n" + "=" * 76) |
| 2013 | print(tr(cfg, "title")) |
| 2014 | print("=" * 76) |
| 2015 | |
| 2016 | menu_items = T[cfg.get("language","en")]["menu"] |
| 2017 | for i, item in enumerate(menu_items, 1): |
| 2018 | print(f"{i}) {item}") |
| 2019 | |
| 2020 | choice = input("\n" + tr(cfg, "choose")).strip() |
| 2021 | |
| 2022 | if choice == "1": |
| 2023 | action_install(cfg) |
| 2024 | elif choice == "2": |
| 2025 | action_remove_system(cfg) |
| 2026 | elif choice == "3": |
| 2027 | action_settings(cfg) |
| 2028 | elif choice == "4": |
| 2029 | action_vnc(cfg) |
| 2030 | elif choice == "5": |
| 2031 | action_x11(cfg) |
| 2032 | elif choice == "6": |
| 2033 | action_programs_install(cfg) |
| 2034 | elif choice == "7": |
| 2035 | action_programs_remove(cfg) |
| 2036 | elif choice == "8": |
| 2037 | action_update(cfg) |
| 2038 | elif choice == "9": |
| 2039 | action_extras_menu(cfg) |
| 2040 | elif choice == "10": |
| 2041 | action_launcher(cfg) |
| 2042 | elif choice == "11": |
| 2043 | action_help(cfg) |
| 2044 | elif choice == "12": |
| 2045 | break |
| 2046 | else: |
| 2047 | print(tr(cfg, "invalid")) |
| 2048 | pause(cfg) |
| 2049 | |
| 2050 | if __name__ == "__main__": |
| 2051 | main() |
no test coverage detected