All Projects → SwarShah → hyper-custom-touchbar

SwarShah / hyper-custom-touchbar

Licence: MIT license
Add custom buttons to the Macbook's Touch Bar when using Hyper terminal.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to hyper-custom-touchbar

Hyper Chesterish
Chesterish Theme for Hyper
Stars: ✭ 135 (+275%)
Mutual labels:  hyper
Hyper Pane
Extension for Hyper.app to enhance pane navigation.
Stars: ✭ 160 (+344.44%)
Mutual labels:  hyper
Cheat Sheets
Cheat Sheets 🐭🤖👀
Stars: ✭ 185 (+413.89%)
Mutual labels:  hyper
Weld
Full fake REST API generator written with Rust
Stars: ✭ 146 (+305.56%)
Mutual labels:  hyper
Aura Theme
💅 A beautiful dark theme for your favorite apps.
Stars: ✭ 159 (+341.67%)
Mutual labels:  hyper
Routerify
A lightweight, idiomatic, composable and modular router implementation with middleware support for the Rust HTTP library hyper.rs
Stars: ✭ 173 (+380.56%)
Mutual labels:  hyper
Hyperterm Overlay
A complete and customizable solution for a overlay window in your Hyper.app
Stars: ✭ 127 (+252.78%)
Mutual labels:  hyper
Facebook Political Ads
Monitoring Facebook Political Ads
Stars: ✭ 215 (+497.22%)
Mutual labels:  hyper
Hyper Hypest
A beautiful and minimal macOS theme for Hyper
Stars: ✭ 159 (+341.67%)
Mutual labels:  hyper
Hyperlayout
📐 Layout presets for Hyper.app
Stars: ✭ 184 (+411.11%)
Mutual labels:  hyper
Hyper Search
Search-text plugin for Hyper.js
Stars: ✭ 146 (+305.56%)
Mutual labels:  hyper
Zsh Theme
Yet another zsh theme
Stars: ✭ 153 (+325%)
Mutual labels:  hyper
Hyper Tabs Enhanced
Enhanced Tabs Plugin for Hyper
Stars: ✭ 173 (+380.56%)
Mutual labels:  hyper
Hyperstart
The tiny Init service for HyperContainer
Stars: ✭ 135 (+275%)
Mutual labels:  hyper
Hyper Cat
Turn your Hyper terminal into nyan cat while typing.
Stars: ✭ 195 (+441.67%)
Mutual labels:  hyper
Hyper Tls
Stars: ✭ 131 (+263.89%)
Mutual labels:  hyper
Dotfiles Win
🙈 oh-my-zsh on bash on windows configuration files
Stars: ✭ 167 (+363.89%)
Mutual labels:  hyper
Hyper Star Wars
Super awesome your Hyper terminal shall look
Stars: ✭ 233 (+547.22%)
Mutual labels:  hyper
Hyperocean
Deep oceanic blue Hyper theme
Stars: ✭ 207 (+475%)
Mutual labels:  hyper
Hyperborder
adds a gradient border to the Hyper terminal
Stars: ✭ 183 (+408.33%)
Mutual labels:  hyper

Hyper Custom Touch Bar

hyper-custom-touchbar is a Touch Bar plugin for Hyper.app. It replaces the Touch Bar area with user-defined executable commands.

Install

To install, edit ~/.hyper.js and add 'hyper-custom-touchbar' to plugins:

module.exports = {
  ...
  plugins: ['hyper-custom-touchbar']
  ...
}

Custom Touch Bar Buttons

Following is what my shortcuts look like but feel free to change them as you like to better suit your development needs.

Add the following to ~/.hyper.js

module.exports = {
  config: {
    ...
      hyperCustomTouchbar: [
      // if you just need a single button then don't add options array
      { label: 'clear', command: 'clear', backgroundColor: '#d13232' },
      { label: 'man', command: 'man ', prompt: true },
      {
        label: 'git',
        options: [
          { label: 'diff', command: 'git diff' },          
          { label: 'status', command: 'git status' },  
          { label: 'log', command: 'git log' },
          { label: 'add .', command: 'git add .', icon: '/tmp/icons8-add-file-44.png', iconPosition: 'right' },
          { label: 'clone', command: 'git clone ', prompt: true },
        ]
      },
      {
        icon: '/tmp/icons8-folder-44.png',
        options: [
          { command: 'cd /usr/local/etc/nginx', icon: '/tmp/icons8-database-44.png', backgroundColor: '#000' },
          { command: 'cd /usr/local/var/log', icon: '/tmp/icons8-binary-file-44.png', backgroundColor: '#000' },
          { command: 'cd ~/Dropbox/', icon: '/tmp/icons8-dropbox-44.png', backgroundColor: '#000' },
          { command: 'cd ~/Downloads/', icon: '/tmp/icons8-downloading-updates-44.png', backgroundColor: '#000' }
        ]
      },
      {
        label: 'vim',
        options: [
          { label: 'quit', command: ':q!', esc: true },
          { label: 'save & quit', command: ':x', esc: true },
        ]
      },
    ]
    ...
  }
}

Please note that command is always mandatory. The optional keys are:

  • label (default is ''): label for the button.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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).

And now restart your Hyper terminal and you should see populated Touch Bar.

Screenshot

Screenshot

Screenshot

Screenshot

License

This project is licensed under the MIT License - see the LICENSE file for details

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].