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

system.defaults.dock.persistent-apps doesn't work #1250

Open
shishkin opened this issue Jan 3, 2025 · 1 comment
Open

system.defaults.dock.persistent-apps doesn't work #1250

shishkin opened this issue Jan 3, 2025 · 1 comment

Comments

@shishkin
Copy link

shishkin commented Jan 3, 2025

I've tried setting persistent Dock apps via system.defaults.dock."persistent-apps" option as shown in the docs:

system.defaults.dock."persistent-apps" = [
  "/Applications/Mail.app"
];

When I apply the settings, I get a question mark item in the Dock instead.

I've tried different variations of the string value ("Mail.app", file///Applications/Mail.app/ etc.) but nothing worked.

When I examined applied Dock default with defaults read com.apple.dock persistent-apps, I see the generated items look like:

        {
        "tile-data" =         {
            "file-data" =             {
                "_CFURLString" = "/Applications/Mail.app";
                "_CFURLStringType" = 0;
            };
        };
    },

...while a proper manually created items look like this:

        {
        "tile-data" =         {
            book = {length = 588, bytes = 0x626f6f6b 4c020000 00000410 30000000 ... 04000000 00000000 };
            "bundle-identifier" = "com.apple.systempreferences";
            "dock-extra" = 1;
            "file-data" =             {
                "_CFURLString" = "file:///System/Applications/System%20Settings.app/";
                "_CFURLStringType" = 15;
            };
            "file-label" = "System Settings";
            "file-mod-date" = 0;
            "file-type" = 1;
            "is-beta" = 0;
            "parent-mod-date" = 0;
        };
        "tile-type" = "file-tile";
    }

Has anyone managed to get persistent apps in Dock with nix-darwin?

I'm running MacOS Sequoia 15.2.

@shishkin
Copy link
Author

shishkin commented Jan 3, 2025

Apparently, it works for default system applications with a path like "/System/Applications/Mail.app".

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

No branches or pull requests

1 participant