KrauseFx / overkill

Don't let iTunes interrupt your workflow 💥🎵
https://krausefx.com
482 stars 21 forks source link

Find an alternative to polling #3

Closed fpg1503 closed 6 years ago

fpg1503 commented 7 years ago

Use something such as a KAUTH listener to enable real life usage.

KrauseFx commented 7 years ago

Yeah, I agree that would be nice 👍

cesarferreira commented 7 years ago

It looks like polling is overkill

image

fpg1503 commented 7 years ago

NSWorkspaceWillLaunchApplication also looks like a good alternative

SebastianHeyneman commented 7 years ago

What is wrong with polling? I'm not familiar with this stuff, I just want itunes to stop popping up.

(And, for me, my headphone port is whacky -- so whenever my headphone jack wiggles, it opens up iTunes)

Just to be clear -- it says in the description the repo is a joke. Does that mean that I shouldn't use it?

KrauseFx commented 7 years ago

@SeabassWells No, the code works just fine, you can use it 👍 polling is just not as efficient and clean as subscribing to changes.

tombonez commented 7 years ago

Thanks for the sweet Ruby script @KrauseFx!

You inspired me to create a Swift version over my lunch using NSWorkspaceWillLaunchApplication as mentioned by @fpg1503.

If anyone is interested, the source code (and binary) it can be found at: noTunes

❤️

SebastianHeyneman commented 7 years ago

Awesome, thank you.

Given what Tom said, is noTunes a bit more efficient?

On Thu, Jan 5, 2017 at 7:26 AM, Tom Taylor notifications@github.com wrote:

Thanks for the sweet Ruby script @KrauseFx https://github.com/KrauseFx!

You inspired me to create a Swift version over my lunch using NSWorkspaceWillLaunchApplication https://developer.apple.com/reference/foundation/nsnotification.name/1528611-nsworkspacewilllaunchapplication as mentioned by @fpg1503 https://github.com/fpg1503.

If anyone is interested, the source code (and binary) it can be found at: noTunes https://github.com/tombonez/noTunes

❤️

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/KrauseFx/overkill/issues/3#issuecomment-270505227, or mute the thread https://github.com/notifications/unsubscribe-auth/AF0kPSmo_HqROOYiyQuxzLoCuXGoVEazks5rPByegaJpZM4LKGZN .

-- Sebastian H. Wells Epic Impact | Director of Marketing 415.513.7629 | www.linkedin.com/in/sebastianhwells

alanzeino commented 7 years ago

I think so. I rewrote noTunes into a swift script to quit a different app, and I've been running it in the background and when I take a look at Activity Monitor it doesn't seem to take much CPU at all.

KrauseFx commented 6 years ago

There is something coming very soon for the 1y anniversary, will close the issue for now 👍