$ show h4ck3r0/Termux-os
Termux-OS is a menu-driven shell customization tool for Termux that enables users to install and configure shells (zsh, fish, bash) with themes, fonts, and security features. The core functionality is implemented in a single bash script (os.sh) that presents an interactive menu for installing shells, applying color themes, setting up a cyber lock (password protection via SHA-256 hashing), configuring terminal behavior, and updating the script. The architecture is monolithic but modularized into functions for each major task. Key external dependencies include git, curl, pkg, and various fonts/shell frameworks. The script writes configuration files to user directories (e.g., ~/.bashrc, ~/.zshrc, ~/.termux/properties) and downloads resources from GitHub.
The LLM identified 2 files worth highlighting for reuse:
The check_for_updates function is a self-contained utility for git-based self-updating scripts. It checks for remote updates, handles offline scenarios, prompts the user, and if agreed, pulls changes and restarts the script. Demonstrates a reusable pattern for maintaining script currency without external dependencies beyond git and standard shell tools.
The Cyber Lock mechanism (in do_add_lock/do_remove_lock) adds a password-protected lock to shell startup files using SHA-256 hashing. It allows 3 attempts before session termination. The core logic is isolated and could be extracted to secure any shell rc file, demonstrating non-obvious security hardening through cryptographic hashing rather than plaintext storage.