1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-05 08:17:01 +00:00

Merge pull request #950 from rmgpinto/persistent-others-file-directory-tile

Add file or directory tile to Dock persistent others
This commit is contained in:
Michael Hoang 2024-05-21 07:21:31 +10:00 committed by GitHub
commit 8bf083c992
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 4 deletions

View file

@ -146,7 +146,7 @@ in {
apply = value:
if !(isList value)
then value
else map (folder: { tile-data = { file-data = { _CFURLString = folder; _CFURLStringType = 15; }; }; }) value;
else map (folder: { tile-data = { file-data = { _CFURLString = "file://" + folder; _CFURLStringType = 15; }; }; tile-type = if strings.hasInfix "." (last (splitString "/" folder)) then "file-tile" else "directory-tile"; }) value;
};
system.defaults.dock.show-process-indicators = mkOption {

View file

@ -265,11 +265,13 @@ defaults write com.apple.dock 'persistent-others' $'<?xml version="1.0" encoding
<key>file-data</key>
<dict>
<key>_CFURLString</key>
<string>~/Documents</string>
<string>file://~/Documents</string>
<key>_CFURLStringType</key>
<integer>15</integer>
</dict>
</dict>
<key>tile-type</key>
<string>directory-tile</string>
</dict>
<dict>
<key>tile-data</key>
@ -277,11 +279,13 @@ defaults write com.apple.dock 'persistent-others' $'<?xml version="1.0" encoding
<key>file-data</key>
<dict>
<key>_CFURLString</key>
<string>~/Downloads</string>
<string>file://~/Downloads/file.txt</string>
<key>_CFURLStringType</key>
<integer>15</integer>
</dict>
</dict>
<key>tile-type</key>
<string>file-tile</string>
</dict>
</array>
</plist>'

View file

@ -47,7 +47,7 @@
system.defaults.dock.autohide-delay = 0.24;
system.defaults.dock.orientation = "left";
system.defaults.dock.persistent-apps = ["MyApp.app" "Cool.app"];
system.defaults.dock.persistent-others = ["~/Documents" "~/Downloads"];
system.defaults.dock.persistent-others = ["~/Documents" "~/Downloads/file.txt"];
system.defaults.screencapture.location = "/tmp";
system.defaults.screensaver.askForPassword = true;
system.defaults.screensaver.askForPasswordDelay = 5;