Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

defaults: restart Dock when changing settings #999

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

Enzime
Copy link
Collaborator

@Enzime Enzime commented Jul 10, 2024

No description provided.

@Enzime Enzime requested a review from emilazy July 10, 2024 03:04
Copy link
Contributor

@Samasaur1 Samasaur1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. The one thing that I'm wondering about is whether we want to detect when the user manually sets defaults for com.apple.dock rather than using the nice option, but I think if they choose to do that then it's on them to restart the dock

Copy link
Collaborator

@emilazy emilazy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple thoughts:

  • Are there any potential downsides to this? I remember in the past killing the Dock led to some slight weirdness – e.g. dynamic app icons reverting to their closed state.

  • There’s some other command people have been advocating for that applies more settings at once, right? I forget exactly what but it’s come up several times here. Do we want to run that too?

We definitely have settings that just won’t take effect unless you log back out and in again, I think, so I’m wondering whether we want to get into this game of whack‐a‐mole with user expectations for being able to set settings and have them apply to the running session. Probably it’s not so bad since some of the settings we have now do already just work in real‐time.

@Enzime
Copy link
Collaborator Author

Enzime commented Jul 16, 2024

I'm not aware of any downsides to restarting the dock, most of the information/guides I've seen online just talk about restarting the dock, so I'm fairly sure it's a common thing to do.

With regard to other commands to immediately apply settings, I'd be happy to merge them in in separate PRs, the less things that require a restart the better in my opinion

Copy link
Collaborator

@emilazy emilazy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The thing I was thinking of was /System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u (see #967); I don’t actually know what it does, but maybe we should investigate it. In particular, this blog post about nix-darwin suggests that it can cause Dock settings to activate instantly; I’m fine merging this as‐is, but maybe we should test whether it could be replaced with that?

@Enzime
Copy link
Collaborator Author

Enzime commented Jul 18, 2024

Just tested it, that command doesn't have any effect when changing the dock icons using system.defaults.dock.persistent-apps, I'm going to merge this PR as is, if we can figure out what settings that command actually makes a difference for then we can consider adding it later

@Enzime Enzime merged commit a3e4a7b into LnL7:master Jul 18, 2024
6 checks passed
@Enzime Enzime deleted the restart-dock branch July 18, 2024 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants