{ config, lib, pkgs, ... }:

{
  # dock
  system.defaults.dock.autohide = true;
  system.defaults.dock.autohide-delay = 0.2;
  system.defaults.dock.autohide-time-modifier = 0.2;
  system.defaults.dock.mineffect = "scale";
  system.defaults.dock.orientation = "left";
  system.defaults.dock.show-recents = true;
  system.defaults.dock.tilesize = 48;
  system.defaults.dock.persistent-apps = [
    "${pkgs.firefox}/Applications/Firefox.app"
    "${pkgs.kitty}/Applications/Kitty.app"
    "/System/Applications/Finder.app"
  ];

  # finder
  system.defaults.finder = {
    AppleShowAllExtensions = true;
    AppleShowAllFiles = true;
    FXEnableExtensionChangeWarning = false;
    FXPreferredViewStyle = "clmv";
    FXRemoveOldTrashItems = true;
    NewWindowTarget = "Home";
    ShowStatusBar = true;
    _FXShowPosixPathInTitle = true;
    _FXSortFoldersFirst = true;

    CreateDesktop = true; # desktop icons
    ShowHardDrivesOnDesktop = true;
    ShowExternalHardDrivesOnDesktop = true;
    ShowMountedServersOnDesktop = true;
    ShowRemovableMediaOnDesktop = true;
  };

  # activity monitor
  system.defaults.ActivityMonitor = {
    IconType = 0;
    OpenMainWindow = true;
    ShowCategory = 100;
    SortColumn = "CPUUsage";
    SortDirection = 0;
  };

  # hotkey daemon
  services.skhd.enable = true;
}
