Code Monkey home page Code Monkey logo

focusplsnobadges's Introduction

FocusPlsNoBadges

Demo GIF: turning on a Focus mode, watching badges disappear, turning the mode off, and watching badges come back

Add the 'Hide Notification Badges' Focus mode setting from iOS to macOS, in a really gross and hacky way.

Getting started

  1. Build the Xcode project
  2. Run the app (or archive it, put it somewhere nice, and set macOS to start it at login - since the app can't do this yet)
  3. Change to a Focus mode that has 'Hide Notification Badges' enabled (you'll have to set this on iOS and let it iCloud sync, the app doesn't let you set it om macOS)

How it works

  1. Every second (for now) we check the Focus mode preferences to see if the current Focus mode (if any) requests notification badges hidden
  2. If so, we modify the Notification Center preferences to disable badges for all apps, and record which apps it was disabled for in our own preferences.
  3. If not, we read any apps for which we disabled badges from our preferences, and modify the Notification Center preferences to enable badges for those apps.
  4. If we made any changes to the Notification Center preferences, we restart usernoted to update the state.

Downloads

Coming soon

Anything else?

  • Yeah.
  • It can't hide some system apps' badges, like System Preferences.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.