Hyper: macOS Touch Bar support

Created on 17 Jul 2017  ·  7Comments  ·  Source: vercel/hyper

  • [x] I have searched the issues of this repo and believe that this is not a duplicate

So, iTerm recently landed support for the macOS Touch Bar (in that programs hosted in the terminal can create display-buttons for the touch bar that display custom content, and send a function-key such as F1..F12 to the terminal when tapped.)

The implementation uses iTerm2's 1337 escape-code with the SetKeyLabel, PushKeyLabels, and PopKeyLabels keys.

For instance, printing ESC+]1337;SetKeyLabel=F1=Save & Quit+BEL will cause iTerm2 to display a Touch Bar button with the text “Save & Quit”, that when tapped, sends to the application.

One example usage of this functionality is demonstrated here, where some of the cruft traditionally included in the command-line prompt is moved into the Touch Bar:

iTerm touch-bar support for zsh prompt information

I'd love to see this support validated and duplicated by Hyper, given how cutting-edge Hyper tends to be in other ways.

Enhancement Feature Request

Most helpful comment

@ELLIOTTCABLE I plan on looking into this soon (but maybe in the form of a plugin) when I can find some free time. Sad that this is a year old and appears to have no solution.

All 7 comments

We'd have to wait for Electron Touch Bar Support to get out of beta first ✌️

https://electron.atom.io/blog/2017/03/08/touch-bar-support

@henrikdahl Touch bar support in electron landed in v1.6.5

Docs: https://electron.atom.io/docs/api/touch-bar/

@wingrunr21

Note: The TouchBar API is currently experimental and may change or be removed in future Electron releases.

Not stable yet it appears ✌️

@henrikdahl

The note is there due to the newness of the Touch Bar itself, not due to the API. The API exists and is documented in a stable version of Electron.

Here's the relevant commit and explanation around that line: https://github.com/electron/electron/pull/8856

+1

@ELLIOTTCABLE I plan on looking into this soon (but maybe in the form of a plugin) when I can find some free time. Sad that this is a year old and appears to have no solution.

I just created a simple plugin for Hyper to add custom buttons to the touch bar. I hope you guys like it until the official support arrives.

https://github.com/SwarShah/hyper-custom-touchbar

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rauchg picture rauchg  ·  3Comments

leo picture leo  ·  3Comments

juicygoose picture juicygoose  ·  3Comments

weabot picture weabot  ·  3Comments

stan-stripe picture stan-stripe  ·  3Comments