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

Feature request: Distributed notifications on enter/exit #64

Closed
jannis-baum opened this issue Aug 24, 2022 · 7 comments
Closed

Feature request: Distributed notifications on enter/exit #64

jannis-baum opened this issue Aug 24, 2022 · 7 comments

Comments

@jannis-baum
Copy link

Like in kV, sending distributed notifications on enter/exit of The Input would open up new possibilities for using Wooshy in conjunction with other tools such as Karabiner Elements & Hammerspoon. See #63 (comment) for a use case example.

@godbout
Copy link
Owner

godbout commented Aug 25, 2022

any preferred name for the DNs? i'm trying to stick with what Apple does but they don't have something proper for windows. there's hide/unhide for applications tho.

some ideas i have, in order of preference for me:

  1. WooshyInputDidAppear/Disappear
  2. WooshyInputDidUnhide/Hide
  3. WooshyInputDidShow/Hide

i mostly prefer 1. because it sounds cute and magical 😂️

@godbout
Copy link
Owner

godbout commented Aug 25, 2022

  1. WooshyInputDidAppear/Disappear

sorry, already decided. it's just too cute.

@godbout
Copy link
Owner

godbout commented Aug 27, 2022

done in a20: https://github.com/godbout/Wooshy.docs/releases/tag/1.a20

there's automated tests but tbh i think i didn't tested manually through an external app. let me know if it doesn't work properly.

@jannis-baum
Copy link
Author

With Hammerspoon (~/.hammerspoon/init.lua) set up like this

wooshyAppearWatcher = hs.distributednotifications.new(function(name, object, userInfo)
    hs.printf('appear')
end, 'WooshyInputDidAppear')
wooshyAppearWatcher:start()

wooshyDisappearWatcher = hs.distributednotifications.new(function(name, object, userInfo)
    hs.printf('disappear')
wooshyDisappearWatcher:start()

it looks like Wooshy sends the appear at the correct time, but the disappear is always sent right before the appear instead of when disappearing (you can open the console with the print output through the Menubar Item's menu at "Console...")

@godbout
Copy link
Owner

godbout commented Aug 29, 2022

works fine here, although i had to correct the hs config:

ScreenFlow.mp4
wooshyDisappearWatcher = hs.distributednotifications.new(function(name, object, userInfo)
    hs.printf('disappear')
end, 'WooshyInputDidDisappear')
wooshyDisappearWatcher:start()

is there something i'm missing? or is it still too early in Germany? 😂️

@jannis-baum
Copy link
Author

😂😂🤦 looks like it's still too early. Gonna go have a coffee

@godbout
Copy link
Owner

godbout commented Aug 29, 2022

and it's Monday so you're double-excused.

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

No branches or pull requests

2 participants