Closed Th3Whit3Wolf closed 4 years ago
It only prints when the command finishes. It will not "stream" the stdout while the process runs.
If you change the script to only call get_total_updates
then notify-send
then exit the script, then it should work.
I can't think of an easy way to change the "interval" based on the output though unfortunately.
You could modify the widget (or fork it if you have another instance of the widget) with https://zren.github.io/kde/docs/widget/.
First change interval to:
property bool hasUpdates: false
readonly property int interval: hasUpdates ? 30 * 1000 : 1000 * 60 * 30
Then add extra logic in onExited
to parse formattedText
, setting config.hasUpdates = true
or false
depending on the text.
Wow thank you for the detailed response. I have changed my script and it now works!
OS: Arch Linux Plasmashell: 5.18.4
I made a script to check for updates with to rust toolchain and notify me.
The command the applet runs is
Source code for script
I have tested the script and it runs as I would expect but I get no output in the applet.
It should be noted that I am using BSPWM as the window manger rather than kwin. The default command
echo "Test $(date +%S)"
works fine. Is their anything kwin specific in the code, maybe to get file paths?