#!/usr/bin/env bash # open link in gui browser URL=$1 if curl --head --silent $URL > /dev/null 2>&1; then echo "Opening GUI browser $URL" >> $HOME/.lynx-log notify-send "Launching Librewolf $URL" curl $URL > /tmp/tmp.html librewolf /tmp/tmp.html >/dev/null 2>&1 & else echo "GUI browser: invalid URL $URL" >> $HOME/.lynx-log notify-send "invalid URL $URL" fi