A modi to use with rofi. It presents a
list of named snippets (keys) and simulate a user keyboard input of a
corresponding value. Key/value pairs are stored in a mysnippets config file.
- xdotool
-
Clone the repo.
-
Modify the
snippets.shfile to point theSNIPFILEvariable to the actual location of themysnippetfile on your computer. -
Add your own snippets.
-
Start
rofias follows:rofi -show snip -modi snip:/home/raph/Code/langageBash/rofi-modi-snippets/snippets.sh
(it can be combined with other modis, separated by commas)
Snippets are strings of text, which are written with xdotool in the window
with focus. Snippets starting by cmd are passed through eval and the written
string is the result of the evaluation. See the cmddate and cmdepoch
examples.
- You may change the separator used in the
mysnippetconfig file. - It differs from rofi-snippet in that
rofi-snippet is a standalone Python script calling
rofi.rofi-modi-snippetis intended to be a modi forrofi, combined with others (ssh, run, window, etc.)