Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Shirasaki

macrumors P6
Original poster
May 16, 2015
16,249
11,743
Let's just go straight into the issue here:
1. Safari doesn't have an option to "warn user before closing multiple tabs". Are there some ways that can achieve this? I closed Safari windows so many times by accident. Btw, I don't need "Safari will restore tabs when you reopen" answer.

2. Does macOS ever be allowed to update tab groups? A.k.a, I open a few new tabs on macOS inside a custom tab group, close Safari, and reopen, and said custom tab group gets updated with new tabs. Based on my experience, only iPhone/iPad can update custom tab groups for some reason.

Thanks and Merry Christmas.
 

elptdbi3lYI

macrumors 6502
Mar 26, 2021
320
275
1. Set another shortcut to quit safari
 

Attachments

  • Screen Shot 2021-12-25 at 11.54.34.png
    Screen Shot 2021-12-25 at 11.54.34.png
    153.1 KB · Views: 67

Shirasaki

macrumors P6
Original poster
May 16, 2015
16,249
11,743
1. Set another shortcut to quit safari
Umm, I just tried it out and it doesn't replace default Command+Q to quit Safari, but rather allows us to use whatever alternative hotkeys I set to close Safari (but new hotkey wont work if it causes conflict with existing Safari hotkey).

What I want is more on not letting the Safari quit after I press Command + Q. Anyway to do it?
 

elptdbi3lYI

macrumors 6502
Mar 26, 2021
320
275
Umm, I just tried it out and it doesn't replace default Command+Q to quit Safari, but rather allows us to use whatever alternative hotkeys I set to close Safari (but new hotkey wont work if it causes conflict with existing Safari hotkey).

What I want is more on not letting the Safari quit after I press Command + Q. Anyway to do it?
It works for me (cmd+q does nothing), maybe monterey broke it
 

Attachments

  • Screen Shot 2021-12-26 at 10.50.38.png
    Screen Shot 2021-12-26 at 10.50.38.png
    42.8 KB · Views: 44

Shirasaki

macrumors P6
Original poster
May 16, 2015
16,249
11,743
It works for me (cmd+q does nothing), maybe monterey broke it
Yeah probably. I am using Monterey.

I can check the above option writing a script for that feature. Maybe I don’t need to remap hotkeys.
 

Artiste212

macrumors regular
Aug 26, 2012
143
73
If you don't want Safari to automatically quit when pressing cmd-Q, but want to see a confirmation dialong, you can do this with FastScripts (free version). Unfortunately, I didn't write this. It hijacks the cmd-Q control and askes you if you're sure. I like it because I'd often in cmd-Q when trying to hit cmd-W. Of course, now I often need to hit shitf-cmd-W to close the new window created by links from Mail, etc.

Edit: I forgot to say, using FastScripts, set "cmd-Q" to call the below script.
Also, I had set cmd-opt-G to send highlighted text (or entire webpage) to Google Translate. This really isn't needed in Monterey, so wonder if anybody has any good ideas for another useful Safari script?

- - - - - - - - - - - - - - - - - - - - - - -
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions

tell application "Safari"
set _window_count to count windows
set _tab_count to 0

repeat with _w in every window
set _tab_count to _tab_count + (count tabs of _w)
end repeat
set _msg to _window_count & " windows containing " & ¬
_tab_count & " tabs." as string

display alert ¬
"Are you sure you want to quit Safari?" message _msg ¬
buttons {"Cancel", "Quit"} ¬
giving up after 60
if button returned of result is "Quit" then quit
end
tell
- - - - - - - - - - - - - - - - - - - - - - -
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.