Jump to content

Better notifications


Florian

Recommended Posts

Hey Alfred Team,

 

since mavericks release, the notifications have gained in complexity and I believe Alfred could take advantage of that. I believe that if the "Post Notification" output of a workflow were to take an XML as an input instead of a query, we could achieve something good.

Here are my ideas for new functionalities but feel free to add more in the comments.

 

 

1 - The notification image display should ressemble more iTunes notifications: alfred's icon in small, workflow icon as main, and tertiary image optional.

Screen%20Shot%202013-12-18%20at%201.17.3

 

2 - Notifications should allow clicking for actions (both main action when clicking on the notif itself and secondary action when clicking on a button): open a file with path, show file in finder with path, pop alfred back up with search, remove file (for cancelling a download for example), open an app...

Screen%20Shot%202013-12-18%20at%201.17.4

 

3 - like I was saying, to accomplish that I believe an XML input would be appropriate. I haven't thought of an ideal way to point to the next action (when clicking, see 2.) but this is I believe overall relevant:

<item>
   <title>
      Here my title
   </title>
   <subtitle>
      And there a detailed subtitle
   </subtitle>
   <image>
      /path/to/optional/image.jpg
   </image>
   <main_action arg="">
      path/to/script/to/run
   </main_action>
   <secondary_action arg="" button_text="Skip">
      path/to/script/to/run
   </secondary_action>
</item>

4 - In case of multiple notifications, some RSS notifiers have thought that putting some delay between notifications allows for better readability and gives time for the user to click if needed. In the case of XML notifications (see point 3.) we could imagine that several notifications of equal importance might need to be displayed (file1.txt, file2.txt downloaded, each could allow for action (like deleting) thus some time between both notification is relevant) but also some notification might be hierarchical ("process started", "process finished") in which case delay is not relevant. I propose:

<items delay="no">
   <item>
      <title>
         process started
      </title>
   </item>
   <item>
      <title>
         process finished
      </title>
   </item>
</items>

or

<items delay="yes">
   <item>
      <title>
         file1.txt downloaded
      </title>
   </item>
   <item>
      <title>
         file2.txt downloaded
      </title>
   </item>
</items>

That's all for now. I do believe all that is doable within a script that would run at the end of a workflow instead of a notification output, so if anyone else than Andrew wants to give it a try, there's some good to be done :)

 

Cheers all

Edited by Florian
Link to comment
Share on other sites

Note that iTunes' method of displaying images is not documented (as far as I know). There's an issue in terminal-notifier about this.

 

Yeah I've seen that, but I believe there should be a way around. You can temporarily change the app icon (plus terminal-notifier team seems to be working on it, no?):

 

 

 

Usurp the primary application icon (terminal) with setApplicationIconImage

 

And you can add images in the text with special characters (just tried with this camera thingy from Character Viewer):

Screen%20Shot%202013-12-18%20at%207.20.5

Apparently displaying a button isn't too complicated either, maybe handling the click is though...

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...