texpander3 was a low effort continuation of the original and only ever mentioned in passing.
Now macopa has been forked to provide the same functionality on wayland.
There is some more information at the gitlab source linked in the top of this post.
In the past I have even used it for canned welcome/support/etc responses here on this forum.
As always let me know if somethings broken or an improvement can be made.
Oh, and, be aware that I dont use zsh and the associated files are retained from the fork.
(quality unsure - they may be updated or removed in the future)
Downloaded, made executable, added the Meta+/ shortcut via Plasmaās System Settings, & it is working like a dream. I already have one snippet added:
When I installed ydotool, which is required to run macopa on Plasma, Pamac advised me to run the following command to add myself to the input group:
usermod -aG input $USER
However, as that gave me a āPermission deniedā message, I was successful using:
sudo usermod -aG input scotty (my actual username on my PC)
It is getting a bit late for me to add more snippets tonight, but I will definitely be using macopa when it comes to standard replies such as requests for info, advice on switching branches etc on this forum.
After saying last night that it was getting too late in the evening to add more snippets to macopa, I ended up adding more snippets.
I also wrote a bash script that allows me to add snippets via the terminal. It will create a file using the snippet name in the ~/.config/macopa/ directory filled with the snippet text that has been typed or pasted into the terminal. New lines etc are not an issue. Once the snippet text is complete, you just need to type ^ to finish and write to the file.
Hereās an example of the script in action:
addmacopa
What is the name of the Macopa snippet?:
testing
Type or paste the text of the snippet (type "^" when done):
Test line 1
Test line 2 with a URL https://example.com/
The last test line - I'll press the caret symbol (above the 6 key) to finish^
Macopa snippet testing has been created - here is the file content:
Test line 1
Test line 2 with a URL https://example.com/
The last test line - I'll press the caret symbol (above the 6 key) to finish
And the script:
#!/usr/bin/env bash
# addmacopa - a script to enable creation of Macopa snippets via the terminal.
folder=~/.config/macopa/
echo -e "What is the name of the Macopa snippet?: "
read name
read -d "^" -p "Type or paste the text of the snippet (type \"^\" when done):
" snippet
echo "${snippet}" > ${folder}${name}
filecontent=$(<${folder}${name})
echo -e "\n\nMacopa snippet ${name} has been created - here is the file content:"
printf "\n%s\n" "${filecontent}"
exit 0
Just 2 issues with it:
You canāt enter a snippet that contains a ^, as only the text up to the ^ will be saved
You canāt use the Backspace key when typing your snippet, as the read -e flag cannot be used.
If anyone knows of a workaround to the 2nd issue, or has any other improvements to the script, feel free to let me know.
I had mentally toyed with a similar idea - though more towards a zenity dialog of some sort.
Maybe a feature to implement one way or another.
Iām still torn on how much it should check/hand-hold/dynamically use backends or present extra functionality by default ā¦ or if some of those things should be made toggles for specific use.
Like in this case - should it check for emptiness and prompt the user to create some files through zenity? Or maybe just do this on first run? Or should there be something like a macopa -n switch to open a dialog?
The less it does or checks by default the less overhead will be incurred.
Speaking of which ā¦ new version, when ydotoold is not already running somehow, will start it using ydotoold -m because we dont need the mouse functionality. This appears to have decreased the opening time by up to 50%.