mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
Add persistent others to dock
This commit is contained in:
parent
230a197063
commit
457a5d9952
3 changed files with 44 additions and 0 deletions
|
@ -136,6 +136,19 @@ in {
|
|||
else map (app: { tile-data = { file-data = { _CFURLString = app; _CFURLStringType = 0; }; }; }) value;
|
||||
};
|
||||
|
||||
system.defaults.dock.persistent-others = mkOption {
|
||||
type = types.nullOr (types.listOf (types.either types.path types.str));
|
||||
default = null;
|
||||
example = [ "~/Documents" "~/Downloads" ];
|
||||
description = lib.mdDoc ''
|
||||
Persistent folders in the dock.
|
||||
'';
|
||||
apply = value:
|
||||
if !(isList value)
|
||||
then value
|
||||
else map (folder: { tile-data = { file-data = { _CFURLString = folder; _CFURLStringType = 15; }; }; }) value;
|
||||
};
|
||||
|
||||
system.defaults.dock.show-process-indicators = mkOption {
|
||||
type = types.nullOr types.bool;
|
||||
default = null;
|
||||
|
|
|
@ -255,6 +255,36 @@ defaults write com.apple.dock 'persistent-apps' $'<?xml version="1.0" encoding="
|
|||
</dict>
|
||||
</array>
|
||||
</plist>'
|
||||
defaults write com.apple.dock 'persistent-others' $'<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<array>
|
||||
<dict>
|
||||
<key>tile-data</key>
|
||||
<dict>
|
||||
<key>file-data</key>
|
||||
<dict>
|
||||
<key>_CFURLString</key>
|
||||
<string>~/Documents</string>
|
||||
<key>_CFURLStringType</key>
|
||||
<integer>15</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>tile-data</key>
|
||||
<dict>
|
||||
<key>file-data</key>
|
||||
<dict>
|
||||
<key>_CFURLString</key>
|
||||
<string>~/Downloads</string>
|
||||
<key>_CFURLStringType</key>
|
||||
<integer>15</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
</plist>'
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -47,6 +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.screencapture.location = "/tmp";
|
||||
system.defaults.screensaver.askForPassword = true;
|
||||
system.defaults.screensaver.askForPasswordDelay = 5;
|
||||
|
|
Loading…
Reference in a new issue