Save some text to easily retrieve it when you need it
This script save some text snippet to a keyword and paste it back when called with the same keyword. It's meant to be used with qutebrowser.
Just copy snippets.py to ~/.local/share/qutebrowser/userscripts
(or $XDG_DATA_HOME) or /usr/share/qutebrowser/userscripts
.
Or some other directory you save qutebrowser's scripts.
To save a snippet to a certain keyword run:
snippets.py --set <keyword> <text>
To paste a snippet binded to a certain keyword:
snippets.py --get <keyword>
On qutebrowser you should run, e.g.:
:spawn --userscript snippets.py --set 3 "Test text"
:spawn --userscript snippets.py --get 3
I suggest that you make the following numeric keybindings:
To save a snippet, e.g.:
:bind --mode insert <Ctrl+Alt+1> spawn --userscript snippets.py --set 1 {primary}
To paste a snippet, e.g.:
:bind --mode insert <Ctrl+1> spawn --userscript snippets.py --get 1
See qutebrowser's help on keybinding for more information.
You can activate debug log uncommenting the marked line in source code.
Alexandre do Sim – LinkedIn – [email protected]
Distributed under the GPL3 license. See LICENSE
for more information.