Jump to content
Drooply

Alfred 2 shutdown and restart reopen windows

Recommended Posts

Hi

When using Alfred 2 to shutdown or restart my Mac, it does it as if I have the setting on to "Reopen windows when logging back in", which is a setting i despise.

Is this a bug(that Alfred 2 does not use the users standard setting)? Or is it possible to use these functions without this option on?

 

Thanks.

Share this post


Link to post

Hi

When using Alfred 2 to shutdown or restart my Mac, it does it as if I have the setting on to "Reopen windows when logging back in", which is a setting i despise.

Is this a bug(that Alfred 2 does not use the users standard setting)? Or is it possible to use these functions without this option on?

 

Thanks.

 

The option isn't normally available. I made a workflow for it that, I haven't tried in quite some time so I'm not sure if it still works correctly or not. You can try it here

Share this post


Link to post

Hi Guys, I do not prefer to install a workflow for this. Could Alfred-2 provide an option to choose, similar to what the OSX does.

 

To include this into Alfred would require some bodging, as this option is not readily available for third-party apps to control, and Alfred is proudly bodge-free :)

 

If you want to try out the workflow, you can set the workflow to use the same keyword, and uncheck the box for the default restart/shutdown keywords instead. You can always revert back to the default behaviour and remove the workflow if you don't enjoy using it.

 

Cheers,

Vero

Share this post


Link to post

I'd also say make sure it's not actually an OS glitch, not Alfred's fault. Try restarting the normal way, sans Alfred, just to see...

It seems like a relatively common issue (current OSX version and all) that even when you uncheck "Reopen windows when logging back in" the windows still reopen (despite what programs are designated "login items").
 

Share this post


Link to post

I'd also say make sure it's not actually an OS glitch, not Alfred's fault. Try restarting the normal way, sans Alfred, just to see...

It seems like a relatively common issue (current OSX version and all) that even when you uncheck "Reopen windows when logging back in" the windows still reopen (despite what programs are designated "login items").

 

 

+1 on this. I've noticed this several times in the past. I hate it reopening everything after a restart and even though the setting in OSX is there to *NOT* reopen, it'll reboot and open up 20 windows.. Grr

Share this post


Link to post

Don't mean to resurrect a zombie thread here, but I just made those modifications and open-sourced it. Feel free to download it from the repo here.

 

Thanks. Your repo has only the workflow binary. Could you also open source the source itself.

 

Best Regards,  

Joe.

Share this post


Link to post

To include this into Alfred would require some bodging, as this option is not readily available for third-party apps to control, and Alfred is proudly bodge-free :)

 

If you want to try out the workflow, you can set the workflow to use the same keyword, and uncheck the box for the default restart/shutdown keywords instead. You can always revert back to the default behaviour and remove the workflow if you don't enjoy using it.

 

Cheers,

Vero

 

Thanks Vero. Will try that.

Share this post


Link to post

Hi,

 

tried both workflows. But none works. Maybe this is because i am working with a german Mac OS X. I tried already to adjust the script to the appropriate german menu entry. But still no luck.

 

Of course i granted Alfred 2 the right to control the computer.

 

Any idea what might be wrong?

 

Regards,

Matthias

Share this post


Link to post

Hi,

 

tried both workflows. But none works. Maybe this is because i am working with a german Mac OS X. I tried already to adjust the script to the appropriate german menu entry. But still no luck.

 

Of course i granted Alfred 2 the right to control the computer.

 

Any idea what might be wrong?

 

Regards,

Matthias

 

 

I have no idea why those aren't working, but I'm glad you asked this question, because it got me curious. This has been bothering me for a long time as well.

 

I started looking into this and I found another way to do it. Since I couldn't figure out how to change "Reopen windows..." setting via code, I ended up making what is essentially a macro that goes through the same process you go through, when you manually trigger one of these from the apple menu.

 

The way this workflow differs from Alfred's own System commands, is that it honors the "Reopen windows..." setting.

 

System Commands.alfredworkflow

 

To change "Reopen windows..." setting quickly: 

- Use keyword with modifier “Cmd”

- Change “Reopen windows…” setting (Space)

- Cancel (Esc)

 

I'm not very good at making workflows, so maybe this is not perfect, but it works for me, so I'm happy. 

Edited by joonas

Share this post


Link to post

This is above my pay grade, but perhaps checking the confirm checkboxes for restart & shutdown could force Alfred to open the native OSX confirmation prompts which include the "reopen windows..." option, instead of Alfred's own confirmation prompts.

Share this post


Link to post

I have no idea why those aren't working, but I'm glad you asked this question, because it got me curious. This has been bothering me for a long time as well.

 

I started looking into this and I found another way to do it. Since I couldn't figure out how to change "Reopen windows..." setting via code, I ended up making what is essentially a macro that goes through the same process you go through, when you manually trigger one of these from the apple menu.

 

The way this workflow differs from Alfred's own System commands, is that it honors the "Reopen windows..." setting.

 

System Commands.alfredworkflow

 

To change "Reopen windows..." setting quickly: 

- Use keyword with modifier “Cmd”

- Change “Reopen windows…” setting (Space)

- Cancel (Esc)

 

I'm not very good at making workflows, so maybe this is not perfect, but it works for me, so I'm happy. 

 

Thanks mate, this works just fine for me. Maybe you should consider putting the workflow on http://www.packal.org/.

Share this post


Link to post

This is an old topic by now, but I was doing some googling and this post was the first result when I searched for "Alfred reopen windows when logging back in" and so I thought I'd let anyone stumbling into this know that I did indeed add this to packal years ago and I believe I've since updated it a few times.

 

Updated System Commands.alfredworkflow:

- Packal: http://www.packal.org/workflow/system-commands

- Github: https://github.com/joonaspaakko/System-Commands.alfredworkflow

 

There might be some differences in wording and whatnot, but the .alfredworkflow files are identical in both sources. I also updated the previous Dropbox link just now, but I'm sure I forget to keep that up to date in case I need to make some changes. The original workflow is still here.

 

Edited by joonas

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...