KeyboardCowboy icon indicating copy to clipboard operation
KeyboardCowboy copied to clipboard

Add support to notify the user when a command has finished

Open zenangst opened this issue 2 years ago • 2 comments

When configuring a command, the user can check a box called Notify. Right now it doesn't do anything, so we should really implement this feature 🤡

It is undecided what this should look like, and where it should appear. Perhaps we should consider configuring what kind of notification should appear: front and center | notification center | show keystrokes

zenangst avatar May 24 '23 19:05 zenangst

I started tinkering with a "bezel" notification earlier.

https://github.com/zenangst/KeyboardCowboy/assets/57446/b8b89540-bfb9-45c6-86a9-f17269a16166

zenangst avatar Jun 05 '23 14:06 zenangst

It would be nice if you could make the notification state something, or even get the output from a terminal or script command.

So if you toggle, Let's say "Lower power mode" via a shell script, it would get the output from the command and use that to indicate to the user if the command was toggle on or off.

This could be a really neat improvement.

zenangst avatar Jun 20 '23 22:06 zenangst

Perhaps we could consider adding a HUD module, similar to the HUD window that appears on macOS when adjusting volume. The content, position, and styles of the HUD could be fully customizable by the user. This module could be appended to existing commands, functioning like a pipeline. It would execute after the preceding command or module, allowing the HUD to display relevant information, outputs, or predefined text.

I frequently use a similar feature in Hammerspoon to notify me when a specific operation has been completed. It's quite similar to the bezel video approach mentioned above, but with greater flexibility.

FischLu avatar Dec 31 '24 19:12 FischLu

I started tinkering with a "bezel" notification earlier.

if it helps in something, i find the Raycast notification really good and not disruptive at all. it looks like it aligns with your thinking.

video of notification when copying the link of browser tab: https://share.cleanshot.com/pSBxZ8jB

bjrmatos avatar Jan 10 '25 18:01 bjrmatos

Started playing around with a new notification option.

https://github.com/user-attachments/assets/abd88e29-10ff-4654-88c5-ac00ab875e3b

zenangst avatar Jan 20 '25 18:01 zenangst

https://github.com/user-attachments/assets/f62cdad9-2c18-4c67-9706-310580ee3b43

Here's the first draft of the implementation! :)

The blue color is the accent color that the user has chosen, so it will match your system preferences.

zenangst avatar Jan 20 '25 22:01 zenangst

awesome!!

FischLu avatar Jan 20 '25 22:01 FischLu

Is this prompt box a standalone component that can follow any command execution?

FischLu avatar Jan 20 '25 22:01 FischLu

@FischLu You can set up the commands to send notifications when they're running and when they're finished. Especially useful for long-running tasks, like Apple scripts or shell scripts.

zenangst avatar Jan 20 '25 23:01 zenangst