Skip to content

Aledosim/qute-snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qute-snippets

Coverage GPL3 License

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.

Installation

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.

Usage

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

Keybinding suggestion

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.

Debug log

You can activate debug log uncommenting the marked line in source code.

Author

Alexandre do Sim – LinkedInaledosim@yahoo.com.br

Distributed under the GPL3 license. See LICENSE for more information.

https://github.com/Aledosim

About

Script for qutebrowser to save and paste texts

Topics

Resources

License

Stars

Watchers

Forks

Languages