Summary: | Display output of command in a notification | ||
---|---|---|---|
Product: | [Plasma] krunner | Reporter: | Michael D <nortexoid> |
Component: | general | Assignee: | Plasma Bugs List <plasma-bugs-null> |
Status: | CONFIRMED --- | ||
Severity: | wishlist | CC: | alexander.lohnau, natalie_clarius, nate |
Priority: | NOR | ||
Version First Reported In: | 5.25.5 | ||
Target Milestone: | --- | ||
Platform: | Manjaro | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Michael D
2022-09-30 08:15:17 UTC
For the shell command plugin you mean? This is already possible by hitting Shift+Enter, or the terminal button in the result. This will not trigger a notification but open a terminal window. @MichaelD Does the "Run in Terminal Window" solution that Natalie mentioned work for you? TBH, I think implementing it as a notification would not work well. Especially if you think of long-running processes. Sorry for the delay. I think a notification would work better in certain situations where you don't need a terminal window spawning, just a transient notification giving the output. I think this would be fine even for long-running processes as it would just output the first n characters of output as a notification. >I think this would be fine even for long-running processes as it would just output the first n characters of output as a notification.
Though where would you draw the line on when to output the notification? Limits like 100 or 200 characters seem arbitrary. And how would we handle the use case where the command outputs some info, runs for a while and then outputs other information.
Having a notification each few seconds might be annoying too :D.
Set the character limit to be roughly the limit of the notification osd. Also, show the notification only once, e.g. after the first line of output. Seems reasonable, but I see there are choices to be made. To me it definitely makes sense to send a notification with command output for commands that write to STDOUT and then exit. Once the process exits, we can gather up the output and stick it right in a notification. If the command keeps running, I think it could still make sense if we have the ability to keep the notification with command output visible on screen and update its text in real time as the process writes more text. If we don't have the technical ability to do that, or it's not feasible, IMO it's sane enough to preserve the status quo and let the process just keep running silently, as this is a very niche use case and I think it's safe to assume that a user who does this knows what they're doing! Sounds like a great idea, and think it would make for a very nice new feature for the command plugin that many would find useful and welcome. |