Hyperline / hyperline

✨ Status line plugin for Hyper ✨
MIT License
619 stars 120 forks source link

Can't enable other plugins #122

Closed fosron closed 6 years ago

fosron commented 6 years ago

Added this to Hyper config

hyperline: {
      color: 'black',
      plugins: [
        {
          name: 'hostname',
          options: {
            color: 'lightBlue'
          }
        },
        {
          name: 'memory',
          options: {
            color: 'white'
          }
        },
        {
          name: 'uptime',
          options: {
            color: 'lightYellow'
          }
        },
        {
          name: 'cpu',
          options: {
            colors: {
              high: 'lightRed',
              moderate: 'lightYellow',
              low: 'lightGreen'
            }
          }
        },
        {
          name: 'network',
          options: {
            color: 'lightCyan'
          }
        },
        {
          name: 'spotify',
          options: {
            color: 'lightYellow'
          }
        },
        {
          name: 'battery',
          options: {
            colors: {
              fine: 'lightGreen',
              critical: 'lightRed'
            }
          }
        }
      ]
    }

And i'm getting

/Users/fosron/.hyper_plugins/node_modules/hyperline/dist/hyperline.js:331 Uncaught TypeError: Cannot read property 'options' of undefined
    at /Users/fosron/.hyper_plugins/node_modules/hyperline/dist/hyperline.js:331:56
    at Array.reduce (native)
    at Array.<anonymous> (file:///Applications/Hyper.app/Contents/Resources/app.asar/renderer/bundle.js:1:56317)
    at mergePluginConfigs (/Users/fosron/.hyper_plugins/node_modules/hyperline/dist/hyperline.js:317:23)
    at mergeConfigs (/Users/fosron/.hyper_plugins/node_modules/hyperline/dist/hyperline.js:388:15)
    at new _class (/Users/fosron/.hyper_plugins/node_modules/hyperline/dist/hyperline.js:154:52)
    at c._constructComponentWithoutOwner (file:///Applications/Hyper.app/Contents/Resources/app.asar/renderer/bundle.js:4:96349)
    at c._constructComponent (file:///Applications/Hyper.app/Contents/Resources/app.asar/renderer/bundle.js:4:96216)
    at c.mountComponent (file:///Applications/Hyper.app/Contents/Resources/app.asar/renderer/bundle.js:4:95326)
    at Object.mountComponent (file:///Applications/Hyper.app/Contents/Resources/app.asar/renderer/bundle.js:1:21688)