How To Use Pbcopy And Pbpaste Commands On Linux - OSTechNix

Discover how to replicate macOS pbcopy and pbpaste commands functionality in Linux using Xclip and Xsel programs.

OSTechNix

#xsel works great to “manipulate the X selection”. Last week I stepped up as proxied maintainer to help bring already merged improvements to #Gentoo users despite lack of new releases since 2008.

Thanks to support from soap during the past week, upstream has merged all ebuild patches, tagged 1.2.1, and Gentoo already ships the latest version — among the first distros, according to repology.

https://blog.ferki.it/2023/04/26/gentoo-has-xsel-1-2-1-among-the-firsts

Gentoo has xsel-1.2.1 among the firsts

Ferenc Erki - agile sysadmin

Access Clipboard Contents Using Xclip and Xsel In Linux - OSTechNix

In this guide, we are going to learn how to manipulate and access Clipboard contents using Xclip and Xsel programs in Linux.

OSTechNix
I am using #sway a #wayland compositor on the other laptop and I found that #xsel does not work with it? Do I need to switch tools? If yes, which and to what?
Access Clipboard Contents Using Xclip and Xsel In Linux - OSTechNix

In this guide, we are going to learn how to manipulate and access Clipboard contents using Xclip and Xsel programs in Linux.

OSTechNix
Copy File Contents Into Clipboard Without Displaying Them - OSTechNix

This guide explains how to copy file contents into clipboard in Linux using Xclip and Xsel, without displaying the contents of the files.

Here's me fiddling with the clipboard again..

xsel | sed -e 's/youtube.com/invidio.us/g' | xsel -b

pipe contents of YT URL through sed to change to invidio.us and then back into xsel clipboard..

but..

how do I get this to run (in a terminal?) via a keyboard shortcut (Ctrl+\)?

bash script? attached to a shortcut?

*shrug*

I might be approaching this all wrong..

(on MXLinux18)

#linux #clipboard #xsel #sed #terminal