File: README

package info (click to toggle)
wmnetselect 0.8-4
  • links: PTS
  • area: main
  • in suites: potato
  • size: 256 kB
  • ctags: 370
  • sloc: ansic: 720; makefile: 385
file content (270 lines) | stat: -rw-r--r-- 9,384 bytes parent folder | download
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270

wmnetselect version 0.8 released 22 Apr 1999.


Highlights of changes from previous version:

 -  Much faster, less resource-intensive.
 -  Search Google.com with one click on right button.
 -  Email addresses now launch Netscape's mail composer.
 -  Add Netscape bookmarks with one click on ctrl-left button.
 -  Prompts for URL when nothing or only spaces selected.
 -  New command line options, include starting Netscape on startup.
 -  Encodes "unsafe" characters per RFC1738.

See the ChangeLog file for additional changes.


Replace your Netscape docked appicon with my wmnetselect dock applet
to add these exciting features:

  -  Double click left mouse button to launch Netscape
     (Just like any docked window maker appicon).

  -  Single click middle mouse button to send X selection to
     Netscape, (causes Netscape to go to URL represented by
     selection).

 -   Ctrl-click middle mouse button to instruct Netscape to open
     a new window with URL.

  -  Easily customized icons.

  -  Trims whitespace from X selection.

  -  Short cuts for WindowMaker.org, Freshmeat, and Slashdot.

  -  GPL'd source code.


Download at:

   http://home.att.net/~apathos/code/wmnetselect-0.8.tar.gz    (~70K)



Middle Button Sends Selection to Netscape as URL


wmnetselect is a Window Maker dock applet that makes all text on your X
display internet-aware, sort of. wmnetselect sends the X selection to
Netscape when you click on it. In other words, if you select this text:

    http://people.delphi.com/crc3419/WMUserGuide/index.htm

and click the middle mouse button on wmnetselect, it will instruct Netscape
to load the web page at this URL. If Netscape is not running, wmnetselect
will detect that, and launch Netscape, and then instruct Netscape to load
the URL.

If you select the text: apathos@bham.net and click the middle mouse
button on wmnetselect, it will instruct Netscape to start the mail composer
with the selected text in the "To:" field.

If Netscape has already been launched, you can open the URL in a new
window by Ctrl-clicking the middle button (hold down the control key and
click the middle button on wmnetselect).


Double Click Left Button to Launch Netscape


If you want to launch Netscape without sending it the X selection,
double-click on wmnetselect with the left button, just like any other
Window Maker docked appicon.


Ctrl-(Single Click Left Button) to Add a Bookmark


A single Left mouse button click while holding the Ctrl key will add the
selected text as a bookmark if a Netscape window is open. For now, if
Netscape is not open, the Ctrl-Left button will open Netscape to the
selected text, but add no bookmark. This is considered a bug, and hopefully
will be fixed in a future version.


Right Button Sends Selection to Google.com as a Query


A single click of the Right mouse button send the selection as a query to the
Google.com search engine. A Ctrl-Right mouse button will open a new
window with the results of the query. (Click near the middle of the icon. A
Right click in the edge of the icon brings up a Window Maker menu.)

For example, if you select Window Maker and click the right mouse
button on wmnetselect, you will soon be seeing the first 30 "hits" for
Window Maker found by the Google search engine in your Netscape
browser window. wmnetselect's search engine queries were suggested by
both Alan Jaffray and Jerome Auge.

URLs cannot (legally) contain spaces, but of course search engine queries
can. wmnetselect transforms spaces to plus signs to facilitate searches. 

wmnetselect was designed specifically for the Window Maker window
manager, but should run on other window managers with varying degrees
of success.


Other Features


wmnetselect has some other convenient features to enhance your surfing
pleasure.

wmnetselect trims whitespace from the ends of the X selection. You can be
a little sloppy with the selection, by including newlines, or extra blank space
on either end. wmnetselect will trim the offending whitespace to prevent
Netscape from barfing.

As you may know, Netscape has a feature that tries to turn any word into a
URL. For example, if you type LinuxToday in Netscape's Location:
entry box, Netscape will turn LinuxToday into http://www.linuxtoday.com.
wmnetselect allows you to take full advantage of this feature. Just select
the word linuxhq, and middle-click on wmnetselect to find the latest
Linux kernel.

Unfortunately, if you type windowmaker, into Netscape's location entry
box, you will soon be looking at www.windowmaker.com when you most
likely wanted to go to www.windowmaker.org instead. wmnetselect turns
windowmaker into windowmaker.org, freshmeat into freshmeat.net,
and slashdot into slashdot.org, allowing you to select the word
slashdot and view the slashdot home page with one click on
wmnetselect. If you ever want to go to windowmaker.com for some bizarre
reason, just select windowmaker.com instead of windowmaker. Of course
you can select the full url, http://www.slashdot.org also, these are just
shortcuts. 

Netscape can act as kind of a local file browser using a file:/ URL. To
view the local version this file using Netscape (assuming you untarred the
distribution in /usr/local/src/), select:

      file:/usr/local/src/wmnetselect-0.8/README.html

and click on wmnetselect. (Notice there is only one slash after the colon,
file:// will not work.)

wmnetselect attempts to provide you feedback by displaying a different
icon while it is processing your request. This feature is somewhat immature
at this point, but the icon does change briefly after you click on
wmnetselect.



Changing the xpm icons.


You can easily change the icons wmnetselect uses. How to do this is
discussed in the file NewXPMs.txt


Command line options


wmnetselect has 6 command line options: -d (dontask), -e (executable
name), -n (noprotocol), -o (onstartup), -p (position), and -q (quiet).

No options are required. They are all used to overide the default options,
which should be acceptable to most users.


-d or -dontask

When the X selection is blank or is all spaces, wmnetselect now pops up
the Netscape open URL dialog "asking" you to type in a URL. The -d
option suppresses this behavior and just beeps if there is no selection. Use
the -q along with the -d option to "quiet" the beep. Prompting for a URL
was suggested by Morten Gulhaugen.


-e or -executable

Use the -e option to specify an executable name other than netscape, or
specify the full path name if an executable called netscape is not in your
search path. If you have multiple versions of Netscape installed, as I do, use
the -e option to specify the one to use with wmnetselect, ie:

    wmnetselect -e /usr/local/netscape4/netscrape

If you want to pass parameters to the executable put them in quotes:

    wmnetselect -e "netscrape -no-about-splash"


-n or -noprotocol

wmnetselect uses a heuristic (enhanced by Jerome Auge) that supplies the
protocol of the URL when none is provided. For example, if the selection
contains a "@" and doesn't contain any slashes (/), it is interpreted as an
email address, and wmnetselect opens the Netscape mail composer with
the selected text in the "To:" field. See the ChangeLog file for more details.
Use the -n option to prevent any interpretation of the selection.


-o or -onstartup

This option starts netscape (by default) or the executable named in the -e
option when wmnetselect is started. This can be used to start Netscape
when your window manager is started. This allows wmnetselect to better
emulate a docked Netscape appicon. Suggested by Michael Henderson.


-p or -position

Use the -p option to position wmnetselect at a specific location on your
display. This option is not needed for Window Maker, it's mostly there for
other window managers. To position wmnetselect near the top left corner
of the display, use:

    wmnetselect -p +800+40


-q or -quiet

There are a (very) few instances when wmnetselect uses an audible beep
to signify an error condition. (See the description of the -d option for one
example.) Use the -q option (formerly -s) to keep wmnetselect completely
quiet.


Installing wmnetselect


To untar the source of wmnetselect-0.8, cd to a convenient directory that
you have write permission in and type:

    tar xfvz wmnetselect-0.8.tar.gz
or
    gzip -dc wmnetselect-0.8.tar.gz | tar xfv -

Now cd to the directory wmnetselect-0.8 and make wmnetselect.
wmnetselect includes an Imakefile. To make wmnetselect type:

    xmkmf ; make

If you don't have xmkmf, you can attempt to use my makefile. Just rename
mymakefile to Makefile, and type make. You will need to have the XPM
library in your library path. According to the documentation I have,
xpm-3.4k can be found at ftp://ftp.x.org/contrib/libraries/xpm-3.4k.tar.gz,
but there may be newer versions.

If you do a make install, the make file will attempt to install wmnetselect in
directory /usr/X11R6/bin. I suggest just copying it by hand to /usr/local/bin
instead.

For now, this file serves as the man page for wmnetselect.


Acknowledgements


wmnetselect was improved by suggestions made by Jerome Auge, Morten
Gulhaugen, Michael G. Henderson, Alan Jaffray, and Andrea Mistrali.



Send bugs and bugfixes to Patrick Hill, apathos@bham.net

The latest version of this documentation is located at:

    http://home.att.net/~apathos/wmnetsel.html