No description
| src | init: dump | |
| readme.md | init: dump | |
quickactions
This repository is a dump of scripts around dmenu/fzf that might be useful for many people.
Unfortunately the only documentation right now is the code itself.
- menu:
- A simple utility wrapper over dmenu and fzf. It invokes fzf if a tty is available, or dmenu otherwise.
- Allows menu based scripts to be used from both inside/outside a terminal.
- quickactions:
- This script acts as an interactive "open with" menu.
- It reads input from either argv or stdin - this is the input that you wish to "open".
- It then presents a menu that lets you enter a shell command to run on the input - this is the command that you wish to "open with".
- "Open with" entries are saved in a cache file - this sort of works like shell history. Menu entries are ordered by usage frequency.
- The command you enter can pass its output back to the menu, so you can chain commands interactively.
- json_menu:
- This script reads json data from stdin, and presents a menu containing the passed data. Selected data is printed to stdout.
- How the data is read and presented can be customized quickly with arguments passed. Example:
$ echo '{"products":[{"id":1,"brand":"Lorem","title":"Ipsum..."}]}' | json_menu choices=it.products formatter='f"#{it.id} #{it.brand} - #{it.title}"' value=it.id- It's a Python script, and the expressions passed as arguments are evaluated as Python expressions.
- lines:
- This script reads line data from stdin, and filter/map commands as Python expressions from argv. Example:
$ find . | lines filter 'len(it) == 13' map 'f"{it} is {os.stat(it).st_size} bytes"'
Author
Awal Garg <awalgarg.me>
License: GPLv3