-
Notifications
You must be signed in to change notification settings - Fork 23
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
Commandoutput with Indicator and Richtext Support #127
base: master
Are you sure you want to change the base?
Conversation
Shihira
commented
Jan 8, 2018
•
edited
Loading
edited
- Added indicator. The original state was called expanded mode now.
- Indicator icon option.
- I really need my script to run every 50 ms. Please let users take their own risks.
- Richtext support. Links are treated as shell commands.
- Execution pauses when panel getting folded.
Hmmm, if you hadn't already written the code, I'd have recommended the kargos widget (https://store.kde.org/p/1173112/ | https://github.com/lipido/kargos). Anyways, lets break down the PR. Changing the min interval to 50ms. Not sure why I thought 1sec was the minimum. I do remember
Oh right, now I remember why. While DataEngine.cpp does have a hardcoded minimum of 20 times a second (50ms). DataEngine's also have the ability to set a minimum, which the executable dataengine sets as 1000ms. ExecutableEngine::ExecutableEngine(QObject* parent, const QVariantList& args)
: Plasma::DataEngine(parent, args)
{
setMinimumPollingInterval(1000);
} However, my assumption was wrong. That 1000ms is how often it checks to see if the process is still running. It can "update" sooner if the process finishes in just ~10ms. We can confirm this by using So nice catch, I should have tested that. |
QT_DEVICE_PIXEL_RATIO=2 QML_DISABLE_DISK_CACHE=true plasmoidviewer -a package`
|
|
How are you formatting the "links"? |
Yes. Is that weird? |
It's a hackish way to do it, but that's fine I guess. I'll probably be adding the following after the merge: onLinkActivated: {
var urlStartRegex = /^\w+:\/\//
if (urlStartRegex.match(link)) {
Qt.openUrlExternally(link)
} else { // Assume it's a command
linkRunner.exec(link)
}
} So that you don't need to prefix urls with |