mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-06 08:47:00 +00:00
Merge pull request #1242 from filipkania/screencapture-target
defaults: add screencapture.target option
This commit is contained in:
commit
713da7b75b
3 changed files with 21 additions and 0 deletions
|
@ -48,5 +48,20 @@ with lib;
|
||||||
Show thumbnail after screencapture before writing to file. The default is true.
|
Show thumbnail after screencapture before writing to file. The default is true.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
system.defaults.screencapture.target = mkOption {
|
||||||
|
type = types.nullOr (types.enum [ "file" "clipboard" "preview" "mail" "messages" ]);
|
||||||
|
default = null;
|
||||||
|
description = ''
|
||||||
|
Target to which screencapture should save screenshot to. The default is "file".
|
||||||
|
Valid values include:
|
||||||
|
|
||||||
|
* `file`: Saves as a file in location specified by `system.defaults.screencapture.location`
|
||||||
|
* `clipboard`: Saves screenshot to clipboard
|
||||||
|
* `preview`: Opens screenshot in Preview app
|
||||||
|
* `mail`
|
||||||
|
* `messages`
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -426,6 +426,11 @@ defaults write com.apple.screencapture 'location' $'<?xml version="1.0" encoding
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<string>/tmp</string>
|
<string>/tmp</string>
|
||||||
</plist>'
|
</plist>'
|
||||||
|
defaults write com.apple.screencapture 'target' $'<?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">
|
||||||
|
<string>file</string>
|
||||||
|
</plist>'
|
||||||
defaults write com.apple.screensaver 'askForPassword' $'<?xml version="1.0" encoding="UTF-8"?>
|
defaults write com.apple.screensaver 'askForPassword' $'<?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">
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
|
|
|
@ -74,6 +74,7 @@
|
||||||
system.defaults.finder.ShowRemovableMediaOnDesktop = false;
|
system.defaults.finder.ShowRemovableMediaOnDesktop = false;
|
||||||
system.defaults.hitoolbox.AppleFnUsageType = "Show Emoji & Symbols";
|
system.defaults.hitoolbox.AppleFnUsageType = "Show Emoji & Symbols";
|
||||||
system.defaults.screencapture.location = "/tmp";
|
system.defaults.screencapture.location = "/tmp";
|
||||||
|
system.defaults.screencapture.target = "file";
|
||||||
system.defaults.screencapture.include-date = true;
|
system.defaults.screencapture.include-date = true;
|
||||||
system.defaults.screensaver.askForPassword = true;
|
system.defaults.screensaver.askForPassword = true;
|
||||||
system.defaults.screensaver.askForPasswordDelay = 5;
|
system.defaults.screensaver.askForPasswordDelay = 5;
|
||||||
|
|
Loading…
Add table
Reference in a new issue