Clipboard Tools

Clipboard Tools

Clipboard Manager

After careful consideration, I have opted for the cross-platform clipboard manager CopyQ a tool that boasts advanced editing and scripting features, actively developed at hluk/CopyQ Close second was Ditto is Windows-only tool with repo at sabrogden/Ditto.

Although it was a close contender, Ditto ultimately fell short due to its Windows-only limitation. It’s development can be followed on sabrogden/Ditto.

Unfortunately, other options did not meet the high standard set by these two exceptional tools.

Ditto vs CopyQ: Subsequent Revision of Views

I have to admit that CopyQ is my favorite clipboard manager, and all the options it provides are the ones I could ever need. However, I recently discovered a reason to switch to Ditto clipboard manager instead of CopyQ. I wanted to increase the number of items in the history, but it turned out that it is not advisable to do so in CopyQ and the author has not enabled the increase beyond 10000 items for a reason. CopyQ stores everything in a very simple textual format and loading such a large amount of data could significantly slow down the system. Unlike CopyQ, Ditto stores everything in a SQLite database and has no problem handling a huge amount of data. All other features of Ditto vs CopyQ are on par, except for the fact that CopyQ is cross-platform, that it looks 800 times better and has an infinitely superior UX.

If you don’t mind the CopyQ history size limit then it is an infinitely better solution AND it is cross-platform. However, if you insist on having an unlimited history, Ditto is better, but only for Windows.

Ditto doesn’t work properly right from the start, as you need to adjust an option in Windows to make it work for “paste”. Actually, you have to disable the built-in Windows clipboard mechanism, and you can do that as follows: first, run gpedit.msc from the Run (Win+R) dialog box. Then navigate to Computer Configuration\Administrative Templates\System\OS Policies and set Allow clipboard history: Disabled. By default, it is set to Not Configured, but we need to explicitly disable it.

Infinite History Trick: Use Them Both

It turned out that I can use multiple clipboard managers at the same time. Since Ditto performs one part of the task excellently, and CopyQ another, I will use both simultaneously. Ditto will have unlimited history, while I will limit CopyQ to only 100 items in history. The shortcut for CopyQ remains “Ctrl+Shift+V,” while I will set “Win+V” for Ditto. And it appears that everything is working properly.


Ovo možda i ne ide ovde, ali stavljam:


date: 2012-08-17

Automating My Workflow

Automating My Workflow

I just stopped looking for an adequate extension. So, I’m taking a different approach.

Clipboard tools

Others:

Others: http://www.extrabit.com/plaintextclipboard/ :: Convert formatted text on the Windows clipboard to plain text with PlainTextClipboard http://www.windows7hacker.com/index.php/2011/04/6-useful-clipboard-tips-in-windows-7/ :: ::

Articles

Total Automation

  • AutoHotkey http://l.autohotkey.net/ :: AutoHotkey_L Warning: Don’t install the plain simple AutoHotkey. Use AutoHotkey_L

A custom build of AutoHotkey maintained by Lexikos which features objects, classes, Unicode and other enhancements for intermediate programmers.


Clipboardic is a utility that listen to the clipboard activity and it automatically save the copied data into Windows clipboard files (.clp) on disk. Theoreticaly it cam be used to share clipboard between computers on same LAN.

Slackadays/Clipboard is terminal clipboard manager.


CopyQ Advanced Config and Usage

Verovatno neće biti output u terminalu, jer je to known issue in Windows Kasnije, kada koristiš komande u radu, output nije ni poželjan. Rešenje je da tokom razvoja ili appenduješ " | Write-Output" na komandu, ili prvo pokreneš “git bash” pa onda sve nastaviš tu. Umesto Write-Output dodatka, može da se koristi i njegov lepši alias “| echo” a može i ugrađena komanda “| more” koja će raditi i u CMD dok ovo pre toga neče.

Config location: Where to find saved items and configuration?

CopyQ Commands

There is a repository of hluk/copyq-commands: Useful commands for CopyQ clipboard manager. To add a Command to CopyQ as explained here, copy whole command with [Command] part and then open CopyQ main window, type F6 and then Ctrl+V.

All the commands are stored in copyq-commands.ini file, but don’t edit it directly.

Great commands that I’m using are but in my combination:

https://github.com/hluk/copyq-commands/blob/master/Automatic/image-tab.ini, to put images in separate (smaller history) tab https://github.com/hluk/copyq-commands/blob/master/Automatic/copy-clipboard-to-windows-tab.ini, to separate tabs by window title

[Command]
Name=Archive Near Limit Tab
Command="
    copyq:
    var currentDate = new Date();
    var formattedDate = currentDate.getFullYear() + '-' + (currentDate.getMonth() + 1) + '-' + currentDate.getDate();
    var archiveTab = 'Archives/' + formattedDate;
    var currentTab = tab();

    var defaultMaxTabSize = settings().value('maxitems') || 10000;
    var currentTabProperties = settings().value('CopyQ_tab_' + currentTab);
    var maxTabSize = currentTabProperties['maxitems'] || defaultMaxTabSize;

    var threshold = maxTabSize - 100;

    function tabSize(tabName) {
        return size(tabName);
    }

    function moveItems(sourceTab, targetTab) {
        copyTab(sourceTab, targetTab);
        removeItems(sourceTab);
    }

    if (tabSize(currentTab) >= threshold) {
        if (!tabExists(archiveTab)) {
            addTab(archiveTab);
        }
        moveItems(currentTab, archiveTab);
        popup('Items archived', 'Items have been moved to ' + archiveTab);
    }
"
Input=application/x-copyq-item
Automatic=true
Icon=\xf009


Cross-platform syncing clipboard

CLI clipboard tools

supitsdu/clipper: Seamlessly copy file contents to clipboard from command line. Lightweight, cross-platform tool for instant text transfers. is a Go project.

Clipboard Project Homepage with the repository Slackadays/Clipboard is a versatile smart clipboard manager that is command-line (CLI), cross-platform and coded in C++.

wget https://github.com/Slackadays/Clipboard/releases/download/0.9.0.1/clipboard-linux-amd64.zip unzip clipboard-linux-amd64.zip

bin/, lib/

sudo chmod a+x bin/* sudo mv lib/* /usr/local/lib/ sudo mv bin/* /usr/local/bin/

sometimes

sudo apt -y install xauth libasound2

or only one of them

Mislim, ovo radi - ali nije stvarno u mom clipboardu, već u clipboardu remote mašine, što i nije baš feature. Objašnjeno Frequently Asked Questions · Slackadays/Clipboard Wiki

xclip is in Linux repos, and pbcopy is pre-installed on macOS

Especially for tmux, as there are problems: wincent/clipper: ✂️ Clipboard access for local and remote tmux sessions

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# The clipboard itself is a feature of X11, so you will not be able to use it without having any X11 server instance running anywhere. 

# on macOS, must install
brew install --cask xquartz
# must reboot

# check if proper
echo $DISPLAY
# /private/tmp/com.apple.launchd.yOMyT8jlGn/org.xquartz:0

# connecting
# on client, ~/.ssh/config
# Host *
#    ForwardX11 yes
# or run ssh with -X or -Y

# on server, check
sudo sshd -T | grep -i X11
# then enable in /etc/ssh/sshd_config
# X11Forwarding yes
# and restart sshd server
sudo systemctl restart sshd

# to work
# on server
echo $DISPLAY
cb cp "example text"

Everything goes through SSH forwarding, so no need to open any extra ports.

Ali samo na upravitelj. Da bi radilo i na sudo, moraš ovako

https://unix.stackexchange.com/a/162675/110899

1
2
sudo --preserve-env=DISPLAY -s
xauth merge /home/user/.Xauthority
date 10. Oct 2016 | modified 21. Oct 2024
filename: Workflow » Clipboard Tools