12
(SOLVED) Startup script inconsistently executes, but I don't know why
(programming.dev)
A community for news and discussion about linux mint
As we know, it depends on the actual environment, where simpler or more complex options are available out-of-the-box.
Meanwhile, have you tried?:
- https://github.com/hluk/copyq
- https://copyq.readthedocs.io/en/latest/scripting.html
In CopyQ, since its compiled with the clipboard event handling, it's sure possible to handle these events, including changing the content or launching custom scripts, and though I don't like Python, I do like JavaScript, and CopyQ has built-in support for quite limited but JavaScript with its own API function built-in to handle it, mentioned in the documentation above.
Preview of the settings I've just checked out in a Kubuntu machine I had on hands:
| | | |
|
| |
|
|
And it worked! The quick scripts I tried are the following:
The one for CopyQ (I had v6.0.1)
Apparently, it does not supportThat program or script, to clean it, may be anything you prefer of course, including Bash, Perl, PHP, JavaScript, or what AutoHotKey does/executes in your case possibly.
There's the following to automate the read/write I know but haven't used, too:
- https://github.com/Slackadays/Clipboard
In Wayland, you may use
wl-pasteto read, andwl-copyto write into the clipboard.In X11,
xclipto both read and write.The thing is that there should be some kind of event to handle on the clipboard change, and there options as DBus or Qt, yet I am not currently aware of a verified option to do so without an actually compiler program to subscribe to such an event.
For instance, Klipper, the Qt program, uses the even handling over DBus exposed via its libraries for convenience.