Hello,
> Is there a way to achieve Exec clauses or Function/Macros which
> take the current contents of the cut buffer or selection as an
> argument?
>
> This would permit click-drag selection of arbitrary text eg
> an embedded URL in a screen of text, and then firing up
> an ftp/netscape instance with it as a command argument...
Try xcb. It should be available on 'ftp.x.org' and its mirrors somewhere
along 'contrib/utilities'. It'll allow you to grab the current X selection,
store it and handle it any way you like. Just as an example, I use the
following shell script:
---------------------------------------------------------------------------
#!/bin/sh
xselection=`xcb -S 0;xcb -p 0`
if echo $xselection | grep -q "^\(http\|ftp\|gopher\|telnet\|wais\|file\)://";then
netscape -remote "openURL($xselection)" &>/dev/null || netscape "$xselection"
elif echo $xselection | grep -q "\w\+_at_\w\+";then
gnudoit -q "(mail nil \"$xselection\")" &>/dev/null|| xemacs -eval "(mail nil \"$xselection\")"
else
tkmanclient -new $xselection
fi
---------------------------------------------------------------------------
This will take the current selection, see if it looks like an URL, an email
address or anything else, and send it to netscape, xemacs mail-mode or
tkman respectively. I have bound this script to a title button via fvwm's
Exec directive.
Regards,
Stephan
--
---------------------------------------
Stephan Krings Berlin, Germany
slothkri_at_zedat.fu-berlin.de
---------------------------------------
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Thu Feb 22 1996 - 11:29:47 GMT