Pretty sure most of you already know this but for those who don’t: you have two clipboards in Linux. One is the traditional clipboard where you copy with control c and paste with control v. The other one is when you highlight text and use the mouse middle click to paste text.
More details here.
JWBananas ( @JWBananas@startrek.website ) English51•9 months ago d3Xt3r ( @d3Xt3r@lemmy.nz ) 11•9 months agoIs this applicable for Wayland as well? That link makes several references to X and its ecosystem of tools.
Chewy ( @Chewy7324@discuss.tchncs.de ) 12•9 months agoIf I understand it correctly, Wayland only specifies a single clipboard but no primary. But most (all?) wayland compositors implement an additional protocol that’s also supported by the toolkits (gtk, qt, …) and programs like wl-clipboard.
So yes, wayland also has clipboard + primary. But no secondary, as far as I found. Though I never used secondary on X anyway.
ChristianWS ( @ChristianWS@lemmy.eco.br ) 36•9 months agoNot going to lie, I hate the middle click clipboard and disable it ASAP. I really dislike the idea that it copies things without my explicit permission.
Krotiuz ( @Krotiuz@kbin.social ) 37•9 months agoI don’t believe anything is actually copied until you request it to be pasted. The clipboards in Linux mark where the data is, and don’t actually initiate a copy until there’s a destination.
Turun ( @Turun@feddit.de ) 6•9 months agoYes. You can test this by selecting something, closing that window and attempting to paste. It won’t work. Closing the window removes the information about what was highlighted, so there is nothing to paste. If it were to copy upon selection you’d still be able to paste.
moreeni ( @moreeni@lemm.ee ) 21•9 months agoIt’s one of the things that I hated at first when moving from Windows, but then I got so used to it I just can’t live without it. Whenever I use Windows, I would try to quickly copypaste text using selection, doing so for 5-10 seconds, until I realise this is not a thing on this OS.
Lvxferre ( @lvxferre@lemmy.ml ) 15•9 months agoDitto. And sometimes I use both the Ctrl+C and middle-click clipboards at the same time, when I want to copy two chunks of text. Like this:
- Select chunk A, press Ctrl+C
- Select chunk B
- Shift window
- Paste chunk B through middle-click
- Paste chunk A through Ctrl+V
Dandroid ( @dandroid@dandroid.app ) 5•9 months agoWindows and KDE Plasma both have CMD + V to show a list of all things that have been copied. So I always just do Ctrl + C, Ctrl + C, Ctrl + V, CMD + V -> down arrow -> enter. Though on KDE Plasma you will need another Ctrl + V to actually do the pasting after you have selected the value to paste, whereas on Windows selecting the value also pastes it. But the workflows are very similar.
arglebargle ( @westyvw@lemm.ee ) English1•9 months agoHuh, I do not have CMD + V for clipboard contents in Plasma with Klipper. What distro is configuring that?
I am assuming by CMD you mean Superkey. If not, I would like to know. I looked at Klipper shortcuts and didnt find it in there either.
Dandroid ( @dandroid@dandroid.app ) 1•9 months agoBy CMD, I mean the windows key. I am using Opensuse Tumbleweed. I thought I was just using the default clipboard, but I guess I’m not 100% sure.
arglebargle ( @westyvw@lemm.ee ) English1•9 months agoWell I guess it is configured that way on my EndeavorOS laptop, so I wonder what I need to do to enable it. My desktop has been rolling for 4 years, maybe they added that at some point along the way.
arglebargle ( @westyvw@lemm.ee ) English1•9 months agoI will give it a look an check it out. Been awhile since I used Suse. Totally cool. Oh and I meant the windows key. A lot of Linux folks call it the super key.
Dandroid ( @dandroid@dandroid.app ) 1•9 months agoI guess I was using the Mac term for it. I use all three heavily, so they all get mixed up on my head.
melvin ( @melvin@lemmy.ml ) 3•9 months agoI actually like the feature but could you explain how you disabled it? I’ve tried to merge all three clipboards into one a few years ago and couldn’t make it work
ChristianWS ( @ChristianWS@lemmy.eco.br ) 4•9 months agoKDE has the option to disable middle click paste, so I do that. Out of sight, out of mind
prunerye ( @prunerye@slrpnk.net ) 1•9 months agoWhenever I use a touchpad without physical buttons, I usually disable the middle button entirely. It’s more of a hammer-to-mosquito solution than what you were asking, but it’s as easy as adding this command to the autostart file (on Xorg):
xinput set-button-map "Name-of-your-Touchpad-goes-here" 1 0 3 4 5 6 7
, where “Name-of-your-Touchpad-goes-here” can be found withxinput list --name-only
.
duncesplayed ( @duncesplayed@lemmy.one ) English34•9 months agoIronically neither GNU nor Linux has a clipboard (well GNU Emacs probably has like 37 of them for some reason). “Primary selection” (the other clipboard that people don’t tell you about) started off on X11, which of course had to implement by XFree86, which became Xorg, and then it copied (ha ha) by other non-X-related software like gpm and toolkits like GTK when using Wayland.
4ffy ( @4ffy@lemmy.ml ) 3•9 months agoEmacs’s regular clipboard is the “kill ring” which also allows you to retrieve any previously cut/copied text. It also has “registers” where you can store and retrieve snippets of text, which can be considered clipboards when used for this purpose. Registers can be referenced by any character you can type on your keyboard, including control characters like ^D.
This totals… a lot of clipboards.
grinceur ( @grinceur@programming.dev ) 32•9 months agoBtw it makes using other OSs painful when you are used to it…
NaN ( @Bitrot@lemmy.sdf.org ) English20•9 months agoI use auto scroll a lot, middle click paste is generally an immediate no for me.
pinchcramp ( @pinchcramp@lemmy.dbzer0.com ) English6•9 months agoHow do middle-click-to-paste and middle-click-to-scroll conflict? In Firefox I can click-to-paste if the cursor is over an input field and click-to-scroll anywhere else. Never had any problem with this behavior.
JWBananas ( @JWBananas@startrek.website ) English6•9 months agoHow do middle-click-to-paste and middle-click-to-scroll conflict?
Some of us are clumsy.
pinchcramp ( @pinchcramp@lemmy.dbzer0.com ) English1•9 months agoThat’s not something I thought about. Good thing that you can disable the feature then
stepanzak ( @stepanzak@iusearchlinux.fyi ) 3•9 months agoHow did you setup auto scroll? It doesn’t work for me.
corsicanguppy ( @corsicanguppy@lemmy.ca ) 20•9 months agoPlease stop calling it gun/Linux UNLESS you also use
- Firestone/bus
- chisel/David
- vacuum/Danielle Smith
Etc.
shrugal ( @shrugal@lemm.ee ) 11•9 months agoPlease stop lecturing people about how to talk.
λλλ ( @lambda@programming.dev ) 10•9 months agoI don’t understand a single example you gave. I always call it Linux. But, what?
lauha ( @lauha@lemmy.one ) 4•9 months agoBut why would you call this linux when this is not linux specific thing anyway
Zekromaster ( @Zekromaster@lemmy.blahaj.zone ) 2•9 months agoI mean, we live in a world where there are multiple use cases for non-GNU/Linux (i.e. Alpine). Surely the distinction has become useful.
Possibly linux ( @possiblylinux127@lemmy.zip ) English1•9 months agoOk, Stallman
immortaly007 ( @immortaly007@feddit.nl ) 9•9 months agoAnd then there is the “clipboard” (copy paste function) in the nano text editor being a third
Miku Luna \ she/it ( @backhdlp@lemmy.blahaj.zone ) 16•9 months agoVim also has it’s own clipboard
foudinfo ( @foudinfo@jlai.lu ) 8•9 months agoYou can also configure vim to use the first clipboard (works with nvim but never tested on vim).
offspec ( @offspec@lemmy.nicknakin.com ) 7•9 months agoworks with vim but never tested on vi
TheyCallMeHacked ( @TheyCallMeHacked@discuss.tchncs.de ) 6•9 months agoIt does not work in vi. The + and * register were a vim invention (tested in vim compatibility mode and busybox vi)
stepanzak ( @stepanzak@iusearchlinux.fyi ) 3•9 months agoVim has a ton of clipboards and I still couldn’t figure them out.
poinck ( @poinck@lemm.ee ) 2•9 months agoAnnoyingly so, how can one disable it?
xigoi ( @xigoi@lemmy.sdf.org ) 2•9 months agoset clipboard=unnamedplus
poinck ( @poinck@lemm.ee ) 1•9 months agoThx, I’ll try that
Gsus4 ( @Gsus4@feddit.nl ) 8•9 months agoI knew and use this, but I never thought to call it two clipboards :)
Plus I’d never heard of shift-ins, I just used ctrl-shift-c/v in graphic terminals :P
Holzkohlen ( @Holzkohlen@feddit.de ) 8•9 months agoYes and I hate it. Wish I could just turn off such nonsense.
snaggen ( @snaggen@programming.dev ) 7•9 months agoYou don’t have to use it…
Blizzard ( @Blizzard@lemmy.zip ) English7•9 months agoIs it possible to have have a Windows 10-like clipboard in Mint? Where you can copy multiple stuff with ctrl+c and then press super+v to have a dropdown of things that you copied with a possiblity to pin some of them?
ExLisper ( @ExLisper@linux.community ) English12•9 months agohttps://gitlab.com/doertydoerk/clipman https://github.com/diodon-dev/diodon https://github.com/CristianHenzel/ClipIt https://github.com/hluk/CopyQ
And probably more. Anything than can be done in Windows was available in Linux 10 years earlier.
Bilbo ( @elkalbil@jlai.lu ) 6•9 months agoKlipper on KDE offers a clipboard history. Don’t know about other DEs.
Tacostrange ( @tacostrange@lemmy.ml ) 5•9 months agoWow! TIL too, thanks!
vis4valentine ( @vis4valentine@lemmy.ml ) 5•9 months agoOhhhhh!!! IT WORKS!
This will be so usefull in the future.
Unmapped ( @Unmapped@lemmy.ml ) 4•9 months agoOn my arch install with hyperland, clip boards have been by far the hardest thing to setup. I finally got a basic clipboard manger working using clipman and wofi. But tbh I don’t really understand how that’s working.
My main issues though have been trying to copy from one with vim open to other terminal with vim. Copying from vim elsewhere using y(yank) works fine. Copying elsewhere into vim works great. But vim to vim will not work for me.
Also trying to find a way to make copying text out of a terminal running tmux not so overly complex and tedious.
stepanzak ( @stepanzak@iusearchlinux.fyi ) 3•9 months agoFor copying from Tmux, I recommend tmux-yank. There are also multiple plugins allowing you to copy predefined set of text types (IP adresses, URLs, etc…). I’m currently using tmux-thumbs. Note that you have to set custom command in tmux-thums to actually copy the text to xclip or whatever you are using. example in my dotfiles
Unmapped ( @Unmapped@lemmy.ml ) 2•9 months agoI have tmux-thumbs, but only been able to use it a few times. Apparently most of what I need to copy is not ip’s and URLs. But this tmux-yank looks like what I’m looking for. I’ll give it a try. Thanks.
wviana ( @wviana@lemmy.eco.br ) 2•9 months agoYeah
*
and+
wviana ( @wviana@lemmy.eco.br ) 2•9 months agoThought more vim folks would notice this.
neosheo ( @neosheo@beehaw.org ) English2•9 months agoLol i had no idea