Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Custom command plugins #156

Open
pinpox opened this issue Jun 11, 2024 · 0 comments
Open

Feature request: Custom command plugins #156

pinpox opened this issue Jun 11, 2024 · 0 comments
Labels
enhancement New feature or request plugin rust Pull requests that update Rust code

Comments

@pinpox
Copy link
Contributor

pinpox commented Jun 11, 2024

It would be nice to have a generic "custom" plugin, that let's you configure a bash command to create a list and a bash command to act on the selection. This could be useful for a number of cases, I have included two examples as configuration format proposal below.

plugin:
  applications:
    enable: true
# ... 
  cusom:
    enable: true
    commands:
      - name: "Open code project"
        command: "ls -l ~/code"
        action: "foot --working-derectory ~/code/{}"
        icon: "font-awesome icon name"
      - name: "Mail contact"
        command: "cat ~/mail-addresses.txt"
        action: "neomutt -s 'mail from centerpiece' {}"
        icon: "font-awesome icon name"
# ...
  

In the configuation of each instance of the command should return a list of strings separted by newline and action should be a bash command to execute when pressing enter on a selection. Of course there needs to be some predefined placeholder (here {} e.g.) that get's interpolated into the command string. It also probably makes sense to add an icon property that specifies the font-awesome icon to use. Each entry in commands would then be shown the same way as other plugins are presented when launching centerpiece.

@friedow friedow added enhancement New feature or request rust Pull requests that update Rust code plugin labels Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request plugin rust Pull requests that update Rust code
Projects
None yet
Development

No branches or pull requests

2 participants