Metadata-Version: 2.4
Name: quick_actions
Version: 0.0.7a0
Summary: Create menus with dmenu-like applications, configured in toml.
Project-URL: Homepage, https://gitlab.com/leswell/quick-actions/-/blob/main/README.md
Project-URL: Repository, https://gitlab.com/leswell/quick-actions
Author-email: Simofi Levente <simofilevente+pypi@gmail.com>
Maintainer-email: Simofi Levente <simofilevente+pypi@gmail.com>
License-Expression: GPL-3.0-or-later
License-File: LICENSE.txt
License-File: PolyForm-Noncommercial-1.0.0.md
Classifier: Development Status :: 3 - Alpha
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: python-benedict
Description-Content-Type: text/markdown

# Quick Actions
**Configure Your Action menus with hierarchical TOML files bringing your own scripts.**

> Hey guys, I am here creating a cute little tool to have a place for actions, which I want to use, but don't want to bind them to specific keys (I don't use them that often). Check it out, maybe you will like it too.

Easily create powerful menus, you can define actions by giving it a label and a command to execute (or a path, relative path to TOML location are allowed).

You can use tags, prefixes and a bunch of directives (see [examples](#examples)).


## Features
- action IDs:
    - are generated from toml section headers
    - are prefixed with relative path: `[CONFIG_DIR]/actions/a/b/default.toml`, `[toml_section]` ↣ `a.b.toml_section`
- search tags
- prefix for execution (input: `=2+2`, prefix:`=` ↣ `./calculator.sh 2+2`)
    - if called without prefix, asks for input 
- set environment variables from TOML


## Examples
full examples: [Examples](./examples)

## Configuration
Default config dir on posix is `$HOME/.config/quick_actions`, on windows is `$HOME/Appdata/Local/quick_actions`.

- WhatToDoMenu

- [show group]

- [populate options]
- [ask arguments]

- [ edit-results ]
- show results

- [edit-before-copy]
- copy result

### Actions

Actions are the menu entries.

**action id** is generated by the header, prefixed with relative path.

#### keys:
- label: will be displayed in the menu (before id, command_prefix, search_tags)

- exec:  
script
prefix
populate_options
sleep_before
search_tags
show_response

```toml
[env]
ENV_VAR_NAME="ENV_VAR_VALUE"
```

### Scopes
#### Prefix Scope
Prefix scoped settings match against the actions id, using `str.startswith()`.

#### Action Scope
Action scoped settings are set specifically for every action.

### Other

#### Display prefix


## Install

### Using pip
```sh
> pip install quick-actions
```


### Using nixpkgs
```nix
{
    ...
    inputs = {
        quick-actions = {
            url = "git+https://gitlab.com/leswell/quick-actions";
            inputs.nixpkgs.follows = "nixpkgs";
        };
        ...
    }
}
```

**AND** add the package to system or home-manager `quick-actions.packages.${pkgs.system}.quick-actions`
**OR**
use one of the modules.


## PLANS:
- [ ] Module system? (eg. history module, hyprland module)
- [ ] History for outputs (eg. `script.calculator.qalc.calculator`)
- [x] Copy result after show
- [ ] State "persist"
- [ ] Profiles, activatable with `--profile` flag, under `config/profiles`, which overwrites defaults
- [ ] `format-before-copy` for actions (_eg. `script.calculator.qalc.calculator` cut the operation, keep only the result_)
- [ ] `format-action-result` for actions (_eg. `colorpicker.hyprpicker`_)
- [ ] hyprland keybinding modules, using `hyprctl binds -j`
- [x] frecency ordering for consecutive searches (something like `zoxide`) 
- [ ] Complete the docs / check out wiki
- [ ] Aliases somehow (mayB prefix without arguments, SO rethink prefix)
- [ ] config validetion with `--validate-config`

- [ ] shortcut mode with `--shortcut`

- [ ] Search for string (search tags removed) if no results 


## License

This project is licensed under the **PolyForm Noncommercial License 1.0.0**.

You are free to use, modify, and share this software **for noncommercial purposes only**.

**Commercial use, including forks used in paid products, services, or business environments, is not allowed** without **explicit written permission** from the author.

🔗 Read the full license here: [PolyForm Noncommercial License 1.0.0](https://polyformproject.org/licenses/noncommercial/1.0.0/)
