Whenever I copy any text via X11's copy/paste feature, I would like all formatting to be removed. I waste time daily dumping the text into a terminal, then copying again.

Is this possible?

  • 1
    What kind of formatting are you refering to? Which applications are you copying from and into? Are you using the PRIMARY selection (mouse selection and middle click to paste) or the CLIPBOARD selection (Ctrl+C/Ctrl+V)? – Gilles Aug 1 '15 at 22:32

This should do it:

xclip -selection c -o | xclip -selection c
  • 1
    Thank you! I've been trying to figure out how to do this for so long now. I'll just bind that command to a fluxbox keyboard shortcut, and it will give me the option to remove formatting if I want! – cat pants Aug 3 '15 at 6:56
  • Is there a way to automatically run this command every time some thing copied? I tried whit the clipboard from KDE but no luck. – Den May 9 '18 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.