Termux is an opensource, GNU/Linux environment for Android which is available for install on either the Play Store or the alternative F-Droid applications repository.
This git repository contains the configuration files I use with it, along with some scripts to facilitate the installation of a working environment on new devices.
At the moment of writing, this environment has only been tested on a non-rooted Google Pixel 7 Pro, although I plan to install the exact same environment on an old Samsung Tab A6.
Before installing the different modules there are a couple of preliminary steps that need to be performed manually since they will pop confirmation dialogs up and need interaction with the user.
Install the fish shell and set it as default, this is mandatory for the
remainder of the installation process since all the scripts use the fish
syntax (sorry bash!)
$ pkg install -y fish $ chsh
Setup the default package manager (pkg) and choose a mirror close to
your location
$ termux-setup-package-manager
$ termux-change-repoIf you need to access stuff on either your SD card or the
/storage/emulated/0 folder (the writable part of the system’s disk):
- Go to the
termuxapplication settings in Android and give it the permission to access the files, then
$ termux-setup-storageThis will create a storage folder in your $HOME. If you use
orgmode, also create a symbolic link to the org folder in your
$HOME:
$ cd $HOME
$ ln -s ./storage/orgOne of the Neovim’s plugin I use (https://github.com/massix/termux.nvim) needs to interact with the Android’s APIs, those APIs are exposed in the Termux environment using Termux:API, you can download it for free on the F-Droid store, afterwards you just need to run the command:
$ termux-setup-apiSome modules are handled, for each of them an installation script is
provided, together with a corresponding install_module.fish.
This simple module will create a sane termux.properties file and copy
over the 0xProto patched font from NerdFonts.
Simple module that simply creates a .gitconfig file and stores it in
the home folder of Termux.
The default termux environment comes with a bash shell, this module replaces
that default shell with fish and some plugins.
This module will also install some packages which will be used by fish and
NeoVim:
curlripgrepbatfdfzfuuid-utils, used byorgmodetldrusingtealdeerbroot
On top of that, it will also configure some useful environment variables to
interact with the different tools. It also configures broot to use modal
mode by default and a colorscheme which matches the overall style of the
configuration (catppuccin-mocha).
fisher is a plugin manager
for the fish shell, it uses a plain text file
to keep track of the installed plugins and gives you an easy
access to new plugins which may be located remotely (on
GitHub or even locally if you want to develop
your own.
tide is a modern prompt for
fish with icons, git branch display and other cool stuff. After
installing you can easily configure it with the command tide configure
Z is a directory hopper for fish,
similar to the one which exists for zsh
Bang bang is a plugin
which adds a functionality similar to the !! pattern in bash.
This is the biggest and by far the most curated module in this repository
and probably the one which will see the most evolutions. This module
creates a working NeoVim installation using Lazy.nvim and some
plugins for productivity, including (list seriously not exhaustive):
orgmodeto work with.orgfilesnvim-cmpto provide basic completion for most common stuffnvim-treesitterfor syntax highlightingneogitto work with git repositories…toggletermto handle terminal buffers easilytelescopefuzzy finderwhich-keyto guide your next keystrokevenn.nvimto design beautiful diagrams like the one belownvim-lspconfigto configure theLSPfor Neovim
This is basically a tuned-down configuration of my main repository here.
This module installs some useful tools to work on DevOps environments
from the comfort of your smartphone. It installs azure-cli using the
embedded libsodium library, it configures it with some defaults (take
a look at the configuration file) and it also installs kubectl and
k9s with a delightful catppuccin-mocha colorscheme.
This module allows for some basic development on Android devices, for now only
the following languages are supported (with LSP where available):
C,C++and derivatesJavascriptandTypescripttypstfor document writinggowithdelvedebugger