Giter VIP home page Giter VIP logo

Comments (4)

Macjutsu avatar Macjutsu commented on July 28, 2024

Gold star for you! Not only is that a great idea, you provided example code!

In my mind this feature would also bookend a method to mange different kinds of display assertions. For example it's probably important to avoid interrupting the user if they are in a Zoom, but not while watching YouTube. Both set a screen assertion, and right now super considers any screen assertion as equally valid.

Worshipping this idea... how would you "feature-ize" this? Would you want to define a list of focus states that are allowed always... or ignore certain focus types? For example; --focus-allow=thing1,thing2 and --focus-disallow=thing1,thing2. Again, the goal is to provide the most straight forward options for the command string.

Full disclosure though, I have to get major upgrades working first...

from super.

wakco avatar wakco commented on July 28, 2024

As far as "major upgrades working first..." goes, yes, I already consider this idea a minor feature.

In the long run, yes, but maybe also a basic on/off as well, where when turned on, if those two options are empty, then just the basic idea of filtering a custom focus, i.e. --focus-filter, and --no-focus-filter, with --focus-(dis)allow=thing1,thing2 both requiring --focus-filter.

So turning it on, and leaving the allow/disallow options empty, defaults to filtering the word focus. Setting the allow/disallow options to anything, would override the basic focus filter. Turning it off, lets it operate the way it is now (which should remain the default if neither option is supplied).

In short most people probably are not using the Focus feature intentionally (that is they have no custom focus'), so allowing for the basic just focus makes it easier for admins.

from super.

iDrewbs avatar iDrewbs commented on July 28, 2024

I was just about to submit this as a feature request and am glad I see someone already had the idea.
I agree with the idea to use --focus-allow=thing1,thing2 and --focus-disallow=thing1,thing2 options. I've been using the Work focus mode lately and would like to make sure that doesn't block super, along with something like YouTube.

from super.

wakco avatar wakco commented on July 28, 2024

Oh as a minor workaround for anyone interested in editing their copy of super for this, find the line that reads:
focusSTATUS=$(plutil -extract data.0.storeAssertionRecords.0.assertionDetails.assertionDetailsModeIdentifier raw -o - "/Users/$currentUSER/Library/DoNotDisturb/DB/Assertions.json" | grep -ic com.apple.)

And insert either grep -v com.apple.focus | or grep -v com.apple.focus.FocusNameHere | before the existing grep, i.e.
focusSTATUS=$(plutil -extract data.0.storeAssertionRecords.0.assertionDetails.assertionDetailsModeIdentifier raw -o - "/Users/$currentUSER/Library/DoNotDisturb/DB/Assertions.json" | grep -v com.apple.focus | grep -ic com.apple.)

This is what I have been doing with mine. Note: grep can take multiple -v's allowing for the identification of multiple custom focuses.

from super.

Related Issues (20)

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.