Giter VIP home page Giter VIP logo

btt's Issues

Create a btt web view boiler plate

this package can be run both on frontend and backend - to ease up working with web view, I'll create a boilerplate for createing apps that are supposed to be used within btt web view.

Fix recursive build (webpack, ts)

Currently if you run npm run build, the build process goes into infinite loop for some reason - i guess it is due to fact that typedoc builds its files, perhaps that may be it but it's a wild guess.

Create an abstraction to control JSONs better

There's a mess in Utilities or Events.ts files - because jsons need some manipulations to work properly in BetterTouchTool. I'd like to create a separate service for managing this part of the package

make addEventListener callback act like a real function

Currently, addEventListener method of this package just creates actions and attaches them to BTT.
But it could respect any other JavaScript function, for example setInterval, timeout, fetches etc.

  • Requires creation of btt-server subproject
  • Add an Action to BTT that invokes specific endpoint / sends specific message
  • Save the function definition somehow on the btt-server side.
  • Invoke the code upon recieving an event from real BetterTouchTool

Add docs

Find a way of easy deployment of the generated docs somewhere without polluting the repo and update the link in the README.md

Support for widgetInstance.addEventListener

Just realized that there's no simple way to update the action that is meant to happen upon clicking touchbar widget from the lib - I'll try to add support for both addTriggerAction (for use without btt-node-server) and addEventListener.

"Sorry, you have to provide the node/bash binary path manually in the params" when using addEventListener

Hey there Worie - this is an awesome library, and you're doing a great job! I'm trying to set up btt-node-server alongside this library, and I'm running into some issues.

First of all, I can instantiate btt (which I've installed within a local Create React App) in the browser and execute triggers in BTT. It's awesome.

However, when I attempt to use btt.addEventListener to access btt-node-server, an error prints in my console:

Sorry, you have to provide the node/bash binary path manually in the params

The shortcut I input as the first argument (cmd-alt-opt-u etc) appears in BTT but doesn't have any actions associated with it. It's just the keyboard command.

I've been digging into the AppConfig and I found the nodeBinaryPath option, but when I set that, the app crashes when I try to call btt.addEventListener.

Here's the config:
Browser:

    const btt = new Btt({
      domain: '127.0.0.1',
      port: 58267,
      protocol: 'http',
      version: '2.687',
      sharedKey: 'yourSharedKey',
      nodeBinaryPath: '/usr/local/bin/node',
      // pass eventServer to use this part of the lib
      eventServer: {
        domain: '127.0.0.1',
        port: 8888,
      },
    });

btt-node-server:

BTT_DOMAIN=127.0.0.1
BTT_PORT=58267
BTT_PROTOCOL=http
BTT_SHARED_KEY=yourSharedKey
BTT_VERSION=2.687
PORT=8888

Any ideas? I can just use the btt library to execute triggers that I've already defined, but I'm just curious why it's not working.

Typings not exported properly

There's a bug with type definitions exporting. If you install the package from NPM, the typings won't work. If you clone the repo manually and run npm link in it, then npm link btt in your app, it'll work. But surely, this is just a temporary solution and everything should be working fine when using npm build as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.