summaryrefslogtreecommitdiff
path: root/modules/system/defaults/screencapture.nix
blob: 351ca5f2f3b89fd17f2768cc290aed121e3cba37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{ lib, ... }:

with lib;

{
  options = {

    system.defaults.screencapture.location = mkOption {
      type = types.nullOr types.str;
      default = null;
      description = ''
          The filesystem path to which screencaptures should be written.
        '';
    };

    system.defaults.screencapture.type = mkOption {
      type = types.nullOr types.str;
      default = null;
      description = ''
          The image format to use, such as "jpg".
        '';
    };

    system.defaults.screencapture.disable-shadow = mkOption {
      type = types.nullOr types.bool;
      default = null;
      description = ''
          Disable drop shadow border around screencaptures. The default is false.
        '';
    };

    system.defaults.screencapture.include-date = mkOption {
      type = types.nullOr types.bool;
      default = null;
      description = ''
        Include date and time in screenshot filenames. The default is true.
        Screenshot 2024-01-09 at 13.27.20.png would be an example for true.
        
        Screenshot.png
        Screenshot 1.png would be an example for false.
      '';
    };

    system.defaults.screencapture.show-thumbnail = mkOption {
      type = types.nullOr types.bool;
      default = null;
      description = ''
        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`
      '';
    };
  };
}