From 760b781d934b8e6234218fe59ebb0f71098c9458 Mon Sep 17 00:00:00 2001 From: Solomon Laing Date: Fri, 10 Feb 2023 07:33:56 +1030 Subject: [PATCH] added lynx for text browsing --- scripts/lynx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 scripts/lynx diff --git a/scripts/lynx b/scripts/lynx new file mode 100755 index 0000000..44d1d73 --- /dev/null +++ b/scripts/lynx @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +# be sure to install the ca-certificates package + +lynxpath=/usr/bin/lynx +[[ ! -x $lynxpath ]] && lynxpath=/usr/local/bin/lynx + +useragent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.79 Safari/537.1 Lynx" + +if [ -e "$HOME/.config/lynx/lynx.cfg" ];then + export LYNX_CFG="$HOME/.config/lynx/lynx.cfg" +fi + +if [ -e "$HOME/.config/lynx/lynx.lss" ];then + export LYNX_LSS="$HOME/.config/lynx/lynx.lss" +fi + +if [ ! -x "$lynxpath" ]; then + echo "Doesn't look like lynx is installed." + exit 1 +fi + +exec "$lynxpath" --useragent="$useragent" "$@"