plasma-applet-commandoutput icon indicating copy to clipboard operation
plasma-applet-commandoutput copied to clipboard

Forcing the command to run also after running a script on click

Open Sadi58 opened this issue 2 years ago • 3 comments

In some use cases it can be necessary to force the command (e.g. checking and displaying the status of something every 60 minutes) to run immediately after clicking the widget (and running a script that can change the status in question). I wonder if this can be achieved with or without some modification in this widget.

Sadi58 avatar Dec 31 '22 09:12 Sadi58

hey. I needed this as well, so I modified the applet.. just insert this in main.qml immediately after line 230: if (cmd == config.clickCommand) { executable.exec(config.command) }

elabjer avatar Dec 31 '23 01:12 elabjer

After exactly one year, I forgot what I had in mind when I needed it. 😄 This brings up another idea: to list some examples of Command Output widget in action somewhere here...

Sadi58 avatar Dec 31 '23 08:12 Sadi58

As such a fixed feature would be undesirable in some use cases, it seems the best solution could be to include it as an option in the settings so that it can be enabled or disabled in each use of the widget.

Sadi58 avatar Dec 31 '23 08:12 Sadi58