Questions tagged [xclip]
xclip is a command line interface to the X11 clipboard. It can also be used for copying files, as an alternative to sftp/scp, thus avoiding password prompts when X11 forwarding has already been setup.
57
questions
1
vote
1
answer
69
views
nano command execution stuck
In nano v8.0 there's an option to send selection to X clipboard in the nanorc:
"{execute}|xsel -ib{enter}{undo}"
which does perfectly.
I tried using xclip utility instead:
"{execute}|...
0
votes
1
answer
56
views
Find X Atom of given Window?
Using DWM as my Window-Manager under Archlinux I don't have any patches to handle context menus or "right-click" functionalities.
This being the case I decided to write a concise Bash alias ...
0
votes
0
answers
12
views
Search selected word with shortcut in Wayland
I see here and here that wl-clipboard is supposed to be the xclip alternative for Wayland.
But I don't seem to be able to fit it with what I do with xclip in X11, especially searching selected word ...
0
votes
0
answers
30
views
Are there two different clipboards? Why does copy/paste work differently depending upon keys used (shift-insert & ctrl-v)? [duplicate]
It's as if there are two different system clipboards (stash places for copied text), with two different ways of accessing them.
I've noticed this for quite some time but never been able to narrow it ...
0
votes
1
answer
81
views
Is there a way to append text to xclip?
I need to store data in xclip multiple times - i.e. keep appending more chucks of text to xclip. But it doesn't look like this option is available. Is there a clever hack for this? I want to avoid ...
0
votes
1
answer
254
views
Disable automatically copying selection to clipboard in urxvt
There are 2 kind of clipboards on my os (manjaro i3). Xclip, which keeps the last selected text, and the regular clipboard which must be explicitly copied.
I have noticed urxvt copies selected text in ...
0
votes
1
answer
201
views
How to create a keyboard shortcut for playing youtube videos with mpv?
I'm using Pop OS. I've aliased the command mpv $(xclip -o) & exit to pp so I can play youtube links copied to my clipboard with mpv player in lesser keystrokes in the terminal.
I realised I may ...
0
votes
2
answers
750
views
No new line when piping into xclip
Is there something I can do so that whenever I pipe something into xclip it does not include a new line at the end?
As a workaround, I am using echo -n $(CMD_TO_COPY) | xclip, but it's kind of ...
1
vote
0
answers
506
views
how to pipe Wayland clipboard into an X vnc session clipboard over ssh
I am using Wayland on Arch, and am sshed into a debian server which uses X11. I have a vnc session running over that ssh connection. I would like to take a string that I have stored in my Wayland ...
2
votes
0
answers
421
views
How to paste selection from vi-mode to clipboard
I want to access the content of what I copied in the buffer with the vi-mode of the clipboard via the command ctrl + v or ctrl + shift + v in the terminal.
I copied in my .zshrc the following: (from ...
1
vote
0
answers
245
views
How can read the content of the active window?
I am trying to create a bash script that selects the content of the active window, copies the content to the clipboard, and saves the content to a file. This file then gets read by some text editor, ...
1
vote
2
answers
476
views
Why tldr | xclip outputs escape codes looking like timestamp, and how to remove it?
Problem
I want to copy the output of tldr to clipboard, and then paste that to text editor.
I execute: tldr pwd | xclip -sel clip
When I paste from clipboard, I get:
pwd
[0mPrint name of current/...
1
vote
1
answer
615
views
How to persist the contents of the X11 (copy) clipboard on closing e.g. Vim to paste its contents later?
If I copy to X11 (copy) clipboard in Vim using "+y, I can only paste contents as long as Vim is open. The reason is as follows:
From Ubuntu Wiki: ClipboardPersistence:
The problem happens ...
3
votes
2
answers
1k
views
Linux clipboards, including with WSL consoles
It occurred to me that there are multiple clipboards on any given Linux console:
First is the bash clipboard, this can be invoked by Ctrl-U / K, cut all line before (U) or after (K) cursor into ...
0
votes
1
answer
394
views
how can I "pipe" all of these to xclip preservering newlines
So, I'm creating this little convenience command for system information when bug reporting.
alias clip="xclip -selection clipboard -in"
alias bug="echo $(lsb_release -irs && ...