if [ $(uname -o) = 'Android' ]; then
mkdir -p "$DEST/.termux"
find termux -mindepth 1 -maxdepth 1 | while read -r x; do l ".$x"; done
- l '.termux/font.ttf' "gui/fonts/Dina-ttf/Dina.ttf"
+ l '.termux/font.ttf' "gui/fonts/Dina/Dina-ttf/Dina.ttf"
+
+ # set up links for termux-setup-storage
+ termux_storage_link() {
+ d="$HOME/$1"
+ [ -L "$d" -o \! -e "$d" ] && ln $lnargs "$2" "$d" ||
+ echo "!!! File exists and is not a link: $d"
+ }
+ termux_storage_link dls storage/downloads
+ termux_storage_link docs storage/shared/Documents
+ termux_storage_link music storage/music
+ termux_storage_link pics storage/pictures
+ termux_storage_link vids storage/movies
+ # not xdg but convenient
+ termux_storage_link dcim storage/dcim
+ # NOTE: required for termux share target
+ termux_storage_link downloads storage/downloads
fi
cd "$DEST" >$devnull
-### After making changes and saving you need to run `termux-reload-settings`
-### to update the terminal. All information here can also be found on the
+### This is a `.properties` [https://en.wikipedia.org/wiki/.properties] file
+### for termux app properties and is loaded with the `java.util.Properties.load()`
+### [https://developer.android.com/reference/java/util/Properties#load(java.io.Reader)]
+### call by the termux app and must be formatted as per its spec.
+### To make changes to a property value, uncomment the property line by removing
+### any hash `#` characters at the start of the line.
+### After making required changes, save the file and run `termux-reload-settings`
+### in the terminal for changes to take effect. Some properties require app
+### process to be restarted to be updated which can be done by force stopping
+### the app from Android app settings.
+### All information here can also be found on the
### wiki: https://wiki.termux.com/wiki/Terminal_Settings
###############
###############
# Fullscreen mode
-##############
+###############
### Uncomment to let Termux start in full screen mode.
fullscreen = true
### Default extra-key configuration
# extra-keys = [[ESC, TAB, CTRL, ALT, {key: '-', popup: '|'}, DOWN, UP]]
-extra-keys = [[DRAWER, KEYBOARD]]
### Two rows with more keys
# extra-keys = [['ESC','/','-','HOME','UP','END','PGUP'], \
# ['TAB','CTRL','ALT','LEFT','DOWN','RIGHT','PGDN']]
+extra-keys = [[DRAWER, KEYBOARD]]
### Configuration with additional popup keys (swipe up from an extra key)
# extra-keys = [[ \
### ctrl+space (for marking text in emacs) does not work on some devices
# ctrl-space-workaround = true
+
+###############
+# Terminal Margin adjustments
+###############
+
+### Horizontal (left/right) Margin
+# terminal-margin-horizontal=3
+
+### Vertical (top/bottom) Margin
+# terminal-margin-vertical=0