handling new email from touchbar (flag, mark as read, delete,...)

This is a follow up on the "display unread email" widget that I have shared before.

The basic of this widget is the same but when click on it, It opens a touch bar group to allow you to quickly handle your email without leaving your current app/task

Here you can see how it looks like when the touch bar group is open:

which allows you to control your new email from the touchbar

So you have 6 buttons:

  1. the status button (display where you are in your reading).
    a. click on it and you pass to the next unread email
    b. long click on it and you see it on the mail app
  2. information buton (author : title of email)
    a. click on it: also include the full test in the information button (replacing end of line by |)

    b. long click on it: pop up a display dialog showing the content of the email
  3. a reply button
    b.a long click performs a reply to all
  4. a check button (mark the mail as read and pass the two first button to the next unread mail)
    b. a long click on it, launch the forward6ing of the mail
  5. a flag button (flag the mail as green, put it as read, update the two first widget)
    b. a long click does the same but flag it in yellow
  6. a delete button (move the mail to trash)
    Screenshots (optional)
    You can just drag or paste your screenshots here.
  7. the close tab group.
    Note that the tab group quits automatically if the number of unread email hits zero


  1. For efficiency and security reason all those button/actions are writing a file on /tmp/btt_mail.curr
  2. All the script assumes that Mail application is already opened (just did not test when this is not the case)
  3. I have my mail app on full screen on the most left desktop. To go there I do not use the open Mail application of BTT but a move space method. You might want to edit the open_mail trigger to match your setup.
  4. I would advise at least BTT 2.506 for this.

My initial motivation here was to quickly check email while watching movies. Obviously this is not the perfect environment for reading email, but it is actually quite fun (and it was fun and instructive to code)

mail5.json (304.2 KB)

Here is the link from the new platform


Note that I have kept in this one a shared_secret such that you can easily set yours and/or remove that security.
In term of feature, I have also slightly some behavior.

a long tap on the over the x/N button will display display the mail in his long version in the touchbar
a single click on the title of the mail will open it.

Hey Oliver,

You posted this a long time ago, and I've just stumbled across it. I love the widget though, and wanted to drop a line and say thanks!

I've been wanting something like this for a while, I appreciate it!