How to detect Termux in a script

If you need to detect whether you are running in Termux from a bash script, check if $PREFIX contains the string com.termux: echo $PREFIX | grep -o "com.termux" This can also be used to set a variable in a Taskfile: vars: TERMUX: '{{and .PREFIX (contains "com.termux" .PREFIX)}}' Source

January 23, 2023 · 1 min
A smartphone lying on a table, showing Markor in editing mode on the Markdown of this blog post.

Hugo, meet Android

One thing that kept me from blogging more so far was the difficulty in working on posts on my phone. So after switching this blog over to Hugo I decided to see if I couldn’t improve on this situation. I needed a solution that would allow me to Checkout my page’s git repository from GitHub Quickly create a new post, consisting of a new folder inside content/blog matching my chosen <year>-<month>-<day>-<title slug>/index....

January 21, 2023 · 5 min
Mastodon