On Sun, Jul 10, 2011 at 09:49:43 -0700, brad clawsie wrote:
> i recently created a shell script called "pastexclip" which contains the text
> 
> xclip -o
> 
> and bound this in dwm to Alt+v
> 
> but when i use my dwm shortcut Alt+v, the text is printed not to the
> current context in X, but the system console (i.e. i see it after
> exiting X)

I pipe the output of xclip through xmacroplay, like this:

#!/bin/sh
sleep 0.2
{
        echo -n 'String '
        xclip -o
} | xmacroplay -d 3 :0

which I also bound to Modkey-v. The sleep statement ensures that I can let
go of the Modkey in time. Otherwise the outcome can be ugly :-)


Reply via email to