From e7764f9b08072cfb67c2d3ecf075df9a80aee6fd Mon Sep 17 00:00:00 2001 From: Deposite Pirate Date: Sun, 12 Jan 2025 14:40:33 +0100 Subject: Import config. --- conf.d/05browser.fish | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 conf.d/05browser.fish (limited to 'conf.d/05browser.fish') diff --git a/conf.d/05browser.fish b/conf.d/05browser.fish new file mode 100644 index 0000000..4266374 --- /dev/null +++ b/conf.d/05browser.fish @@ -0,0 +1,30 @@ +if status is-interactive; and not fish_is_root_user + +if test -z "$HOMEPAGE" + set -x HOMEPAGE "https://html.duckduckgo.com" +end + +# Console browser to look for by order of preference +set -f browsers 'links' 'w3m' 'elinks' 'lynx' + +# Find a suitable console web browser +set -f found_browser (find_prog $browsers) + +if test -n "$found_browser" + + # If $BROWSER is unset, set it + if test -z "$BROWSER" + set -x BROWSER $found_browser + end + + function www --description "Browse the WWW" + if test -z $argv + $BROWSER $HOMEPAGE + return + end + + $BROWSER $argv + end +end + +end -- cgit v1.3.1