blob: 6f4eeb048418456cdc88b5a087ca6c2c75d4a859 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
if status is-interactive; and not fish_is_root_user
if test -z "$WEBSEARCH"
set -x WEBSEARCH 'https://html.duckduckgo.com'
end
# Console browsers to look for by order of preference
set -f browsers 'elinks' 'links' 'lynx' 'w3m'
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
end
if test -n "$WAYLAND_DISPLAY"; or test -n "$DISPLAY"; or test (uname) = 'Darwin'
# Graphical browsers to look for by order of preference
set -f xbrowsers 'librewolf' 'firefox'
set -f found_xbrowser (find_prog $xbrowsers)
if test -n "$found_xbrowser"
if test -z "$BROWSER"
set -x BROWSER $found_xbrowser
end
end
end
alias webbrowser "$BROWSER"
# Console gopher browser to look for by order of preference
set -f gbrowsers 'ncgopher'
set -f found_gbrowser (find_prog $gbrowsers)
if test -n "$found_gbrowser"
alias gopher "$found_gbrowser"
end
end
|