Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { Component } from 'react'
import PropTypes from 'prop-types'
import HyperLine from './lib/core/hyperline'
import { getColorList } from './lib/utils/colors'
import hyperlinePlugins from './lib/plugins'
import { allPlugins, defaultPlugins } from './lib/plugins'

export function reduceUI(state, { type, config }) {
switch (type) {
Expand Down Expand Up @@ -50,7 +50,7 @@ function filterPluginsByConfig(plugins) {
return plugins
}

plugins = pluginsByName(plugins)
plugins = pluginsByName(allPlugins)
const filtered = []

userPluginNames.forEach((name) => {
Expand Down Expand Up @@ -81,7 +81,7 @@ export function decorateHyperLine(HyperLine) {
}

render() {
const plugins = [...this.props.plugins, ...hyperlinePlugins]
const plugins = [...this.props.plugins, ...defaultPlugins]

return <HyperLine {...this.props} plugins={filterPluginsByConfig(plugins)} />
}
Expand Down
10 changes: 6 additions & 4 deletions src/lib/plugins/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import hostname from './hostname'
import ip from './ip'
import memory from './memory'
// Import Uptime from './uptime'
import uptime from './uptime'
import cpu from './cpu'
import network from './network'
import battery from './battery'
// Import Time from './time'
// Import Docker from './docker'
import time from './time'
import docker from './docker'
import spotify from './spotify'
// import gitStatus from './git-status'

export default [hostname, ip, memory, battery, cpu, network, spotify]
export const defaultPlugins = [hostname, ip, memory, battery, cpu, network, spotify]
export const allPlugins = [hostname, ip, memory, battery, cpu, network, spotify, time, uptime, docker]
2 changes: 1 addition & 1 deletion src/lib/plugins/uptime.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default class Uptime extends Component {
return formatUptime(os.uptime())
}

template(css) {
render() {
return (
<div className='wrapper'>
<PluginIcon /> {this.state.uptime}
Expand Down