├── .files ├── font.ttf └── colors.properties ├── .images ├── screen_1.jpg └── screen_2.jpg ├── UNINSTALL.md ├── README.md └── install /.files/font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adi1090x/termux-omz/HEAD/.files/font.ttf -------------------------------------------------------------------------------- /.images/screen_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adi1090x/termux-omz/HEAD/.images/screen_1.jpg -------------------------------------------------------------------------------- /.images/screen_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adi1090x/termux-omz/HEAD/.images/screen_2.jpg -------------------------------------------------------------------------------- /UNINSTALL.md: -------------------------------------------------------------------------------- 1 | ## To uninstall termux-omz, Run the following command: 2 | 3 | rm -r ~/.termux/{colors.properties,font.ttf} ~/.zshrc ~/.oh-my-zsh && chsh -s bash 4 | 5 | ## Exit the application and launch it again. 6 | -------------------------------------------------------------------------------- /.files/colors.properties: -------------------------------------------------------------------------------- 1 | background : #263238 2 | foreground : #eceff1 3 | 4 | color0 : #263238 5 | color8 : #37474f 6 | color1 : #ff9800 7 | color9 : #ffa74d 8 | color2 : #8bc34a 9 | color10 : #9ccc65 10 | color3 : #ffc107 11 | color11 : #ffa000 12 | color4 : #03a9f4 13 | color12 : #81d4fa 14 | color5 : #e91e63 15 | color13 : #ad1457 16 | color6 : #009688 17 | color14 : #26a69a 18 | color7 : #cfd8dc 19 | color15 : #eceff1 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | **`LAST Updated`** : `August 2023` 2 | 3 | > Unmaintained : Due to Termux not working properly on new Android versions and also Termux not getting maintained properly. 4 | 5 | --- 6 | 7 | # Termux OMZ 8 | 9 | Simple script to install **[oh-my-zsh](https://ohmyz.sh)** in **[Termux](https://termux.com)**. 10 | 11 | This setup will apply - 12 | - Material color-scheme 13 | - Dejavu font with powerline support 14 | - Agnoster zsh-theme as default 15 | 16 | ### How to install 17 | 18 | ```bash 19 | # First, clone this repository by typing... 20 | git clone https://github.com/adi1090x/termux-omz.git 21 | 22 | # Change to termux-omz directory 23 | cd termux-omz 24 | 25 | # Make script executable 26 | chmod +x install 27 | 28 | # Run install script 29 | ./install 30 | 31 | # And Done, oh-my-zsh is successfully installed on your termux. 32 | ``` 33 | 34 | ### Previews 35 | 36 | |Screenshot 1|Screenshot 2| 37 | |--|--| 38 | |![img](.images/screen_1.jpg)|![img](.images/screen_2.jpg)| 39 | -------------------------------------------------------------------------------- /install: -------------------------------------------------------------------------------- 1 | #!/data/data/com.termux/files/usr/bin/bash 2 | 3 | ## Author : Aditya Shakya 4 | ## Twitter : @adi1090x 5 | ## Github : @adi1090x 6 | ## Reddit : @adi1090x 7 | 8 | ## A simple script to setup oh-my-zsh in termux terminal emulator. 9 | 10 | ## ANSI Colors (FG & BG) 11 | RED="$(printf '\033[31m')" GREEN="$(printf '\033[32m')" 12 | ORANGE="$(printf '\033[33m')" BLUE="$(printf '\033[34m')" 13 | MAGENTA="$(printf '\033[35m')" CYAN="$(printf '\033[36m')" 14 | WHITE="$(printf '\033[37m')" BLACK="$(printf '\033[30m')" 15 | REDBG="$(printf '\033[41m')" GREENBG="$(printf '\033[42m')" 16 | ORANGEBG="$(printf '\033[43m')" BLUEBG="$(printf '\033[44m')" 17 | MAGENTABG="$(printf '\033[45m')" CYANBG="$(printf '\033[46m')" 18 | WHITEBG="$(printf '\033[47m')" BLACKBG="$(printf '\033[40m')" 19 | DEFAULT_FG="$(printf '\033[39m')" DEFAULT_BG="$(printf '\033[49m')" 20 | 21 | ## Directories 22 | PREFIX='/data/data/com.termux/files/usr' 23 | DIR="$(pwd)" 24 | 25 | ## Reset colors 26 | reset_color () { 27 | { printf '\033[39m'; printf '\033[49m'; } 28 | } 29 | 30 | ## Banner 31 | banner () { 32 | clear 33 | cat <<- EOF 34 | ${BLUE} ┌─────────────────────────────────┐ 35 | ${BLUE} │${RED} ┏━┓╻ ╻ ${ORANGE}┏┳┓╻ ╻ ${GREEN}╺━┓┏━┓╻ ╻ ${BLUE}│ 36 | ${BLUE} │${RED} ┃ ┃┣━┫${CYAN}╺━╸${ORANGE}┃┃┃┗┳┛${CYAN}╺━╸${GREEN}┏━┛┗━┓┣━┫ ${BLUE}│ 37 | ${BLUE} │${RED} ┗━┛╹ ╹ ${ORANGE}╹ ╹ ╹ ${GREEN}┗━╸┗━┛╹ ╹ ${BLUE}│ 38 | ${BLUE} └─────────────────────────────────┘ 39 | ${CYAN} By: ${MAGENTA}Aditya Shakya ${ORANGE}// ${MAGENTA}adi1090x 40 | EOF 41 | } 42 | 43 | ## Script Termination 44 | exit_on_signal_SIGINT () { 45 | { printf "\n\n%s\n" " ${BLUE}[${RED}*${BLUE}] ${RED}Script interrupted." 2>&1; echo; reset_color; } 46 | exit 0 47 | } 48 | 49 | exit_on_signal_SIGTERM () { 50 | { printf "\n\n%s\n" " ${BLUE}[${RED}*${BLUE}] ${RED}Script terminated." 2>&1; echo; reset_color; } 51 | exit 0 52 | } 53 | 54 | trap exit_on_signal_SIGINT SIGINT 55 | trap exit_on_signal_SIGTERM SIGTERM 56 | 57 | ## Install ZSH 58 | install_zsh () { 59 | { echo ${ORANGE}" [*] Installing ZSH..."${CYAN}; echo; } 60 | if [[ -e $PREFIX/bin/zsh ]]; then 61 | { echo ${GREEN}" [*] ZSH is already Installed!"; echo; } 62 | else 63 | { pkg --check-mirror update -y; pkg install -y zsh; } 64 | (type -p zsh &> /dev/null) && { echo; echo ${GREEN}" [*] Succesfully Installed!"; echo; } || { echo; echo ${RED}" [!] Error Occured, ZSH is not installed."; echo; reset_color; exit 1; } 65 | fi 66 | } 67 | 68 | ## Backup user settings 69 | backup_tmux () { 70 | if [[ ! -d "$HOME/.termux" ]]; then 71 | mkdir $HOME/.termux 72 | else 73 | cp -r $HOME/.termux{,.backup} 74 | fi 75 | } 76 | 77 | ## Setup OMZ 78 | setup_omz () { 79 | { echo ${ORANGE}" [*] Cloning oh-my-zsh framework..."; echo ${CYAN}; } 80 | git clone --depth 1 https://github.com/ohmyzsh/ohmyzsh.git $HOME/.oh-my-zsh 81 | [[ -d $HOME/.oh-my-zsh ]] && { echo; echo ${GREEN}" [*] Succesfully Cloned!"; echo; } || { echo; echo ${RED}" [!] Error Occured, failed to clone OMZ."; echo; reset_color; exit 1; } 82 | { echo ${ORANGE}" [*] Setting up configurations..."; echo; } 83 | cp $HOME/.oh-my-zsh/templates/zshrc.zsh-template $HOME/.zshrc 84 | { echo ${ORANGE}" [*] Changing default shell to 'zsh'."; echo; } 85 | chsh -s zsh 86 | { echo ${ORANGE}" [*] Applying color-scheme, font & zsh theme..."; echo; } 87 | { cp $DIR/.files/colors.properties $HOME/.termux/colors.properties; cp $DIR/.files/font.ttf $HOME/.termux/font.ttf; } 88 | sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="agnoster"/g' $HOME/.zshrc 89 | termux-reload-settings 90 | { echo ${GREEN}" [*] Setup completed. Enjoy oh-my-zsh in Termux."; echo; } 91 | { reset_color; exit; } 92 | } 93 | 94 | ## Main 95 | main () { 96 | banner 97 | # Check for previous installation 98 | if [[ -d $HOME/.oh-my-zsh ]]; then 99 | { echo; echo ${GREEN}" [!] ${MAGENTA}Oh-my-zsh ${GREEN}is already installed."; } 100 | { read -p ${ORANGE}" [?] Do you wanna re-install it? (y/n): ${GREEN}"; echo; } 101 | if [[ "$REPLY" =~ ^[y/Y]$ ]]; then 102 | { rm -rf $HOME/.oh-my-zsh; install_zsh; backup_tmux; setup_omz; } 103 | else 104 | { reset_color; exit; } 105 | fi 106 | else 107 | { echo; install_zsh; backup_tmux; setup_omz; } 108 | fi 109 | } 110 | 111 | main 112 | --------------------------------------------------------------------------------