Introduction
Introduction Statistics Contact Development Disclaimer Help
tweb - plan9port - [fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port
Log
Files
Refs
README
LICENSE
---
tweb (998B)
---
1 #!/bin/sh
2
3 plumbapple()
4 {
5 case ${BROWSER:-none} in
6 none)
7 open "$@"
8 ;;
9 *google-chrome*)
10 open -a "Google Chrome" "$@"
11 ;;
12 *)
13 open -a "$BROWSER" "$@"
14 ;;
15 esac
16 }
17
18 plumbunix()
19 {
20 case "${BROWSER:=firefox}" in
21 # Other browsers here
22 # ...
23 *opera*)
24 $BROWSER -remote 'openURL('"$@"',new-page)'
25 ;;
26 *firebird*)
27 $BROWSER -remote 'openURL('"$@"',new-window)'
28 ;;
29 *firefox*)
30 $BROWSER -remote 'openURL('"$@"',new-tab)' ||
31 $BROWSER "$@"
32 ;;
33 *mozilla*)
34 $BROWSER -remote 'openURL('"$@"',new-tab)' ||
35 $BROWSER "$@"
36 ;;
37 ?*)
38 $BROWSER "$@"
39 ;;
40 esac
41 }
42
43 plumb1()
44 {
45 case `uname` in
46 Darwin)
47 plumbapple "$@"
48 ;;
49 *)
50 plumbunix "$@"
51 ;;
52 esac
53 }
54
55
56 if [ $# = 0 ]
57 then
58 plumb1 about:blank
59 else
60 for i in "$@"
61 do
62 if [ -f "$i" ]
63 then
64 p=`pwd | sed 's/ /%20/g'`
65 i=`echo $i | sed 's/ /%20/g'`
66 i=`cleanname -d "$p" "$i"`
67 i=file://$i
68 else
69 i=`echo $i | tr -d ' '`
70 fi
71 echo p "$i"
72 plumb1 $i
73 done
74 fi
75
76 case $BROWSER in
77 *opera*)
78 $BROWSER -remote 'raise()'
79 esac
80
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.