Skip to content

Comments

Control Center: Add missing Options, and Fix some#1347

Open
iamanaws wants to merge 1 commit intonix-darwin:masterfrom
iamanaws:controlcenter
Open

Control Center: Add missing Options, and Fix some#1347
iamanaws wants to merge 1 commit intonix-darwin:masterfrom
iamanaws:controlcenter

Conversation

@iamanaws
Copy link
Contributor

No description provided.

@iamanaws
Copy link
Contributor Author

I just have doubt about the options that change their type, I know there are ways, but here I'm not sure how to add a warning or heads up, to indicate the allowed values had changed

@iamanaws iamanaws force-pushed the controlcenter branch 2 times, most recently from bf0b436 to 2362651 Compare February 21, 2025 23:48
Copy link
Contributor

@bew bew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments on the options ;)

For the type change, we could have backward compatibility with warning by adding true & false in the mkXXXXApply mapping functions like:

mkEnumApply {
  always = 21,
  hide = 42,
  true = lib.warn ''something something use "always" now'' 21,
  false = lib.warn ''something something use `"hide"` now'' 42,
}

@iamanaws iamanaws force-pushed the controlcenter branch 14 times, most recently from 969cca6 to f88f0a1 Compare February 24, 2025 17:49
@iamanaws iamanaws requested a review from bew February 28, 2025 23:54
@bew
Copy link
Contributor

bew commented Mar 5, 2025

Thanks for the changes, looks nice!

While looking at the test file I noticed something that might be improved:

  system.defaults.controlcenter.Sound = "always";
  system.defaults.controlcenter.StageManager = true;
  system.defaults.controlcenter.UserSwitcher = "menuBar";
  system.defaults.controlcenter.WiFi = true;

Those lines show how inconsistent the values are for seemingly similar options: some are true, others are "always" or "menuBar"..
👉 Could we avoid having multiple values for the same thing? 🤔

@iamanaws iamanaws force-pushed the controlcenter branch 2 times, most recently from d7f1d82 to 75bdba8 Compare March 21, 2025 16:32
@iamanaws
Copy link
Contributor Author

Thanks for the changes, looks nice!

While looking at the test file I noticed something that might be improved:

  system.defaults.controlcenter.Sound = "always";
  system.defaults.controlcenter.StageManager = true;
  system.defaults.controlcenter.UserSwitcher = "menuBar";
  system.defaults.controlcenter.WiFi = true;

I updated the test file to use the same values for options that share the same type.
So now we only apply "both", "always", and true.

Is that what you meant?

Those lines show how inconsistent the values are for seemingly similar options: some are true, others are "always" or "menuBar".. 👉 Could we avoid having multiple values for the same thing? 🤔

I leave as bool the ones that are more simple, but I could change them to reflect better the options. I grouped similar stuff and leave just 3 different patterns.

@iamanaws iamanaws force-pushed the controlcenter branch 2 times, most recently from ba719c0 to 1cfdf97 Compare December 25, 2025 08:51
@iamanaws
Copy link
Contributor Author

It's been a few months, but I cleaned it up!

- Replace boolean options with descriptive string enums ("show"/"hide",
  "whenActive"/"always"/"hide", "both"/"menuBar"/"controlCenter"/"hide")
- Add AccessibilityShortcuts, Battery, BatteryShowEnergyMode, Hearing,
  KeyboardBrightness, MusicRecognition, ScreenMirroring, StageManager,
  UserSwitcher, WiFi options
- Deprecate boolean values with backward-compatible warnings
- Add system.defaults.Spotlight.MenuItemHidden option
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants