Bug 459019

Summary: Terminal command is blocking if Spectacle is not already open
Product: [Applications] Spectacle Reporter: xenothestrange
Component: GeneralAssignee: Boudhayan Gupta <me>
Status: RESOLVED NOT A BUG    
Severity: minor CC: kde, nate
Priority: NOR    
Version First Reported In: 22.08.0   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description xenothestrange 2022-09-12 11:57:51 UTC
STEPS TO REPRODUCE
Ensure that Spectacle is not running
Run command: spectacle -b -f -o "/tmp/test.png"; echo test

OBSERVED RESULT
echo command is not run due to spectacle blocking (unless it was open prior to the command being run)

EXPECTED RESULT
Spectacle is run, takes a screenshot and then closes.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma 
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.5

Note:
The program "scrot" demonstrates the expected behavior.
Comment 1 Nate Graham 2022-09-13 19:26:57 UTC
For technical reasons, Spectacle has to remain open while the notification it sends is open. If this is a problem for your scripting purposes, you can add the -n argument to suppress the notification, which will make Spectacle exit instantly after taking a screenshot, at the cost of not showing you a notification.