Re: BASH Variable for Selection or Clipboard

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Jeremy C. Reed
Date:  
To: plug-discuss
Subject: Re: BASH Variable for Selection or Clipboard
On Wed, 11 Aug 2004, Jared Anderson wrote:

> I've grown obsessively fond of festival and my local/bin can prove it.
> My clock speaks to me, my mail speaks to me, my laptop lid speaks to me,
> my battery speaks to me; I'm out of control. Now, I want to be able to
> highlight some text and map a key sequence that pipes the selected text
> through /usr/bin/festival --tts.
>
> I was curious if there is an easy way to reference the current
> selection, such as a bash variable. Is this an object I can reference?
> Seems like selections are remembered forever when I accidently
> middle-click...


I don't know if it exists, but maybe bash could be built with libgpm
support that sets a variable based on the gpm status. That would be used
if not using X.

But you mention mapping a key sequence, so you are probably using X.

Have a look at the xclip tool.
http://people.debian.org/~kims/xclip/

You could use xclip to get the X selection to pipe into festival.

Alternatively, you could write your own X tool for this. If you need some
C code for some ideas, let me know.


Jeremy C. Reed

                 BSD News, BSD tutorials, BSD links
                http://www.bsdnewsletter.com/


---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss