Skip to content

Instantly share code, notes, and snippets.

@SpotlightKid
Last active February 13, 2024 10:38
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save SpotlightKid/25feb97350bef923f14b42321b6e7ec4 to your computer and use it in GitHub Desktop.
Save SpotlightKid/25feb97350bef923f14b42321b6e7ec4 to your computer and use it in GitHub Desktop.
Open URL from Termux command line in Firefox Android browser
#!/bin/bash
#
# open-in-firefox.sh - open URL from Termux command line in Firefox Android browser
#
# Works with file:// URLs too, unlike with termux-open{-url}.
#
exec am start --user 0 -a android.intent.action.VIEW -n org.mozilla.firefox/.App -d "$1" >/dev/null
#!/bin/bash
#
# publish-sphinx-docs.sh - Generate HTML output from Sphinx ReST sources
# and open them for viewing in Firefox app
#
DESTDIR="/storage/emulated/0/Documents"
[ -n "$1" ]; cd "$1"
make html
mkdir -p "$DESTDIR"
rsync -rv --update _build/html/ "$DESTDIR"
open-in-firefox.sh "file://$DESTDIR/index.html"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment