-
Notifications
You must be signed in to change notification settings - Fork 18
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
feature request: add an icon you can modify through the command #28
Comments
If https://store.kde.org/p/1297839/ isn't useful, then you can just edit the widget to something like: https://github.com/Zren/plasma-applet-commandoutput/blob/master/package/contents/ui/main.qml#L199 Plasmoid.fullRepresentation: Item {
id: panelItem
PlasmaCore.IconItem {
anchors.fill: parent
source: widget.outputText == "ON" ? "icon-on" : "icon-off"
}
Text {
id: output
visible: false
}
} See the widget documentation for help: https://develop.kde.org/docs/plasma/widget/ |
that works perfectly, thank you very much! I set the icon to the value returned by the script, so that any command just has to return the path to an icon and the widget will change its icon. |
No. While related, the widget is named command output. There already exists a widget that changes state based on the command output. There's also the more complicated kargos widget for full custom behavior based on the output. I'm glad you got it working for yourself. |
Could you please clarify if that code block should be added after line 199, and before the block regarding "Terminal colors", and how "on" and "off" icons can be used? |
Hi, it would be great if you could add the possibility to add an icon that you could modify after the command has been launched, something like
on click command: "do something; new_icon='~/images/icon.png' "
others widgets automatically change it like a "on/off", but sometimes I need to evaluate the situation with a command and, reading the output, changing the icon with the more appropriate one
(I tried to do this by myself modifying this and other plugins but I miserably failed XD)
The text was updated successfully, but these errors were encountered: