npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hyper-custom-touchbar

v1.0.11

Published

Make touchbar useful in Hyper terminal.

Downloads

16

Readme

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