GithubHelp home page GithubHelp logo

codecopy / hyper-sync-settings Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dfrankland/hyper-sync-settings

0.0 0.0 0.0 995 KB

๐Ÿ”ƒ Sync Hyper.app settings with Github.

JavaScript 13.35% TypeScript 86.65%

hyper-sync-settings's Introduction

Hyper Sync Settings

Sync Hyper settings with Github.

Installation

  1. Open your Hyper settings (i.e., .hyper.js)

  2. Add hyper-sync-settings to plugins section

// Example
module.exports = {
  ...,
  plugins: [
    'hyper-sync-settings'
  ],
  ...
}
  1. Save and restart Hyper!

Setup

  1. Create a new personal access token which has the gist scope. Save your token to personalAccessToken inside ~/.hyper_plugins/.hyper-sync-settings.json. Alternatively, set the HYPER_SYNC_SETTINGS_PERSONAL_ACCESS_TOKEN environmental variable using this token.

  2. Create a new gist and save it. Save your gist id (last part of the url after the username) to gistId inside ~/.hyper_plugins/.hyper-sync-settings.json. Alternatively, set the HYPER_SYNC_SETTINGS_GIST_ID environmental variable using this id.

  3. Restart Hyper.

Disclaimer: Github Gists are by default public. If you don't want other people to easily find your gist (i.e. if you use certain packages, storing auth-tokens, a malicious party could abuse them), you should make sure to create a secret gist.

How to use

alt demo

Use the commands below in the menu:

  1. Plugins > Sync Settings > Check for Updates

    Checks Github to see if there are any updates available for your settings.

  2. Plugins > Sync Settings > Backup Settings

    Copies your ~/.hyper.js file to your local repository and pushes it to Github.

  3. Plugins > Sync Settings > Restore Settings

    Fast forwards local repo with all new commits from Github and copies the new settings to your ~/.hyper.js file.

  4. Plugins > Sync Settings > Open >

    • Gist: Opens the link to the configured Gist.

    • Repo: Opens the local repo that is cloned from the Gist.

    • Configuration: Opens the ~/.hyper_plugins/.hyper-sync-settings.json config file.

Configuration

Add syncSettings in your .hyper.js config. The configuration below shows all existing configuration values in their default states.

module.exports = {
  config: {
    // other configs...
    syncSettings: {
      quiet: false,
      accelerators: {
        checkForUpdates: 'CmdOrCtrl+8'
      }
    },
  },
  // ...
}

config.syncSettings.quiet

  • Type: boolean
  • Default: false

Mute the notification saying "Your settings are up to date". This will not hide any other notifications.

config.syncSettings.accelerators

  • Type: object
  • Default: {}

Add configurable keyboard shortcuts to each of the menu options. The value of each of the properties should be a valid Electron Accelerator. The available options are:

  • checkForUpdates
  • backupSettings
  • restoreSettings
  • openGist
  • openRepo
  • openConfiguration

Contribution

Please help improve this package! There's lots of room for stability and new features to be made, so I would love if you could help improve it :)

Credit

Credit where credit's due; the idea of this comes directly from atom-sync-settings.

Contributors

Thanks go out to @rfgamaral for all the help getting this working on Hyper 2.0 and fixing stuff on Windows!

hyper-sync-settings's People

Contributors

bencodezen avatar dfrankland avatar rfgamaral avatar victorloux avatar yashgorana avatar

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.