diff options
| author | Daiderd Jordan <daiderd@gmail.com> | 2022-04-25 23:03:55 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-25 23:03:55 +0200 |
| commit | 1a387b8b3e4d65d7e65ae3fd85ac62b7c114c9c8 (patch) | |
| tree | bb7b66e67dceb61abc22a1a759c7c77d8091a462 /modules/system | |
| parent | aba9ce944e27428a5de500a19c6e9916e0ec2a8b (diff) | |
| parent | faaa12ad24b6645480e9a41026bc9cd42d44066f (diff) | |
Merge pull request #447 from dsyang/additional-options
add options for configuring activity monitor
Diffstat (limited to 'modules/system')
| -rw-r--r-- | modules/system/defaults-write.nix | 3 | ||||
| -rw-r--r-- | modules/system/defaults/ActivityMonitor.nix | 63 |
2 files changed, 66 insertions, 0 deletions
diff --git a/modules/system/defaults-write.nix b/modules/system/defaults-write.nix index e58c3ac..37e6760 100644 --- a/modules/system/defaults-write.nix +++ b/modules/system/defaults-write.nix @@ -40,6 +40,7 @@ let trackpad = defaultsToList "com.apple.AppleMultitouchTrackpad" cfg.trackpad; trackpadBluetooth = defaultsToList "com.apple.driver.AppleBluetoothMultitouch.trackpad" cfg.trackpad; universalaccess = defaultsToList "com.apple.universalaccess" cfg.universalaccess; + ActivityMonitor = defaultsToList "com.apple.ActivityMonitor" cfg.ActivityMonitor; mkIfAttrs = list: mkIf (any (attrs: attrs != { }) list); in @@ -76,6 +77,7 @@ in trackpad trackpadBluetooth universalaccess + ActivityMonitor ] '' # Set defaults @@ -94,6 +96,7 @@ in ${concatStringsSep "\n" trackpad} ${concatStringsSep "\n" trackpadBluetooth} ${concatStringsSep "\n" universalaccess} + ${concatStringsSep "\n" ActivityMonitor} ''; }; diff --git a/modules/system/defaults/ActivityMonitor.nix b/modules/system/defaults/ActivityMonitor.nix new file mode 100644 index 0000000..2f2f2d4 --- /dev/null +++ b/modules/system/defaults/ActivityMonitor.nix @@ -0,0 +1,63 @@ +{ config, lib, ... }: + +with lib; + +{ + options = { + + system.defaults.ActivityMonitor.ShowCategory = mkOption { + type = types.nullOr (types.enum [100 101 102 103 104 105 106 107]); + default = 100; + description = '' + Change which processes to show. + 100: All Processes + 101: All Processes, Hierarchally + 102: My Processes + 103: System Processes + 104: Other User Processes + 105: Active Processes + 106: Inactive Processes + 107: Windowed Processes + Default is 100. + ''; + }; + + system.defaults.ActivityMonitor.IconType = mkOption { + type = types.nullOr types.int; + default = null; + description = '' + Change the icon in the dock when running. + 0: Application Icon + 2: Network Usage + 3: Disk Activity + 5: CPU Usage + 6: CPU History + Default is null. + ''; + }; + + system.defaults.ActivityMonitor.SortColumn = mkOption { + type = types.nullOr types.str; + default = null; + description = '' + Which column to sort the main activity page (such as "CPUUsage"). Default is null. + ''; + }; + + system.defaults.ActivityMonitor.SortDirection = mkOption { + type = types.nullOr types.int; + default = null; + description = '' + The sort direction of the sort column (0 is decending). Default is null. + ''; + }; + + system.defaults.ActivityMonitor.OpenMainWindow = mkOption { + type = types.nullOr types.bool; + default = true; + description = '' + Open the main window when opening Activity Monitor. Default is true. + ''; + }; + }; +} |
