summaryrefslogtreecommitdiff
path: root/modules/system/defaults/controlcenter.nix
blob: 91532fa9e1dda4d8c1aa009d78dbdd5d1786c875 (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
{ config, lib, ... }:

{
  options = {

    system.defaults.controlcenter.BatteryShowPercentage = lib.mkOption {
        type = lib.types.nullOr lib.types.bool;
        default = null; 
        description = ''
            Apple menu > System Preferences > Control Center > Battery

            Show a battery percentage in menu bar. Default is null.
        '';
    };

    system.defaults.controlcenter.Sound = lib.mkOption {
        type = lib.types.nullOr lib.types.bool;
        apply = v: if v == null then null else if v == true then 18 else 24;
        default = null; 
        description = ''
            Apple menu > System Preferences > Control Center > Sound

            Show a sound control in menu bar . Default is null.

            18 = Display icon in menu bar
            24 = Hide icon in menu bar
        '';
    };

    system.defaults.controlcenter.Bluetooth = lib.mkOption {
        type = lib.types.nullOr lib.types.bool;
        apply = v: if v == null then null else if v == true then 18 else 24;
        default = null; 
        description = ''
            Apple menu > System Preferences > Control Center > Bluetooth

            Show a bluetooth control in menu bar. Default is null.

            18 = Display icon in menu bar
            24 = Hide icon in menu bar
        '';
    };

    system.defaults.controlcenter.AirDrop = lib.mkOption {
        type = lib.types.nullOr lib.types.bool;
        apply = v: if v == null then null else if v == true then 18 else 24;
        default = null; 
        description = ''
            Apple menu > System Preferences > Control Center > AirDrop

            Show a AirDrop control in menu bar. Default is null.

            18 = Display icon in menu bar
            24 = Hide icon in menu bar
        '';
    };

    system.defaults.controlcenter.Display = lib.mkOption {
        type = lib.types.nullOr lib.types.bool;
        apply = v: if v == null then null else if v == true then 18 else 24;
        default = null; 
        description = ''
            Apple menu > System Preferences > Control Center > Display

            Show a Screen Brightness control in menu bar. Default is null.

            18 = Display icon in menu bar
            24 = Hide icon in menu bar
        '';
    };

    system.defaults.controlcenter.FocusModes = lib.mkOption {
        type = lib.types.nullOr lib.types.bool;
        apply = v: if v == null then null else if v == true then 18 else 24;
        default = null; 
        description = ''
            Apple menu > System Preferences > Control Center > Focus

            Show a Focus control in menu bar. Default is null.

            18 = Display icon in menu bar
            24 = Hide icon in menu bar
        '';
    };

    system.defaults.controlcenter.NowPlaying = lib.mkOption {
        type = lib.types.nullOr lib.types.bool;
        apply = v: if v == null then null else if v == true then 18 else 24;
        default = null; 
        description = ''
            Apple menu > System Preferences > Control Center > Now Playing

            Show a Now Playing control in menu bar. Default is null.

            18 = Display icon in menu bar
            24 = Hide icon in menu bar
        '';
    };
  };
}