Repository: j0ru/kickoff (language: rust)

Issue:
Documentation for --from-* options
Currently it's not really obvious how to use them and how they interact with each other and the history


Discussion / hints:

Fix patch:
diff --git a/README.md b/README.md
index c74837f..53fc3a3 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
 </h1>
 
 Kickoff is heavily inspired by rofi, but not without changes made.
-Like many programs, kickoff was born from an itch that no existing program seemed to relieve and my desire to learn a lower level programming language.
+Like many programs, kickoff was born from an itch that no existing program seemed to relieve and my desire to learn a lower-level programming language.
 
 [![AUR version](https://img.shields.io/aur/version/kickoff?label=kickoff&logo=arch-linux&style=for-the-badge)](https://aur.archlinux.org/packages/kickoff/)
 [![Crates Version](https://img.shields.io/crates/v/kickoff?style=for-the-badge)](https://crates.io/crates/kickoff)
@@ -13,8 +13,7 @@ Like many programs, kickoff was born from an itch that no existing program seeme
 ## Install
 
 #### Arch Linux
-
-Use your favourite AUR manager, i.e. [blinky](https://github.com/cherti/blinky/):
+Use your favorite AUR manager, i.e. [blinky](https://github.com/cherti/blinky/):
 
 ```bash
 blinky -S kickoff
@@ -26,16 +25,6 @@ blinky -S kickoff
 cargo install kickoff
 ```
 
-## How does it search
-
-All programs found in $PATH are included in the search results.
-This can include your own additions to $PATH as long as they
-are done before you launch kickoff or the program that launches kickoff
-(i.e. your window manager)
-
-This list is then combined with your previous searches and sorted by amount of usage
-and if it fits the search query.
-
 ## Features
 
 - Wayland native (only wlroots based compositors though)
@@ -44,10 +33,64 @@ and if it fits the search query.
 - Remembers often used applications
 - Argument support for launched programs
 - Paste support
-- Build list from stdin
-- Launch .desktop files [kickoff-dot-desktop](https://github.com/j0ru/kickoff-dot-desktop)
+- Custom Input via stdin
+
+## How does it search
+
+All programs found in $PATH are included in the search results.
+This can include your additions to $PATH as long as they
+are done before you launch kickoff or the program that launches kickoff
+(i.e. your window manager)
+
+This list is then combined with your previous searches and sorted by the amount of usage
+and how well it fits the query.
 
 ## Configuration
 
 A default configuration will be placed at `$XDG_CONFIG_HOME/kickoff/config.toml`
-or can be found [here](https://github.com/j0ru/kickoff/blob/main/assets/default_config.toml).
\ No newline at end of file
+or can be found [here](https://github.com/j0ru/kickoff/blob/main/assets/default_config.toml).
+
+## Script integration
+
+If you want to adapt kickoff for your use case, i.e. selecting an entry from a password manager,
+you can use one of the `--from-*` options. If any of those options is defined, the default behavior of reading from `$PATH` is disabled as well as
+saving the history. The latter can easily be reactivated by setting `--history <some path>`.
+
+|Option|Argument|Usage|
+|------|--------|-----|
+|`--from-stdin`|None| Reads a list of items from stdin |
+|`--from-file`|Path| Reads a list of items from a file |
+|`--from-path`|None| Walks all `$PATH` directories and adds all executables as selectable items |
+|`--stdout`|None| Prints the selected result to stdout instead of trying to execute it |
+
+These can also be combined, for example, if you want to add custom commands to your usual list of programs.
+```bash
+echo 'Big kitty = kitty -o "font_size=20"' | kickoff --from-stdin --from-path --history ".cache/kickoff/custom_history.csv"
+```
+
+### Input Format
+
+Reading from file or stdin follows a very simple format,
+spaces around the equals sign can be dropped:
+```
+Small kitty = kitty -o "font_size=5"
+Big kitty = kitty -o "font_size=20"
+^=======^   ^=====================^
+    |                  |
+Displayed Name         |
+                       |
+              Executed Command
+```
+
+### Magic Words
+
+When reading from a file or stdin, you can use magic words to influence the generated items.
+Currently, there is only one, but more might be added someday:
+
+In this example, `Small kitty`` has a base score of 0, while the others have a score of 5.
+```
+Small kitty = kitty -o "font_size=5"
+$base_score = 5
+Big kitty = kitty -o "font_size=20"
+Medium kitty = kitty -o "font_size=12"
+```
\ No newline at end of file
diff --git a/assets/default_config.toml b/assets/default_config.toml
index 7b29a8a..804cd4a 100644
--- a/assets/default_config.toml
+++ b/assets/default_config.toml
@@ -6,12 +6,13 @@ prompt = ''
 # space between window border and the content in pixel
 padding = 100
 
-# font = ''        # has been deprecated in favour of fonts list
-fonts = ['Noto Sans Mono']     # list of otf or ttf fonts. later elements work as fallback
+fonts = [
+    'Noto Sans Mono',
+] # list of otf or ttf fonts. later elements work as fallback
 font_size = 32.0
 
 [history]
-decrease_interval = 48 # interval to decrease the number of launches
+decrease_interval = 48 # interval to decrease the number of launches in hours
 
 [colors]
 # color format: rgb or rgba, if transparency is desired


Test patch: