/rofi-modi-snippy

A snippy-compatible modi for rofi

Primary LanguageShellMIT LicenseMIT

rofi-modi-snippy

A modi to use with rofi. It presents a list of snippy-compatible snippets (keys) and simulate a user keyboard input of a corresponding value.

Dependencies

  • xdotool

Installation

  1. Clone the repo.

  2. create the directory ~/.snippy and put snippetfiles in there

  3. Start rofi as follows:

    rofi -show snip -modi snip:/path/to/snippy

(it can be combined with other modis, separated by commas)

Features

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.

  • multiline support (though slow, hence MAXLINES=15 by default)
  • evaluates shellscript inside snippets ($(ls -la | grep foo) e.g.)
  • snippy-compatible: see snippy.sh and snippy