[nSLUG] cat-like command

Ted Tibbetts intuited at gmail.com
Mon Dec 21 16:14:19 AST 2009


The GUI-resistant, or at least those among them who run X, may find
particularly useful the option to configure key combos to access actions and
history.  I use CTRL-ALT-A and CTRL-ALT-H respectively, though I think the
defaults were something different.  These bring up context menus where you
can arrow-down/up to make a, er, selection.  I guess you still need
somewhere for it to dock.. I haven't tried running it without a free wmdock
slot; it might bail if there wasn't an applet dock of some variety
available.  Or it might work anyway, and just not be mouse-accessible.
Given the creator's original goal of low resource consumption (compared to
the leading brands), I would hope for the latter.

About how selections are created:  that's good to know, I was actually
operating under the assumption that CTRL-L in Firefox would overwrite the
selection with the contents of the address bar; it appears that it doesn't.

I did a bit more experimenting.. My findings  on the theory of X-selection
are that the action of *selection* is what causes the selection to change.
To which statement skeptical hippos may well respond with skepticism.  What
I mean by this is that although, as Daniel says, tabbing to & thereby
focusing on something may highlight it, it doesn't change the selection.  *
Selecting* something, whether you do it with the mouse or with the keyboard
by holding down shift and hitting the arrow keys, *will* change the
selection.  So it seems to be not so much mouse-oriented as
"action-oriented", and not one to equivocate focusing or even highlighting
with selection.

Cheers
-Ted

On Mon, Dec 21, 2009 at 2:10 PM, Daniel Morrison <draker at gmail.com> wrote:

> 2009/12/21 Ted Tibbetts <intuited at gmail.com>:
> > $ cat file | xclip -selection clipboard
> > If you leave out the option, it goes into the (primary) X "selection",
> not
> > the clipboard, meaning that to get it out you click the middle mouse
> button
>
> > With parcellite you just pipe into parcellite, à la
> > $ cat file | parcellite
> > Parcellite assumes that you want that to be saved to the "clipboard"
>
> Hardly a show-stopper for xclip:
>
> $ cat <<EOF > ~/bin/parcellite
> > #!/bin/sh
> > exec xclip -selection clipboard "$@"
> > EOF
> $ chmod 755 !$
>
> > It also keeps a history stack that you can browse to find
> > previously-clipped (via Edit->Copy, CTRL-[SHIFT-]C, "+yiW, etc) or
> -piped-in
>
> How does it do that? Oh, it's GUI. Not like 'cat'... and I don't have
> a window dock.
>
> Nice to know though, and your other points are quite valid on the
> various uses of such a program.
>
> BTW, it does seem that the X selection depends entirely on the mouse.
> It's possible (for instance, in a web form) to use 'Shift-Tab', 'Tab'
> to focus on a text field and cause all the text to be "selected".
> Backspace or delete to clear it, and then 'middle-click paste'.
>
> I will confess to finding it frustrating that I can't just
> middle-click paste. When I do that, it behaves as though nothing had
> been selected for some reason -- pasting the new text in the middle of
> the old text.
>
> Thanks for the input,
>
> -D.
> _______________________________________________
> nSLUG mailing list
> nSLUG at nslug.ns.ca
> http://nslug.ns.ca/mailman/listinfo/nslug
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nslug.ns.ca/mailman/private/nslug/attachments/20091221/634b74fe/attachment-0002.html>


More information about the nSLUG mailing list