Skip to content

Instantly share code, notes, and snippets.

@brccabral
Created March 3, 2025 20:11
Show Gist options
  • Save brccabral/34c35233e7b7bef0253c00d40e051995 to your computer and use it in GitHub Desktop.
Save brccabral/34c35233e7b7bef0253c00d40e051995 to your computer and use it in GitHub Desktop.
Termux Config

Termux Config

Install Termux from F-Droid.

Update and install useful packages.

pkg update
pkg upgrade
pkg install openssh
pkg install iproute2
pkg install zoxide
pkg install atuin
pkg install wget
pkg install zsh
pkg install git
pkg install curl

Generate SSH keys and copy it to yours servers.

ssh-keygen
ssh-copy-id user@host

Download a font with more characters (developer fonts, nerd fonts, ...).

mkdir -p ~/.local/share/fonts/
mv *.ttf ~/.local/share/fonts/
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf
mkdir -p ~/.termux
mv *.ttf ~/.termux/font.ttf

Configure nano.

nano ~/.nanorc
set atblanks
set emptyline
set historylog
set linenumbers
set locking
set stateflags
set tabsize 4

Configure zsh.

chsh -s zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone --depth=1 https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone --depth=1 https://github.com/dracula/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/dracula-zsh-syntax-highlighting

nano ~/.zshrc
ZSH_THEME="powerlevel10k/powerlevel10k"
source ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/dracula-zsh-syntax-highlighting/zsh-syntax-highlighting.sh
plugins = (git zsh-autosuggestions zsh-syntax-highlighting)
eval "$(atuin init zsh --disable-up-arrow)"
eval "$(zoxide init zsh)"
nano ~/.zprofile
emulate sh -c 'source $HOME/.profile'
nano ~/.profile
if [ -d "$HOME/.local/bin" ]; then
    if [[ $PATH != *"$HOME/.local/bin"* ]]; then
        PATH="$HOME/.local/bin:$PATH"
    fi
fi
export PATH
p10k configure # exit and reopen Termux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment