Termux-ZSH
What it does
- Installs zsh and sets it as default shell.
- Installs OhMyZsh framework for plugins and themes.
- Installs customized powerlevel10k theme and sets JetBrains Mono Nerd font as default.
- Added color scheme and font changer scripts in
~/.termux/
directory to change color schemes and fonts in termux easily. - Installs syntax highlighter and autosuggestion plugins (from zsh-users).
- Enabled plugins by default
alias-finder command-not-found git node npm zsh-autosuggestions zsh-syntax-highlighting
, to check their usage and more available plugins Go Here - Installs lf (Terminal file manager), press Ctrl + O to execute lf in current directory.
- Added command edit function, press Ctrl + E to edit any command in micro text editor (you can change it to whatever text editor you prefer in
~/.zshrc
file hereexport VISUAL=micro
.
Notes
- Termux from playstore is no longer updated, install termux from f-droid or from their github releases instead.
- To run commands in termux from other apps or open it in a directory with a filemanager (Mixplorer for example) give it App on top or draw over other apps permission and uncomment
allow-external-apps
and make sure it's set totrue
in~/.termux/termux.properties
, However keep in mind that any app that supports this functionality can then automatically execute commands in termux so its very unsafe and should be only set to true when necessary. - You can set custom aliases or override any alias you want by setting them in
OhMyZsh/custom_aliases.zsh
before installing termux-zsh, or in~/.oh-my-zsh/custom/custom_aliases.zsh
after installing it. - By default all
commit
aliases of git plugin now use verbose flags for some reason, that ends up inserting huge verbose diff in commit message, if you don't want that behaviour for any git commit aliases you can re set them as specified in above note in thecustom_aliases.zsh
file, im overridinggc
alias in there by default to remove the verbose flag, you can use that as example and set yours in that file, you need to reload (omz reload
) or restart termux after setting them. - You can use
color-changer
alias to change color scheme andfont-changer
alias to change font easily. - Checkout OhMyZsh Cheatsheet for some quick usefull tricks.
- Checkout OhMyZsh Wiki to see how to customize it, add plugins and themes.
Installation
- Clone this repo and cd to dir
git clone https://github.com/Sohil876/Termux-zsh.git && cd Termux-zsh
- Run setup file with bash
bash setup.sh
- Restart termux.
- On first start it will fetch and setup some things in background, leave it for a minute and its done.
Update
- You can use
omz update
command in termux to update OhMyZsh framework/plugins manually to latest versions, by default it will prompt you automatically if it finds any update available. - You can use
p10k-update
command in termux to check and update powerlevel10k theme to latest version, this has to be done manually. - You can use
custom-plugins-update
command in termux to check and update all plugins installed in~/.oh-my-zsh/custom/plugins
directory to latest versions (they need to be a git repo), this has to be done manually.