Browse Source

Use (host-local) config for browser instrad of decide_bin abomination

Alois Mahdal 8 years ago
parent
commit
0fff6a81cf
1 changed files with 2 additions and 14 deletions
  1. 2
    14
      src/libexec/saturnin-xuris

+ 2
- 14
src/libexec/saturnin-xuris View File

4
 
4
 
5
 . "$(ffoom path)" || exit 3
5
 . "$(ffoom path)" || exit 3
6
 ffoo import pretty
6
 ffoo import pretty
7
+ffoo import inigrep
7
 
8
 
8
 SATURNIN_XURIS_NOTIFICATIONS=true
9
 SATURNIN_XURIS_NOTIFICATIONS=true
9
 SATURNIN_XURIS_LIMIT=100
10
 SATURNIN_XURIS_LIMIT=100
27
     echo wget
28
     echo wget
28
 }
29
 }
29
 
30
 
30
-decide_bin() {
31
-    #
32
-    # Decide what browser to use
33
-    #
34
-    local context="$(hostname -s)"
35
-    debug -v context
36
-    case "$context" in
37
-        hugo/*)         echo vimb ;;
38
-        fullmoon/*)     echo uzbl-browser ;;
39
-        *)              echo uzbl-browser ;;
40
-    esac
41
-}
42
-
43
 maybe_uniq() {
31
 maybe_uniq() {
44
     $SATURNIN_XURIS_UNIQ || { cat; return; }
32
     $SATURNIN_XURIS_UNIQ || { cat; return; }
45
     sort | uniq
33
     sort | uniq
96
 # choice of URI has been made; we may try to use dmenu
84
 # choice of URI has been made; we may try to use dmenu
97
 bash -n <<<"$SATURNIN_XURIS_CHOICE"
85
 bash -n <<<"$SATURNIN_XURIS_CHOICE"
98
 SATURNIN_XURIS_BIN=$(eval "$SATURNIN_XURIS_CHOICE")
86
 SATURNIN_XURIS_BIN=$(eval "$SATURNIN_XURIS_CHOICE")
99
-SATURNIN_XURIS_BIN="${SATURNIN_XURIS_BIN:-$(decide_bin)}"
87
+SATURNIN_XURIS_BIN="${SATURNIN_XURIS_BIN:-$(inigrep -j -1 -p xuris.browser)}"
100
 
88
 
101
 debug -v SATURNIN_XURIS_BIN
89
 debug -v SATURNIN_XURIS_BIN
102
 
90