Skip to content

Feature request: Custom command plugins #156

@pinpox

Description

@pinpox

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpluginrustPull requests that update Rust code

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions