A workaround for misbehaving X citizens

Some programs (most notably amongst those I use firefox and pidgin) don’t work properly with shift-insert for pasting from the primary X Selection. If you’re like me and virtually live in the command line, this is a real pain in the ass. It became more of a pain in the ass recently because I’ve started using a graphics tablet instead of a mouse, so no longer have a middle click. I could no longer paste from IRC into firefox.

After some hacking around, I settled on the following solution. “xsel -o -p | xsel -i -b” dumps the primary X selection into the clipboard (xsel is a nice little application. You should probably have it installed). So I’ve bound this to a shortcut in xmonad and now can at the press of a magic key combination take the current selection and make it pasteable. Hurray.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>