Closed RaitaroH closed 5 years ago
Change MouseArea.onClicked
from widget.performClick()
to timer.triggered()
. Add timer.restart()
if you also want to countdown to restart.
https://github.com/Zren/plasma-applet-commandoutput/blob/master/package/contents/ui/main.qml#L106
I might add a "refresh" to the right click context menu, but I probably won't add support for manual refreshes beyond that.
I ended up with:
onClicked: {
widget.performClick()
timer.triggered()
timer.restart()
}
Works as I wanted it thank you.
Also, on line I thought that adding 0 instead for minimum would make the widget basically take no space if it does not output anything. Seems that is not it.
It will be nice if there would be a toggle for command output, such that if you click on it it will redraw itself. So for ex if it would take 10min for the command output to be rerun, on click it will skip that time. The update should be independent of #2.