Added a README to each of the plugins, giving an overview on how they work

This commit is contained in:
Kirottu 2023-05-02 08:37:43 +03:00
parent 8a4c0ae397
commit 81b00ad52b
No known key found for this signature in database
GPG Key ID: 4034355FE9181021
10 changed files with 130 additions and 16 deletions
README.md
plugins
applications
dictionary
kidex
randr
rink
shell
stdin
symbols
translate

@ -126,24 +126,24 @@ cp examples/config.ron ~/.config/anyrun/config.ron # Copy the default config fil
Anyrun requires plugins to function, as they provide the results for input. The list of plugins in this repository is as follows:
- [Applications](plugins/applications)
- [Applications](plugins/applications/README.md)
- Search and run system & user specific desktop entries.
- [Symbols](plugins/symbols)
- [Symbols](plugins/symbols/README.md)
- Search unicode symbols.
- [User defined symbols](plugins/symbols/README.md#User-defined-symbols)
- [Rink](plugins/rink)
- [Rink](plugins/rink/README.md)
- Calculator & unit conversion.
- [Shell](plugins/shell)
- [Shell](plugins/shell/README.md)
- Run shell commands.
- [Kidex](plugins/kidex)
- [Kidex](plugins/kidex/README.md)
- File search provided by [Kidex](https://github.com/Kirottu/kidex).
- [Randr](plugins/randr)
- [Randr](plugins/randr/README.md)
- Rotate and resize; quickly change monitor configurations on the fly.
- TODO: Only supports Hyprland, needs support for other compositors.
- [Stdin](plugins/stdin)
- [Stdin](plugins/stdin/README.md)
- Turn Anyrun into a dmenu like fuzzy selector.
- Should generally be used exclusively with the `-o` argument.
- [Dictionary](plugins/dictionary)
- [Dictionary](plugins/dictionary/README.md)
- Look up definitions for words
## Configuration

@ -1,13 +1,18 @@
# Applications
## Desktop Actions
Launch applications.
To enable desktop actions support, set `desktop_actions` in the applications plugin config
file to `true` like so:
## Usage
Simply search for the application you wish to launch.
## Configuration
`<anyrun config directory>/applications.ron`:
```ron
// <Anyrun config dir>/applications.ron
Config(
// Also show the Desktop Actions defined in the desktop files, e.g. "New Window" from LibreWolf
desktop_actions: true,
max_entries: 5,
)
```

@ -0,0 +1,16 @@
# Dictionary
Look up word definitions using the [Free Dictionary API](https://dictionaryapi.dev/).
## Usage
Type in `<prefix><word to define>`, where prefix is the configured prefix (default in [Configuration](#Configuration)).
## Configuration
```ron
// <Anyrun config dir>/dictionary.ron
Config(
prefix: ":def",
)
```

16
plugins/kidex/README.md Normal file

@ -0,0 +1,16 @@
# Kidex
A plugin to search files using the [Kidex](https://github.com/Kirottu/kidex) file indexing daemon.
## Usage
As long as the Kidex daemon is running, simply look up the file names.
## Configuration
```ron
// <Anyrun config directory>/kidex.ron
Config(
max_entries: 3,
)
```

18
plugins/randr/README.md Normal file

@ -0,0 +1,18 @@
# Randr
A plugin to quickly change monitor configurations on the fly.
## Usage
Type in the configured prefix (default is in [Configuration](#Configuration)), and select from the options. Fuzzy matching is enabled so it can be
used to narrow down the options.
## Configuration
```ron
//<Anyrun config dir>/randr.ron
Config(
prefix: ":dp",
max_entries: 5,
)
```

7
plugins/rink/README.md Normal file

@ -0,0 +1,7 @@
# Rink
A simple calculator plugin powered by [Rink](https://github.com/tiffany352/rink-rs).
## Usage
Just type in your calculations/unit conversions.

18
plugins/shell/README.md Normal file

@ -0,0 +1,18 @@
# Shell
Run shell commands.
## Usage
Type in `<prefix><command>`, where `<prefix>` is the configured prefix (default in [Configuration](#Configuration)) and `<command>` is the command you want to run.
## Configuration
```ron
// <Anyrun config dir>/shell.ron
Config(
prefix: ":sh",
// Override the shell used to launch the command
shell: None,
)
```

9
plugins/stdin/README.md Normal file

@ -0,0 +1,9 @@
# Stdin
Reads lines from the standard input and fuzzy matches on those. The selected one is printed to stdout.
Allows for easy integration into scripts that have been made with something like dmenu in mind.
## Usage
This plugin should generally be used alone, if a dmenu replacement is needed. This can be done with `anyrun -o libstdin.so`.
The content to fuzzy match on needs to be piped into Anyrun.

@ -1,13 +1,21 @@
# Symbols
## User defined symbols
Look up unicode symbols and custom user defined symbols.
## Usage
Simply search for the symbol's name.
## Configuration
User defined symbols are defined in the `symbols.ron` file inside the anyrun configuration directory. The structure of the file is as follows:
```ron
// <Anyrun config dir>/symbols.ron
Config(
// Custom user defined symbols to be included along the unicode symbols
symbols: {
// "search-term": "text to be copied"
// "name": "text to be copied"
"shrug": "¯\_(ツ)_/¯",
}
},
max_entries: 3,
)
```

@ -0,0 +1,17 @@
# Translate
Quickly translate text using the Google Translate API.
## Usage
Type in `<prefix><target lang> <text to translate>`, where prefix is the configured prefix (default is in [Configuration](#Configuration)) and the rest are pretty obvious.
## Configuration
```ron
// <Anyrun config dir>/translate.ron
Config(
prefix: ":",
max_entries: 3,
)
```