conf: some comment clarification, get rid of removed plugin; cmd: fix variable name leftovers from when it was just pacman plugin
This commit is contained in:
parent
94502d2d61
commit
8e1cea8a01
2 changed files with 11 additions and 4 deletions
11
conf.yaml
11
conf.yaml
|
@ -1,5 +1,7 @@
|
||||||
# Typical plugin properties:
|
# Typical plugin properties:
|
||||||
# - name: plugin name (always required, all other properties are optional)
|
# - name: plugin name (always required, all other properties are optional)
|
||||||
|
# note that a plugin can be used more than once (i.e. different
|
||||||
|
# timezones in the date plugin)
|
||||||
# - title: title representation on the panel
|
# - title: title representation on the panel
|
||||||
# - hide_ok: false to force display value even if it is below problem threshold
|
# - hide_ok: false to force display value even if it is below problem threshold
|
||||||
# - problem: a threshold value to make a value urgent and / or display
|
# - problem: a threshold value to make a value urgent and / or display
|
||||||
|
@ -25,11 +27,16 @@ plugins:
|
||||||
partition: /home
|
partition: /home
|
||||||
problem: 90
|
problem: 90
|
||||||
|
|
||||||
- name: pacman
|
|
||||||
|
|
||||||
- name: mem
|
- name: mem
|
||||||
|
|
||||||
- name: load
|
- name: load
|
||||||
|
|
||||||
|
- name: batt
|
||||||
|
|
||||||
- name: date
|
- name: date
|
||||||
format: '%a %d %H:%M'
|
format: '%a %d %H:%M'
|
||||||
|
|
||||||
|
- name: date
|
||||||
|
title: UTC
|
||||||
|
tz: UTC
|
||||||
|
format: '%H:%M'
|
||||||
|
|
|
@ -13,11 +13,11 @@ class PluginThread(plugins.PluginThreadCommon):
|
||||||
super(PluginThread, self).__init__(config, PACMAN_DEFAULTS)
|
super(PluginThread, self).__init__(config, PACMAN_DEFAULTS)
|
||||||
|
|
||||||
def main(self):
|
def main(self):
|
||||||
pacman_qu = subprocess.Popen(
|
proc = subprocess.Popen(
|
||||||
self.conf['cmd'], stdout=subprocess.PIPE,
|
self.conf['cmd'], stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.DEVNULL, stdin=subprocess.DEVNULL,
|
stderr=subprocess.DEVNULL, stdin=subprocess.DEVNULL,
|
||||||
encoding='UTF-8'
|
encoding='UTF-8'
|
||||||
)
|
)
|
||||||
out = pacman_qu.communicate()[0].strip().splitlines()[0]
|
out = proc.communicate()[0].strip().splitlines()[0]
|
||||||
|
|
||||||
self.format_status(out)
|
self.format_status(out)
|
||||||
|
|
Loading…
Reference in a new issue