Best clipboard manager - shortcut to paste for different items?

Hi,

So I have a requirement for a fast and efficient workflow. Let's say I need to have the following blocks of text represented by
- Aaaaaa
- Bbbbbb
- Cccccccccc
- Ddddddddddd

I need to paste them into a Whatsapp workflow with different people I'm interacting with on a live basis at a real time physical meet. Sometimes the number of people can be overwhelming.

What I need : the ability to quickly (shortcut) paste a message of my choice (Aaa, BBB, Cccc or Ddd) in any of the browser chats.

Any suggestions? Ideally should work on a minimalist windows manager and should have be easy to work with the browser workflow.

PS: I tried parcellite, but that gives a list of options to choose from (Ctrl + Alt + H) rather than a shortcut for individual texts. I also tried copyq but that has issues with the windows manager I'm using and the window gui just doesn't show up.
 
Probably you are using the wrong approach?
If you are using Web Whatsapp, (I guess, bc AFAIK there's no Whatsapp port), you'd rather use a browser extension like https://addons.mozilla.org/en-US/firefox/addon/text-expander-autotextify/?
I haven't tried it myself, but there are other text expander extensions. That's how I'd manage.
That's interesting. While I am not sure it will help me with the current issue, it is certainly good to know. Thanks. never used a text-expander, thought copying something was the easiest way with just a Ctrl + V rather than type it out.

Interestingly I also discovered that copyq actually just starts without any gui in the WM that i'm using - essentially making it hard to detect if it's even running, until one toggles it using the cli.
 
FYI I used CopyQ for some time for scripting (fish is my user shell), but not anymore.
Now I prefer xclip which is simpler to script with. You use it like this:

echo $variable | xclip -selection clipboard # Then you can Ctrl+V $variable contents

However, I insist that in production, text expanders can be very useful. Autohotkeys in Windows, on FreBSD/Linux you would have abbreviations in Vim and fish shell.
 
FYI I used CopyQ for some time for scripting (fish is my user shell), but not anymore.
Now I prefer xclip which is simpler to script with. You use it like this:

echo $variable | xclip -selection clipboard # Then you can Ctrl+V $variable contents

However, I insist that in production, text expanders can be very useful. Autohotkeys in Windows, on FreBSD/Linux you would have abbreviations in Vim and fish shell.
thanks - do you have some links on how to use it more efficiently? I tend to use vim but never used abbreviations tbh.

also the xclip command seems of though copyq seems more elegant with `copyq add` - or am I missing something
 
also the xclip command seems of though copyq seems more elegant with `copyq add` - or am I missing something
You're right. xclip doesn't have a clipboard history, and it would need more scripting.

Now, all text-expanders (or abbreviations) work very similar like snippets. Most probably, browser extensions follow the same idea.
The command structure is:
command abbreviation text

Using your example above on vim, you can type:
:ia aa Aaaaaa
:ia bb Bbbbbb

:ia is short for :iabbrev. Now, whenever you type (Insert) aa on vim, it will expand to Aaaaa. On fish, that would be like: abb aa Aaaaaa.
The idea is to :source a .vim text file containing all abbreviations in a collection. For example, myAbbs.vim would look like:

ia aa Aaaaaa
ia bb Bbbbbb
ia cc Cccccccccc
ia dd Ddddddddddd
ia ee ....

You source it by typing :source MyAbbs.vim. Now, as you type "aa bb" they combine and write "Aaaaa Bbbbb". And your MyAbbs.vim file can have thousands of abbreviations and keep adding more as you need.

More info here: https://vimhelp.org/map.txt.html#:ia
and here: https://learnvimscriptthehardway.stevelosh.com/chapters/08.html
 
This is a bit awkward – it still needs focus (you clicking into the text field) and dynamically changing the phrases requires more work – but x11/xbindkeys with x11/xvkbd, a sample ~/.xbindkeys being:​
Bash:
# xbindkeys and xvkbd are somehow competing against each other,
# the effect being that only partial key event messages are sent.
# Hence, make xbindkeys stall until the key has been `release`d.

"xvkbd -text 'Hello. IT. Have you tried turning it off and on again?'"
release+XF86Launch5

"xvkbd -text 'Are you sure it is plugged in?'"
release+XF86Launch6

"xvkbd -text 'Uh, okay, well, the button on the side, is it glowing?'"
release+XF86Launch7
The key symbols have been determined with xev(1). Start xbindkeys(1) e. g. via your ~/.xinitrc. You can append \r to the ‑text but it’s probably best to confirm it’s the right message before sending it.​
 
What I need : the ability to quickly (shortcut) paste a message of my choice (Aaa, BBB, Cccc or Ddd) in any of the browser chats.
Maybe I'm a little old fashioned, but that's what x11/xcb was designed for.
Code:
[gunsynd.501] $ alias -x | grep xcb
xcb='xcb -n 21 -l v -geometry -0+0'
You can cut'n'paste things into and out of the cut buffers (21 of them in my case, arranged vertically on the RHS of the screen) with a mouse. You can also use the command line to manipulate the buffers (cut, paste, rotate, etc.)
 
Probably you are using the wrong approach?
If you are using Web Whatsapp, (I guess, bc AFAIK there's no Whatsapp port), you'd rather use a browser extension like https://addons.mozilla.org/en-US/firefox/addon/text-expander-autotextify/?
I haven't tried it myself, but there are other text expander extensions. That's how I'd manage.
If you’re using WhatsApp Web, the easiest way is a browser text-expander extension like AutoTextify. No need for extra apps — just create your snippets in the extension and they’ll expand while typing. Safe and simple.
 
Maybe I'm a little old fashioned, but that's what x11/xcb was designed for.
Code:
[gunsynd.501] $ alias -x | grep xcb
xcb='xcb -n 21 -l v -geometry -0+0'
You can cut'n'paste things into and out of the cut buffers (21 of them in my case, arranged vertically on the RHS of the screen) with a mouse. You can also use the command line to manipulate the buffers (cut, paste, rotate, etc.)
This actually sounds cool - is there some guide to use it with a gui? The man page is somewhat cryptic or doesn't align with my experience with my setup.

If you’re using WhatsApp Web, the easiest way is a browser text-expander extension like AutoTextify. No need for extra apps — just create your snippets in the extension and they’ll expand while typing. Safe and simple.
This looks good too - though it asked for an account setup etc
 
This actually sounds cool - is there some guide to use it with a gui? The man page is somewhat cryptic or doesn't align with my experience with my setup.
X11/xcb is the original cut and paste buffer for X11. Just install it and run it.

You will get a set of small windows into which you can cut'n'paste stuff with a mouse. It's quite intuitive.
 
X11/xcb is the original cut and paste buffer for X11. Just install it and run it.

You will get a set of small windows into which you can cut'n'paste stuff with a mouse. It's quite intuitive.
I had actually installed it and tried to run it before replying earlier. It shows me a window with vertical lines - that's about it. So when I try to Ctrl + C any text in my current browser/terminal copy - and right or left click on the vertical windows, it does not give me any option to paste them into any of them. Ctrl + V doesn't work as well and the windows continue to remain blank. Perhaps its not working with my WM. Not sure - hence asked for some intuitive guide.
 
^C and ^V are M$ Windows inventions. X11 natively cuts and pastes text with the mouse. The default mechanism is to position the mouse to one side of the text, hold down the left mouse button, and move the mouse to highlight the text you want to cut, then release the left mouse button (or simply double click on a "word", or tripple click on a whole paragraph). Then move the mouse to the target window, and click on the middle mouse button to paste. The "window with vertical lines" provides multiple cut buffers into which you can paste text.
 
I'll give my two cents. If you are on a laptop it can get funky. The combinations I've seen for the middle mouse button are clicking in the middle of the touchpad, touching both the left and right click zones of the touchpad, or clicking with three fingers. I can't find any official documentation but IIRC the trick is to aim for the middle. If you're on desktop it's not an issue. If you are looking for a way to manage selections x11/xclipboard is a more barebones option.
 
^C and ^V are M$ Windows inventions. X11 natively cuts and pastes text with the mouse. The default mechanism is to position the mouse to one side of the text, hold down the left mouse button, and move the mouse to highlight the text you want to cut, then release the left mouse button (or simply double click on a "word", or tripple click on a whole paragraph). Then move the mouse to the target window, and click on the middle mouse button to paste. The "window with vertical lines" provides multiple cut buffers into which you can paste text.
Wow thanks - I feel silly for not having known about this. So now I can get the selection to work and it's being pasted in the windows! Finally. I was just struggling to paste the buffers but figured out the middle mouse click does it.

This is actually so cool, though it does require some kind of pasting methods - I guess they could be scripted. Are there any user guides for xcb that are more user friendly? I'd like to explore the limits of using an old tool like this compared to the fancy new ones.

If you are looking for a way to manage selections x11/xclipboard is a more barebones option.
Haven't tried this yet, but would love to explore some cool things with this and stretch it to it's limits. Any recommendations? Excited to see these old tools having so much potential and yet people fall back to extensions - why?!
 
Are there any user guides for xcb that are more user friendly? I'd like to explore the limits of using an old tool like this compared to the fancy new ones.
I'm not aware of anything specific. Once you understand how to cut'n'paste with a mouse, the only other thing to consider is how to use the command line for creation of a buffer, and how you can save, list, and rotate the buffer contents. See xcb(1) for details.
 
I still think the best solution would be a text-expander, but web-Whatsapp is not compatible.
So, the elephant in the room here is WhatsApp is proprietary software; hence, it's a black-box. The possibilities would be trying an open source messenger alternative (signal or scli may be?), or contact WhatsApp help.
 
I still think the best solution would be a text-expander, but web-Whatsapp is not compatible.
So, the elephant in the room here is WhatsApp is proprietary software; hence, it's a black-box. The possibilities would be trying an open source messenger alternative (signal or scli may be?), or contact WhatsApp help.
The issue is Whatsapp actually, because
1. I highly doubt they would have any options to get "help"
2. They don't support automation via 3rd party libraries and it's against their ToS, leading to possibly banning your account.

Text expander seems an okayish solution, though typing it out (vs hot keys) is a pain.
 
Back
Top