-
-
Notifications
You must be signed in to change notification settings - Fork 455
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
Allow more configuration for persistent-others in dock #1004
base: master
Are you sure you want to change the base?
Conversation
@emilazy hi, pinging maintainers to ask whether any changes are needed to this? or any clarification? |
Sorry for not getting to this earlier. Can |
ecaa208
to
3a948d1
Compare
I agree that having this without typechecking is a bit hacky. I tried setting that up with the submodule type but I must be missing something because I could not get it to work :/ maybe someone with more nix knowhow can take a shot at it, for now i'm just updating the commit message as requested and leaving it without typechecks |
bump :) |
Hi, i would also be super interested in this feature! @emilazy what would you need to be able to merge this? |
anyone struggling as well, it can be done like this but than you can not use the persistent-others anymore: system.defaults.CustomUserPreferences = {
# Sets Downloads folder with fan view in Dock
"com.apple.dock" = {
persistent-others = [
{
"tile-data" = {
"file-data" = {
"_CFURLString" = "/Users/<youruser>/Downloads";
"_CFURLStringType" = 0;
};
"arrangement" = 2; # sorting order
"displayas" = 1; # 1 for fan display
"showas" = 1; # 1 for stack view
};
"tile-type" = "directory-tile";
}
{
"tile-data" = {
"file-data" = {
"_CFURLString" = "/Applications";
"_CFURLStringType" = 0;
};
};
"tile-type" = "directory-tile";
}
];
};
}; I don't know if it is a goof solution but it works |
See #982, currently
system.defaults.dock.persistent-others
can only take paths to folders to display in the dock.From each path, a more complex object is constructed, with the actual settings for the folder. This PR is to allow users to directly define that object.
This allows users to define the sorting criterion, and multiple other display changes.
You would use it like so:
(this works fine on my dock)
The changes I made simply widen the type (to accept
types.attrsOf types.anything
as well), and then simply pass the object through.Now my initial implementation is very simple, and since I'm quite new to Nix and to this repo, I don't know what the best way to approach this is:
Note that there are some properties that should still be generated for you, like
_CFURLStringType
andtile-type
.