Skip to content

[FEATURE] Make the custom_button label dynamic with bash scripts #4570

Description

@fdom-93

Submission checklist

  • I have searched existing issues and confirmed this has not been requested before.
  • I have checked existing pull requests for similar changes.

Feature type

Configuration / customization

Feature summary

In previous versions of Noctalia (before the switch to .toml configuration), it was possible to create a custom component and dynamically add a label—for example, by intercepting the output of a Bash script or directly using a bash command. In v5, it seems to me that this feature has been left out. I think it’s very useful because it allows for truly in-depth customization of the custom_widget.

Motivation / use case

Here's a specific example for my use case: I have several VMs, and I've created custom_widgets so I can quickly turn them on or off as needed. If there were a way to capture the output of a bash script, I could easily display the ON/OFF status in the label. In Noctalia < v5, I already had this option, but unfortunately I can't replicate it in the new version.

Proposed solution

This is my proposed solution:

`[widget.quick-action]
type = "custom_button"
custom_image = "/path/to/icon.png"
custom_image_colorize = true
label = "exec echo "Label"" <---- allow to add bash command

[widget.quick-action.actions]
left = "exec notify-send Noctalia"
right = "exec notify-send 'Other action'"`

Alternatives considered

No response

References / related projects

No response

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions