Jump to content

QuitArena — Quit all apps, with exceptions


Recommended Posts

Call qapps and all apps excluding the ones you set in the keep_alive Workflow Environment Variable will quit. The Finder and Alfred (including Alfred Preferences) are added to the exclusion list by default, unless you set their kill_ variables to true.


o1xU4er.png


You can exclude extra apps on a per-run basis by adding them as arguments. Calling with ⌘↵ will also exclude the frontmost app.


Use the exact application names as they present themselves to the system. To prevent multiple apps from quitting, separate their names with commas.


gyLMgeB.png


qprocesses will kill all processes, subject to the same keep_alive and kill_ settings, meaning even things in the background that you don’t see will be asked to quit.


The External Triggers allow to temporarily override which apps to keep alive by passing them as the argument.


Note both options ask the apps to exit (SIGTERM) instead of telling them (SIGKILL). If you need to force individual processes to terminate, use ProcessControl instead.


Download | Source

Edited by vitor
Link to comment
  • 2 weeks later...
  • 10 months later...
3 hours ago, mgs1000 said:

Actually  - even more of a dummy - since the update it doesn't seem to quit the apps anymore. Is there an input needed from me?

 

I’m confused. First it seemed like you’d never used the Workflow and now you’re saying it’s not working anymore, implying you had it working previously.

 

Which is it? I’ll need to know your steps so I can help you debug.

Edited by vitor
Link to comment
  • 2 months later...

Update.

 

You can now add apps to the keep_alive list on a per-run basis, by adding them as arguments on the Keyword. Also, ⌘↵ is a shortcut to add the frontmost app.


To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater.

Link to comment
  • 1 year later...

This workflow quits working from time to time and I can't seem to figure out why.

 

In this screenshot is the script that is causing the problem and you can see the debugger. The second screenshot is the variables for the workflow. I have not changed anything since I installed this workflow and I'm just now getting this error after it working fine for a long time. Am I doing something incorrectly here?

 

516435718_qasproblem.thumb.png.b48bb5b2191c66b06dd326ed9c344ff7.png2123404493_ScreenShot2022-01-29at7_55_19PM.png.756188b05c1276fc081750dc9a4fa903.png

Link to comment
11 hours ago, Undertaker01 said:

I have not changed anything since I installed this workflow and I'm just now getting this error after it working fine for a long time.

 

Yo’ve changed plenty of things, only outside the Workflow. One of your apps is the likely culprit. When it happens, run osascript -l JavaScript -e "Application('System Events').applicationProcesses.where({ backgroundOnly: false }).name()" in a Terminal and check what’s running.


Also:

  • Make sure you’re on 22.1, just released (basically code cleanup).
  • When asking for help, always include your Alfred and macOS versions.

Link to comment
On 1/30/2022 at 7:11 AM, vitor said:

 

  • Make sure you’re on 22.1, just released (basically code cleanup).
  • When asking for help, always include your Alfred and macOS versions.

 

 

Noted. My bad.

 

Big Sur & Alfred 4.6.2 and I've just updated the workflow to the latest version.

 

I'll see what happens when I use it again, thanks!

Link to comment
  • 2 months later...
On 1/30/2022 at 7:11 AM, vitor said:

 

Yo’ve changed plenty of things, only outside the Workflow. One of your apps is the likely culprit. When it happens, run osascript -l JavaScript -e "Application('System Events').applicationProcesses.where({ backgroundOnly: false }).name()" in a Terminal and check what’s running.


Also:

  • Make sure you’re on 22.1, just released (basically code cleanup).
  • When asking for help, always include your Alfred and macOS versions.

 

 

Okay, I've narrowed it down to Spotify being the issue. When I run the workflow with Spotify running I get an error, nothing is quit and nothing happens. When I add Spotify to the keep_alive list, the workflow runs with no issue and quits all apps. I've added Spotify to the keep_alive list and the workflow runs without issue. Sometimes it takes a little long after I run it for anything to happen and quit apps, but apart from that no complaints. Sorry for the delayed reply!

 

Alfred 4.6.4

I'm using v22.1 of the workflow

macOS Monterey 12.3.1

 

Screen Shot 2022-04-15 at 6.26.23 AM.png

Screen Shot 2022-04-15 at 6.27.42 AM.png

Link to comment

I can’t reproduce, but Spotify also doesn’t run properly on a Virtual Machine (and I don’t trust them to install it on my main one) so no idea what the heck they’re doing. All the Workflow does is ask (not tell) apps to quit.


You haven’t posted the result of the command you quoted. Does Spotify show up as Spotify or something else?

Link to comment
On 4/15/2022 at 9:09 AM, vitor said:

I can’t reproduce, but Spotify also doesn’t run properly on a Virtual Machine (and I don’t trust them to install it on my main one) so no idea what the heck they’re doing. All the Workflow does is ask (not tell) apps to quit.


You haven’t posted the result of the command you quoted. Does Spotify show up as Spotify or something else?

 

-- I added Terminal to the keep_alive list for this demonstration, Safari is also on the keep_alive list but it is not running. But no matter what apps are and aren't on the keep_alive list, I always get an error when Spotify is not listed there.

 

This screenshot shows a successful run of the QuitArena workflow with Calendar, Preview & Books open. I ran the command after a successful run of the workflow revealing that the apps were quit. After that I opened Spotify and tried to run the workflow and got an error.

image.thumb.png.90835ec6b21b9924a5f772f3d678791a.png

 

Here's it with the same apps that were successfully quit before, with the only difference being that Spotify is running.

image.thumb.png.56c03cf8acc5e286689faf8d7a597b21.png

 

-- Okay now i'll add Spotify to the keep_alive list

 

Here is Spotify on the keep_alive list

image.png.d23bd298957544956afab8e9a20110e6.png

 

Now running the workflow with the same apps + Spotify on the keep_alive list

image.thumb.png.768c2364b9a77d5ab5fccbbcfb553276.png

 

I've tried this with all different combinations of apps running, I haven't had it fail at any point other than when Spotify was running and not on the keep_alive list.

 

I've just added it to the keep_alive list and moved on, for me it's not the end of the world. Thanks for the great workflow!

 

Alfred 4.6.4

Workflow v22.1

Monterey 12.3.1

Link to comment
  • 4 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...