KeyboardCowboy icon indicating copy to clipboard operation
KeyboardCowboy copied to clipboard

add notification command or have some way to customize the notification message

Open bjrmatos opened this issue 9 months ago • 3 comments

it will be nice to set a custom message to trigger either the Bezel or Capsule UI.

in workflows that do many actions, i would like to get some nice notification at the end with a custom message. perhaps it does not even have to be a new command but rather have some input next to where we configure the notification of command.

bjrmatos avatar Mar 12 '25 19:03 bjrmatos

Hi @bjrmatos, does your script end with any output? If so, what happens when you select Capsule as the notification? Maybe we can set up the actual notification, so it shows the name of the notification or the output that was returned.

I hope I got your request right!

zenangst avatar Mar 12 '25 20:03 zenangst

using this JXA script

(() => {
          const finder = Application('Finder');
          const windows = finder.windows();
          const windowPaths = [];

          windows.forEach(window => {
              try {
                  const target = window.target();
                  if (target.exists()) {
                      windowPaths.push(target.url());
                  }
              } catch (error) {
                  // Skip windows that don't have a valid target
              }
          });

        return windowPaths;
      })();

it is expected that i get the file path URL to all finder windows i have.

video of the output of the capsule right now: https://share.cleanshot.com/X8wV0Vdq

however in this case i don't want the output of the script to be the message of the notification, i want to set something custom like "Automation xxx run correctly". other use case if for example lets say i have a long workflow "Start Work" that opens applications, move windows, send shortcuts to app, at the end of everything i want a simple message like "All ready to start working"

bjrmatos avatar Mar 12 '25 21:03 bjrmatos

however in this case i don't want the output of the script to be the message of the notification

forgot to mention that there are valid use cases for the notification to be output of script, however not sure if the notification is expected already to show this, but in the video you can see it is just showing some metadata information.

bjrmatos avatar Mar 12 '25 21:03 bjrmatos