{"id":15288878,"url":"https://github.com/swarshah/hyper-custom-touchbar","last_synced_at":"2025-10-05T15:52:53.623Z","repository":{"id":48361488,"uuid":"156314947","full_name":"swarshah/hyper-custom-touchbar","owner":"swarshah","description":"Add custom buttons to the Macbook's Touch Bar when using Hyper terminal.","archived":false,"fork":false,"pushed_at":"2021-07-30T01:20:43.000Z","size":193,"stargazers_count":35,"open_issues_count":5,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T15:40:00.718Z","etag":null,"topics":["electron","git","hyper","javascript","react","terminal","touchbar","vim"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swarshah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-06T02:35:49.000Z","updated_at":"2023-10-18T07:31:08.000Z","dependencies_parsed_at":"2022-08-29T17:12:24.816Z","dependency_job_id":null,"html_url":"https://github.com/swarshah/hyper-custom-touchbar","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swarshah%2Fhyper-custom-touchbar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swarshah%2Fhyper-custom-touchbar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swarshah%2Fhyper-custom-touchbar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swarshah%2Fhyper-custom-touchbar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swarshah","download_url":"https://codeload.github.com/swarshah/hyper-custom-touchbar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250395252,"owners_count":21423395,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["electron","git","hyper","javascript","react","terminal","touchbar","vim"],"created_at":"2024-09-30T15:54:11.443Z","updated_at":"2025-10-05T15:52:48.559Z","avatar_url":"https://github.com/swarshah.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hyper Custom Touch Bar\n\n**hyper-custom-touchbar is a Touch Bar plugin for [Hyper.app](https://hyper.is/)**. It replaces the Touch Bar area with user-defined executable commands.\n\n## Install\n\nTo install, edit `~/.hyper.js` and add `'hyper-custom-touchbar'` to `plugins`:\n\n```javascript\nmodule.exports = {\n  ...\n  plugins: ['hyper-custom-touchbar']\n  ...\n}\n```\n\n\n## Custom Touch Bar Buttons\n\nFollowing is what my shortcuts look like but feel free to change them as you like to better suit your development needs.\n\nAdd the following to `~/.hyper.js`\n\n```javascript\nmodule.exports = {\n  config: {\n    ...\n      hyperCustomTouchbar: [\n      // if you just need a single button then don't add options array\n      { label: 'clear', command: 'clear', backgroundColor: '#d13232' },\n      { label: 'man', command: 'man ', prompt: true },\n      {\n        label: 'git',\n        options: [\n          { label: 'diff', command: 'git diff' },          \n          { label: 'status', command: 'git status' },  \n          { label: 'log', command: 'git log' },\n          { label: 'add .', command: 'git add .', icon: '/tmp/icons8-add-file-44.png', iconPosition: 'right' },\n          { label: 'clone', command: 'git clone ', prompt: true },\n        ]\n      },\n      {\n        icon: '/tmp/icons8-folder-44.png',\n        options: [\n          { command: 'cd /usr/local/etc/nginx', icon: '/tmp/icons8-database-44.png', backgroundColor: '#000' },\n          { command: 'cd /usr/local/var/log', icon: '/tmp/icons8-binary-file-44.png', backgroundColor: '#000' },\n          { command: 'cd ~/Dropbox/', icon: '/tmp/icons8-dropbox-44.png', backgroundColor: '#000' },\n          { command: 'cd ~/Downloads/', icon: '/tmp/icons8-downloading-updates-44.png', backgroundColor: '#000' }\n        ]\n      },\n      {\n        label: 'vim',\n        options: [\n          { label: 'quit', command: ':q!', esc: true },\n          { label: 'save \u0026 quit', command: ':x', esc: true },\n        ]\n      },\n    ]\n    ...\n  }\n}\n```\n\nPlease note that `command` is always mandatory. The optional keys are:\n- `label` (default is `''`): label for the button.\n- `icon` (default is `''`): full path of the image file. According to Apple, ideal icon size is `36px × 36px` and maximum icon size is `44px × 44px`.\n- `iconPosition` (default is `left`): possible values are `left`, `right` and `overlay`. **Note**: this is not supported for main level popover buttons but will work for single button like `man` from example.\n- `backgroundColor` (default is `#363636`): string hex code representing the button's background color. **Note**: this is not supported for main level popover buttons but will work for single button like `man` from example.\n- `esc` (default is `false`): setting `esc` to `true` will be like pressing the `Escape` key before your command runs, instead of the classic `Ctrl`+`C`, which is useful in contexts (e.g. _VIM_) where the running operation can’t be stopped by `Ctrl`+`C`.\n- `prompt`(default is `false`): by setting `prompt` to `true`, the plugin won’t press the `Enter` key after writing the command, so that the user can complete the command by a custom input (see example with `git clone `; notice the space ending the `command`).\n\n\nAnd now restart your Hyper terminal and you should see populated Touch Bar.\n\n![Screenshot](https://raw.githubusercontent.com/SwarShah/hyper-custom-touchbar/master/ScreenshotMain.png)\n\n![Screenshot](https://raw.githubusercontent.com/SwarShah/hyper-custom-touchbar/master/ScreenshotGit.png)\n\n![Screenshot](https://raw.githubusercontent.com/SwarShah/hyper-custom-touchbar/master/ScreenshotCD.png)\n\n![Screenshot](https://raw.githubusercontent.com/SwarShah/hyper-custom-touchbar/master/ScreenshotVIM.png)\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/SwarShah/hyper-custom-touchbar/blob/master/LICENSE) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswarshah%2Fhyper-custom-touchbar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswarshah%2Fhyper-custom-touchbar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswarshah%2Fhyper-custom-touchbar/lists"}