sigmike / autocutsel Goto Github PK
View Code? Open in Web Editor NEWautomated xcutsel
License: GNU General Public License v2.0
automated xcutsel
License: GNU General Public License v2.0
This has a lot to do with usage of XA_STRING. Copying lines from here, results in:
$ autocutsel -selection PRIMARY -debug
autcutsel v0.9.1
Selection changed: "\n \u201dGood morning, Dave,\u201d said HAL.\n "...
New value saved: "\n \u201dGood morning, Dave,\u201d said HAL.\n "...
utf-8 needs an Atom of the form:
Atom UTF8_STRING = XInternAtom(dpy, "UTF8_STRING", False);
Yet changing the atoms wholesale doesn't work, and I'm unfamiliar with Xt.
I use fedora27/gnome. compiled autocutsel from github
i have a google doc, when i use ctr-C on the marked text in the doc i get:
$ autocutsel -verbose -debug
autocutsel v0.10.0
Selection changed: "Hello world\n"
New value saved: "Hello world\n"
sel -> cut: "Hello world\n"
Updating buffer
However, middlebotton pastes some old buffer. using the "paste" in the rightclick menu works fine.
Hi,
the problem goes like this:
The solution according to the UTF8_STRING extension is:
The following patch adds at least the later fallback (older version of autocutsel completely relied on XA_STRING and not COMPOUND_TEXT for some reason).
autocutsel_utf8_string_fallback.diff.txt
If you have any questions, feel free to ask!
Kind regards,
Peter
According to the README:
By default, autocutsel synchronizes the CLIPBOARD selection. You may want to use
the PRIMARY selection instead, if your applications use Motif or another toolkit
not using the CLIPBOARD.
As I understand it, running autcutsel -selection PRIMARY
makes sure CLIPBOARD is synchronized to PRIMARY. However, this doesn't seem to work:
archie@thinkpad ~ % echo $TERM
xterm-256color
archie@thinkpad ~ % autocutsel -selection PRIMARY -fork
archie@thinkpad ~ % echo foo | xsel -i -b
archie@thinkpad ~ % bar # Shift+Insert
Adding -verbose -debug to the command gives no output with the above, except the version number:
archie@thinkpad ~ % autocutsel -selection PRIMARY -verbose -debug
autocutsel v0.10.0
"Left click at the region start, scroll up/down pages, then right click at region end."
this no longer works after autocutsel is launched.
I found autocutsel is very similar to other X small tool called unclutter because both are (or should be) initialized with X. So I think is a good idea to create a auto-start file on /etc/X11/Xsession.d/.
I seem to mostly use the Primary Selection (in xterm & co) and the clipboard (in the web browser) and to sync them, I seem to need to run two instances of autocutsel, one with -s PRIMARY
and one with -s CLIPBOARD
(the default). The same setup can also be seen by another user in #15.
I though wonder if there's a possibility sync all three places, Primary Selection, Cut Buffer and Clipboard without having to start two autocutsel instances. If it is possible, it's probably a documentation issue. If it's currently not possible, please consider this as a feature request. :-)
[non issue removed]
So Wayland compositors still have X around in the form of Xwayland and all of the clipboard sync going on there still needs to happen, but now we also need to sync the xwayland and wayland clipboards. Would you consider adding this to autocutsel?
Hello, thanks for the update of this great software.
But, when I use it to copy Chinese between Windows and VNC(connected to Ubuntu),it can not work fine.
When the Chinese words were copy to vnc ,autocutsel 0.9.1-2,they became something like UTF8 code "\u5278……".
When I upgrade autocutsel to 0.10.0, it became something nonsense.
-fork, -f
Run as a daemon program in the background. This is recommended when used from an X startup script.
When using -fork
, should one still include &
? i.e.,
autocutsel -fork &
I wouldn't think so since it seems redundant but looking online that seems to be the norm and I don't see anything explicitly stating otherwise.
At ~/xinitrc
, I have:
autocutsel -fork &
autocutsel -selection PRIMARY -fork &
Which allows me to copy and paste (ctrl+v
) everwhere, without any issues.
However, when I open terminal (kitty, or even alacritty) and inside ssh. Nothing is pasted when doing ctrl+v
.
But shift+ins
works. How I can get ctrl+v
working in ssh, inside a terminal?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.