Customize Termux with Neofetch and Starship
- starship to customize the termux prompt
- wget to download font nerdfont
- p7zip to extract archive font
- neofetch to print device info
- font custom to support icon
- zsh (optional)
- Install Packages
apt install starship wget p7zip neofetch -y- Download and install font "Hack"
mkdir HackFont && cd HackFont && wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/Hack.zip && 7z x Hack.zip && mkdir ~/.termux && cp HackNerdFont-Regular.ttf ~/.termux/font.ttfif the Termux application suddenly exits, reopen it
- if you want to set the terminal using zsh
cd $PREFIX/bin && chsh -s zsh-
Configure bashrc or zshrc
create the file bashrc or zshrc (if not yet available)touch ~/.bashrcortouch ~/.zshrcand fill the file like this:#bashrc neofetch --ascii_distro star eval "$(starship init bash)"
#zshrc neofetch --ascii_distro star eval "$(starship init zsh)"
-
Note: After configuring the shell. Restart the termux application
- Create configuration file for customization
mkdir ~/.config && touch ~/.config/starship.toml- Example of customization
#configuration staship
format = """${directory}
{character}"""
[directory]
home_symbol = "\ueb06"
style = "blue bold"
format = "[$path]($style)"
truncation_length = 2
truncation_symbol = "../"
[character]
success_symbol = "[❯](green bold)"
error_symbol = "[❯](red bold)"
- Note: If you use bash as a shell on the terminal, some starship modules are not supported. I suggest you use zsh as a terminal shell if you want to customize more widely but if you still want to use bash as a terminal shell, you can see my configuration file ~/starship.toml