Repeatedly typing out certain information – such as email addresses, home addresses, verbose terminal commands, and well-timed quotes from cult TV shows – can be chore.
Thankfully, there are tools out there to help.
‘Snippets’ is one such utility for Ubuntu’s Unity desktop.
It’s a simple Launcher item that lets you save and store text excerpts in a file, then select them from a Unity Quicklist to copy them the clipboard.
Snippets is not unique in what it does, but how it does it: through a Unity Launcher item.
The tool offers the following capabilities:
- Add & access snippets stored in .txt file
- View stored snippets in quicklist
- Click snippets to copy them to clipboard
- Option to add current clipboard item to .txt file
It might sound like a clipboard manager, but it only list items you manually add to the master text file. It does not log or surface recent clipboard history – but it may prove a useful utility.
How to Install Snippets for Unity
To install the Snippets launcher item, you’ll first need to install xclip, a command-line clipboard tool (this is needed to copy things from Snippets to the clipboard for pasting elsewhere).
You can install XClip from the Software Center by searching it our, or open your terminal and run:
sudo apt install xclip
Next, download the ‘Snippets‘ launcher script. It contains everything needed to use it:
[link no longer active]
When the archive has downloaded, extract it.
Navigate to the extracted folder and press Ctrl + H to reveal hidden files. Move the ‘.snippets-launcher‘ folders to your Home folder. It will not work if you skip this step.
Final step is to install the launcher item itself. This is taken care of by a script inside the folder you just moved, but as the script doesn’t have executable permissions (it needs them), take care of that first.
Open your Terminal and run the following commands carefully:
cd .snippets-launcher/ && chmod +x snippets.sh
./snippets.sh
Snippets should now be ready to use. Open Unity’s Dash, search for Snippets and drag it onto yourthe Unity launcher.
Using Snippets:
- Left click on the launcher item opens the text file where you add your snippets
- Right click on the launcher item opens the quick list
Quicklist options:
- Left click on a snippet to add it to the clipboard
- Left click ‘Date’ to copy the current date
- Click ‘Add Clipboard Content’ to add current item to .txt file
- After adding items to .txt file click ‘Update Launcher’
For more information on the lazy-making tool, head over to the Ubuntu Forums thread where its developer, Stinkeye, will be happy to help.
