aboutsummaryrefslogtreecommitdiff
path: root/lynx-librewolf-handler
blob: 7920e4a9c79e3024951fdf1f786d02ce5f6a18b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/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