Browse Source

move plugins.common only class into plugins module

master
Von Random 6 years ago
parent
commit
5616f4d575
  1. 4
      .gitignore
  2. 0
      plugins/__init__.py
  3. 4
      plugins/batt.py
  4. 4
      plugins/date.py
  5. 4
      plugins/disk.py
  6. 4
      plugins/load.py
  7. 4
      plugins/mem.py
  8. 4
      plugins/ping.py
  9. 15
      vdstatus.wpr

4
.gitignore vendored

@ -1,3 +1,5 @@
__pycache__
*.iml
*.swp
*.wpu
.idea
__pycache__

0
plugins/common.py → plugins/__init__.py

4
plugins/batt.py

@ -1,10 +1,10 @@
import plugins.common
import plugins
BATTERY_DIR = '/sys/class/power_supply/BAT0/'
class PluginThread(plugins.common.PluginThreadCommon):
class PluginThread(plugins.PluginThreadCommon):
def __init__(self, section, config):
super(PluginThread, self).__init__(section, config)

4
plugins/date.py

@ -1,8 +1,8 @@
import time
import plugins.common
import plugins
class PluginThread(plugins.common.PluginThreadCommon):
class PluginThread(plugins.PluginThreadCommon):
def __init__(self, section, config):
super(PluginThread, self).__init__(section, config)
self.date_format = config.get(section, 'format', fallback='%c')

4
plugins/disk.py

@ -1,8 +1,8 @@
import plugins.common
import plugins
import psutil
class PluginThread(plugins.common.PluginThreadCommon):
class PluginThread(plugins.PluginThreadCommon):
def __init__(self, section, config):
super(PluginThread, self).__init__(section, config)
self.part = config.get(section, 'part')

4
plugins/load.py

@ -1,8 +1,8 @@
import os
import plugins.common
import plugins
class PluginThread(plugins.common.PluginThreadCommon):
class PluginThread(plugins.PluginThreadCommon):
def __init__(self, section, config):
super(PluginThread, self).__init__(section, config)
self.hide_ok = config.getboolean(section, 'hide_ok', fallback=False)

4
plugins/mem.py

@ -1,8 +1,8 @@
import psutil
import plugins.common
import plugins
class PluginThread(plugins.common.PluginThreadCommon):
class PluginThread(plugins.PluginThreadCommon):
def __init__(self, section, config):
super(PluginThread, self).__init__(section, config)

4
plugins/ping.py

@ -1,9 +1,9 @@
import os
import random
import plugins.common
import plugins
class PluginThread(plugins.common.PluginThreadCommon):
class PluginThread(plugins.PluginThreadCommon):
def __init__(self, section, config):
super(PluginThread, self).__init__(section, config)
self.hosts = config.get(section, 'hosts').split(',')

15
vdstatus.wpr

@ -0,0 +1,15 @@
#!wing
#!version=5.0
##################################################################
# Wing IDE project file #
##################################################################
[project attributes]
proj.directory-list = [{'dirloc': loc('.'),
'excludes': (),
'filter': u'Python Files',
'include_hidden': False,
'recursive': True,
'watch_for_changes': True}]
proj.file-list = [loc('conf.ini'),
loc('README.md')]
proj.file-type = 'shared'
Loading…
Cancel
Save