Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add integration commands to query pro features availability + toggle some integration and OSD features (allows MediaMate to better configure BetterDisplay) #2532

Closed
waydabber opened this issue Jan 15, 2024 · 3 comments
Assignees
Labels
done All tasks are completed enhancement New feature or request integration Command-line interface released Released
Milestone

Comments

@waydabber
Copy link
Owner

MediaMate by @Wouter01 currently uses userDefaults but this is not really reliable due to caching issues. A more proper way should be added for interaction.

@waydabber waydabber added enhancement New feature or request in progress Implementing internal pre-release Available in the latest internal pre-release build integration Command-line interface labels Jan 15, 2024
@waydabber waydabber added this to the v2.2.1 milestone Jan 15, 2024
@waydabber waydabber self-assigned this Jan 15, 2024
@waydabber waydabber changed the title Add possibility for MediaMate to reliably configure BetterDisplay programmatically (on/off) Add possibility for MediaMate to reliably configure BetterDisplay (integration on/off) Jan 15, 2024
@waydabber waydabber changed the title Add possibility for MediaMate to reliably configure BetterDisplay (integration on/off) Add possibility for MediaMate to reliably configure BetterDisplay and a mechanism so BetterDisplay knows MediaMate is still running Jan 16, 2024
@waydabber waydabber modified the milestones: v2.2.1, TBD, v2.2.2 Jan 24, 2024
@waydabber waydabber changed the title Add possibility for MediaMate to reliably configure BetterDisplay and a mechanism so BetterDisplay knows MediaMate is still running Add possibility for MediaMate to reliably configure BetterDisplay Feb 1, 2024
@waydabber waydabber changed the title Add possibility for MediaMate to reliably configure BetterDisplay Add integration commands to query pro features availability + toggle some integration and OSD features (allows MediaMate to better configure BetterDisplay) Feb 1, 2024
@waydabber
Copy link
Owner Author

waydabber commented Feb 1, 2024

Hi @Wouter01,

what I did was add the following features to CLI (available using the notification integration method)

  • proAvailable - works with the get command. Makes it possible to ask BD whether Pro features are available (this is required for OSD integration). Returns true or false (1 or 0). Useful for generally checking whether BetterDisplay is running and listening at all or not (might still be running but integration may be disabled).
  • osdShowBasic - turn showing basic OSDs on/off. Use with set and get.
  • osdShowCustom - turn showing custom OSDs on/off. Use with set and get.
  • osdIntegrationNotification - turn sending OSD integration notifications on/off. Use with set and get.

The best practice is the following:

  1. Check whether the app is running (as currently) -> if not, then things won't work.
  2. Check if there is pro and integration is enabled by asking about proAvailable. If there is no response, an error might be shown that integration must be enabled. If the response is false, a notification might be shown that a Pro licence is required for BetterDisplay in order to use this feature.
  3. Set osdShowBasic, osdShowCustom, osdIntegrationNotification - use set to turn them on (use on) when starting the integration and when exiting MediaMate or stopping the integration, turn them off (use off).

You are free to still use userDefaults as well especially if you want to configure BetterDisplay when it's not running or if you don't want to deal with steps 1 and 2. In this case you can simply send the set notifications (and don't wait for answer to figure out whether it succeeded) and change the userDefaults at the same time - in this case one or the other or both will do the trick to turning things on/off (if Pro is enabled and the app is running etc.).

Let me know if you have any questions. Will provide a build for testing soon!

@waydabber waydabber added done All tasks are completed and removed in progress Implementing labels Feb 1, 2024
@Wouter01
Copy link

Wouter01 commented Feb 1, 2024

Thanks a lot! This will probably make the integration between both apps more reliable!

@waydabber
Copy link
Owner Author

@waydabber waydabber added pre-release available Released as beta version and removed internal pre-release Available in the latest internal pre-release build labels Feb 6, 2024
@waydabber waydabber added released Released and removed pre-release available Released as beta version labels Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done All tasks are completed enhancement New feature or request integration Command-line interface released Released
Projects
None yet
Development

No branches or pull requests

2 participants